Create a Secure Boot Linux virtual machine
To improve the security of your virtualization host, you can create Linux virtual machines (VMs) that use the Secure Boot feature. Secure Boot ensures that the VM is running a cryptographically signed operating system (OS).
Before you begin
- Your host system uses the AMD64, Intel 64, or 64-bit ARM architecture.
Important On 64-bit ARM systems, Red Hat provides Secure Boot VMs only as a Technology Preview, and highly discourages their use in production environments.
- The EDK2 package is installed on your host:
- If your host uses the AMD64 or Intel 64 architecture, the
edk2-ovmfpackage must be installed:# dnf install edk2-ovmf - If your host uses 64-bit ARM,
edk2-aarch64is required instead.# dnf install edk2-aarch64
- If your host uses the AMD64 or Intel 64 architecture, the
- The VM uses the correct machine type:
- On AMD64 and Intel 64 hosts, the VM must use the
Q35machine type. - On 64-bit ARM hosts, the VM must use the
virtmachine type.
- On AMD64 and Intel 64 hosts, the VM must use the
- An installation source for the guest operating system is available locally or on a network. This can be one of the following formats:
- An ISO image of an installation medium
- A disk image of an existing VM
Warning Installing from a host CD-ROM or DVD-ROM device is not possible in RHEL 10. If you select a CD-ROM or DVD-ROM as the installation source when using any VM installation method available in RHEL 10, the installation fails. For more information, see RHEL 7 or higher can’t install guest OS from CD/DVD-ROM (Red Hat Knowledgebase).
- Optional: A Kickstart file can be provided for faster and easier configuration of the installation.
About this task
Secure Boot helps prevent certain types of attacks against the guest OS. It also acts as an additional layer of protection for the host OS, on top of the isolation already provided by virtualization. If the guest OS supports it, enable Secure Boot to improve the security of your VM.
When you create a VM with the UEFI firmware on a host that uses the AMD64 or Intel 64 CPU architecture, the VM uses Secure Boot by default.
Procedure
Results
- After the guest OS is installed, access the VM’s command line by opening the command line in the graphical guest console or connecting to the guest OS using SSH.
- To confirm that Secure Boot has been enabled on the VM, use the
mokutil --sb-statecommand:# mokutil --sb-stateSuccessful output:
SecureBoot enabled