9.18.5.2. Booting virtual machines in UEFI mode
You can configure a virtual machine to boot in UEFI mode by editing the VirtualMachine manifest.
Prerequisites
-
Install the OpenShift CLI (
oc).
Procedure
To boot a virtual machine (VM) in UEFI mode with secure boot active, edit or create a
VirtualMachinemanifest file. Use thespec.firmware.bootloaderstanza to configure UEFI mode:apiversion: kubevirt.io/v1 kind: VirtualMachine metadata: labels: special: vm-secureboot name: vm-secureboot spec: template: metadata: labels: special: vm-secureboot spec: domain: devices: disks: - disk: bus: virtio name: containerdisk features: acpi: {} smm: enabled: true firmware: bootloader: efi: secureBoot: true # ...-
You must set
spec.template.spec.domain.features.ssm.enabledto have a value oftrue. -
If
spec.template.spec.domain.firmware.bootloader.efi.secureBootis set totrue, then UEFI mode is required. However, you can enable UEFI mode without using Secure Boot.
-
You must set
Apply the manifest to your cluster by running the following command:
$ oc create -f <file_name>.yaml