Enable UEFI in addition to legacy bootmode

In order to enable UEFI support we need to configure guests VM to use OVMF
(Open Virtual Machine Firmware)

Closes: #319

Change-Id: I4b1c3b9fa8f1f0fe42ced7ec3e57b9d95dd4a3f5
This commit is contained in:
Alexander Noskov 2020-08-11 20:17:59 +00:00
parent 582894d389
commit 1fcb6df061
4 changed files with 10 additions and 1 deletions

View File

@ -7,6 +7,7 @@ metadata:
hosts:
m3:
node01:
bootMode: UEFI
macAddress: 52:54:00:b6:ed:31
bmcAddress: redfish+http://10.23.25.1:8000/redfish/v1/Systems/air-target-1
bmcUsername: root
@ -17,9 +18,9 @@ hosts:
macAddresses:
oam: 52:54:00:9b:27:4c
pxe: 52:54:00:b6:ed:31
bootMode: legacy
hardwareProfile: default # defined in the hostgenerator-m3 function
node02:
bootMode: UEFI
macAddress: 52:54:00:b6:ed:02
bmcAddress: redfish+http://10.23.25.2:8000/redfish/v1/Systems/air-target-2
bmcUsername: username

View File

@ -70,6 +70,7 @@
name: libvirt-domain
vars:
libvirt_domain:
boot_mode: UEFI
enable_vnc: true
console_log_enabled: true
state: shutdown
@ -99,6 +100,7 @@
name: libvirt-domain
vars:
libvirt_domain:
boot_mode: UEFI
enable_vnc: true
console_log_enabled: true
state: shutdown
@ -167,6 +169,7 @@
name: libvirt-domain
vars:
libvirt_domain:
boot_mode: UEFI
enable_vnc: true
console_log_enabled: true
state: shutdown

View File

@ -106,6 +106,9 @@ libvirt_domain_template_default: |
<on_crash>destroy</on_crash>
<os>
<type arch='{{ libvirt_vm_arch }}'{% if machine is not none %} machine='{{ machine }}'{% endif %}>hvm</type>
{% if libvirt_domain.boot_mode is defined and libvirt_domain.boot_mode == 'UEFI' %}
<loader readonly='yes' type='pflash'>/usr/share/OVMF/OVMF_CODE.fd</loader>
{% endif %}
<bootmenu enable='no'/>
<boot dev='hd'/>
<boot dev='cdrom'/>

View File

@ -25,7 +25,9 @@
- python3-libvirt
- dnsmasq
- ebtables
- ovmf
RedHat:
- edk2-ovmf
- libguestfs-tools
- libvirt
- libvirt-devel