refactor(vars): add system/hypervisor dict inputs

This commit is contained in:
2026-02-11 05:37:18 +01:00
parent c4c96dbfb5
commit fc05708466
62 changed files with 2422 additions and 871 deletions

View File

@@ -1,8 +1,8 @@
<domain type='kvm'>
<name>{{ hostname }}</name>
<memory>{{ vm_memory | int * 1024 }}</memory>
{% if vm_ballo is defined and vm_ballo | int > 0 %}<currentMemory>{{ vm_ballo | int * 1024 }}</currentMemory>{% endif %}
<vcpu placement='static'>{{ vm_cpus }}</vcpu>
<memory>{{ system_cfg.memory_mb | int * 1024 }}</memory>
{% if system_cfg.balloon_mb is defined and system_cfg.balloon_mb | int > 0 %}<currentMemory>{{ system_cfg.balloon_mb | int * 1024 }}</currentMemory>{% endif %}
<vcpu placement='static'>{{ system_cfg.cpus }}</vcpu>
<os>
<type arch='x86_64' machine="pc-q35-8.0">hvm</type>
<bootmenu enable='no'/>
@@ -22,11 +22,13 @@
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
{% for disk in virtualization_libvirt_disks | default([]) %}
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='{{ virtualization_libvirt_disk_path }}'/>
<target dev='vda' bus='virtio'/>
<driver name='qemu' type='{{ disk.format }}'/>
<source file='{{ disk.path }}'/>
<target dev='{{ disk.target }}' bus='{{ disk.bus }}'/>
</disk>
{% endfor %}
<disk type="file" device="cdrom">
<driver name="qemu" type="raw"/>
<source file="{{ boot_iso }}"/>