fix: configurable OVMF/machine type, routes syntax, package lists, interface names
This commit is contained in:
@@ -11,6 +11,10 @@ virtualization_libvirt_cloudinit_path: >-
|
||||
{{ [virtualization_libvirt_image_dir, hostname ~ '-cloudinit.iso'] | ansible.builtin.path_join }}
|
||||
virtualization_xen_disk_path: /var/lib/xen/images
|
||||
|
||||
virtualization_libvirt_machine_type: q35
|
||||
virtualization_libvirt_ovmf_code: /usr/share/edk2/x64/OVMF_CODE.secboot.4m.fd
|
||||
virtualization_libvirt_ovmf_vars: /usr/share/edk2/x64/OVMF_VARS.4m.fd
|
||||
|
||||
virtualization_tpm2_enabled: >-
|
||||
{{
|
||||
(system_cfg.luks.enabled | bool)
|
||||
|
||||
@@ -13,7 +13,9 @@ network:
|
||||
addresses:
|
||||
- "{{ iface.ip }}/{{ iface.prefix }}"
|
||||
{% if iface.gateway | default('') | string | length %}
|
||||
gateway4: "{{ iface.gateway }}"
|
||||
routes:
|
||||
- to: default
|
||||
via: "{{ iface.gateway }}"
|
||||
{% endif %}
|
||||
{% else %}
|
||||
dhcp4: true
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
{% if system_cfg.balloon is defined and system_cfg.balloon | int > 0 %}<currentMemory>{{ system_cfg.balloon | int * 1024 }}</currentMemory>{% endif %}
|
||||
<vcpu placement='static'>{{ system_cfg.cpus }}</vcpu>
|
||||
<os>
|
||||
<type arch='x86_64' machine="pc-q35-8.0">hvm</type>
|
||||
<type arch='x86_64' machine="{{ virtualization_libvirt_machine_type }}">hvm</type>
|
||||
<bootmenu enable='no'/>
|
||||
<boot dev='hd'/>
|
||||
<boot dev='cdrom'/>
|
||||
<loader readonly="yes" type="pflash">/usr/share/edk2/x64/OVMF_CODE.secboot.4m.fd</loader>
|
||||
<nvram template="/usr/share/edk2/x64/OVMF_VARS.4m.fd"/>
|
||||
<loader readonly="yes" type="pflash">{{ virtualization_libvirt_ovmf_code }}</loader>
|
||||
<nvram template="{{ virtualization_libvirt_ovmf_vars }}"/>
|
||||
</os>
|
||||
<features>
|
||||
<acpi/>
|
||||
|
||||
Reference in New Issue
Block a user