Skip to content

Commit

Permalink
Switch OC nodes to UEFI
Browse files Browse the repository at this point in the history
Since UEFI is the new default, let's drop BIOS from the lab.

The lab-destroy script has been updated in order to take care of nvram
(used by UEFI) as well as snapshots - before that patch, the script
would fail for VM having snapshots.
  • Loading branch information
cjeanner committed Nov 22, 2021
1 parent a3b345b commit 426b9ef
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions roles/builder/templates/domain.xml.j2
Expand Up @@ -3,7 +3,9 @@
<memory unit='MB'>{{item.0.memory}}</memory>
<vcpu placement='static'>{{item.0.cpu}}</vcpu>
<os>
<type arch='x86_64' machine='pc'>hvm</type>
<type arch='x86_64' machine='q35'>hvm</type>
<loader readonly="yes" secure="no" type="pflash">/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd</loader>
<nvram template='/usr/share/edk2/ovmf/OVMF_VARS.fd'/>
<bios useserial='yes' rebootTimeout='0'/>
<smbios mode='emulate'/>
</os>
Expand Down Expand Up @@ -82,7 +84,7 @@
<master startport='4'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x2'/>
</controller>
<controller type='pci' index='0' model='pci-root'>
<controller type='pci' index='0' model='pcie-root'>
<alias name='pci.0'/>
</controller>
<controller type='virtio-serial' index='0'>
Expand Down
2 changes: 1 addition & 1 deletion roles/builder/templates/scripts/lab-destroy.j2
Expand Up @@ -6,7 +6,7 @@ do_destroy() {
for i in $($VIRSH list --all --name | grep {{vm_prefix}}); do
vbmc show -q $i &> /dev/null && vbmc -q --log-file /home/{{ virt_user }}/vbmc.log --no-daemon delete $i
$VIRSH destroy $i;
$VIRSH undefine $i;
$VIRSH undefine $i --nvram --snapshots-metadata --checkpoints-metadata;
rm -f /home/{{virt_user}}/workload/${i}*
done
{% if ansible_facts['distribution_version'] is version('8.0', 'gt', strict=False) %}
Expand Down
2 changes: 1 addition & 1 deletion roles/overcloud/templates/baremetal.json.j2
Expand Up @@ -28,7 +28,7 @@
"pm_password": "ADMIN",
"pm_addr": "192.168.122.1",
"pm_port": "{{ '%s-%s-oc-%s'|format(vm_prefix, node.1, node.0.name)|hashed_port }}",
"capabilities": "node:{{ node.1 }}-{{node.0.name}},boot_option:local,boot_mode:bios"
"capabilities": "node:{{ node.1 }}-{{node.0.name}},boot_option:local"
}{% if not loop.last %},
{% endif %}
{% set count.index = count.index+1 %}
Expand Down

0 comments on commit 426b9ef

Please sign in to comment.