This article explains how to deploy a machine with Ubuntu and configure it to use a real-time kernel.
The real-time kernel is included in all Ubuntu Pro subscriptions for Ubuntu 22.04 LTS.
Understanding how the RT kernel is deployed
While the real-time kernel isn’t included in MAAS as a kernel to use, we use cloud-init to first deploy the machine with a generic kernel. The cloud-init kicks in and installs the real-time kernel, and then finally reboots the machine in order to make use of the newly installed kernel.
This means that after the machine has been marked as DEPLOYED in MAAS, there will be a delay until cloud-init has finished running and the machine finishes rebooting.
If you execute the steps in the previous section, MAAS is going to execute the tasks:
- Deploy this machine with
Ubuntu 22.04 LTSand a stock kernel
- Reboot the machine
- Tell the machine’s bootloader to boot from disk
- The host initialises and asks MAAS for its configuration
- MAAS builds and sends the host cloud-init configuration, combining the base options with the snippet above
- Cloud-init enables Ubuntu Pro in this machine
- Ubuntu Pro agent downloads and installs the RT kernel.
- Cloud-init reboots the machine again to enable the new kernel
- The system is ready
- A valid Ubuntu Pro token (go to https://ubuntu.com/pro/dashboard to find your token)
- MAAS 3.2 or later with Ubuntu 22.04 LTS images synchronized
- A host compatible with Ubuntu RT kernel
- Internet connection
At this moment it’s not possible to install the RT kernel without Internet access in the host.
How to deploy a machine with RT kernel enabled
All steps should be performed in MAAS UI.
To deploy an RT kernel:
Enlist/Commission the host as usual
Select the host and click
Ubuntu 22.04 LTS "Jammy Jellyfish"as OS and Release respectively
Use the following snippet as template, remember to replace
YOUR_TOKENwith a valid value
#cloud-config power_state: mode: reboot ubuntu_advantage: token: YOUR_TOKEN enable: - esm-infra - realtime-kernel
Start deployment for machine
How to verify the deployment
The following command can be executed in the host to check if the RT kernel was enabled with success
SERVICE ENTITLED STATUS DESCRIPTION esm-infra yes enabled Expanded Security Maintenance for Infrastructure realtime-kernel yes enabled Ubuntu kernel with PREEMPT_RT patches integrated
Linux vm01 5.15.0-1030-realtime #33-Ubuntu SMP PREEMPT_RT Mon Jan 9 17:28:40 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux