Skip to content

Commit

Permalink
[libvirt_manager] Update domain.xml.j2 to support baremetal instance
Browse files Browse the repository at this point in the history
This patch:
- Adds support to enable the bootmenu
- Adds early RNG entropy[1], without this baremetal instance vms can fail
with "Jitter RNG permanent health test failure" errors [2]
- Update docs with `disk_file_name: "blank"` example using
`bootmenu_enable`

[1] https://libvirt.org/formatdomain.html#id109
[2] Jira: OSPRH-1967

Jira: OSPRH-6841
  • Loading branch information
lewisdenny authored and openshift-merge-bot[bot] committed May 12, 2024
1 parent 8960d90 commit 54701ab
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
10 changes: 10 additions & 0 deletions roles/libvirt_manager/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ cifmw_libvirt_manager_configuration:
password: (string, optional, defaults to fooBar. Root password for console access)
target: (Hypervisor hostname you want to deploy the family on. Optional)
uefi: (boolean, toggle UEFI boot. Optional, defaults to false)
bootmenu_enable: (string, toggle bootmenu. Optional, defaults to "no")
networks:
net_name: <XML definition of the network to create>
```
Expand Down Expand Up @@ -101,6 +102,15 @@ cifmw_libvirt_manager_configuration:
nets:
- public
- osp_trunk
baremetal_instance:
amount: 2
disk_file_name: "blank"
disksize: 50
memory: 8
cpus: 4
bootmenu_enable: "yes"
nets:
- public
networks:
public: |-
<network>
Expand Down
3 changes: 2 additions & 1 deletion roles/libvirt_manager/templates/domain.xml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<type arch='x86_64' machine='q35'>hvm</type>
{% endif %}
<boot dev='hd'/>
<bootmenu enable='no'/>
<bootmenu enable='{{ vm_data.value.bootmenu_enable | default('no') }}'/>
</os>
<cpu mode='host-passthrough' check='none'/>
<clock offset='utc'>
Expand Down Expand Up @@ -107,6 +107,7 @@
</memballoon>
<rng model='virtio'>
<backend model='random'>/dev/urandom</backend>
<rate bytes="1024" period="100"/>
<alias name='rng0'/>
<address type='pci'/>
</rng>
Expand Down

0 comments on commit 54701ab

Please sign in to comment.