libvirt xml: pass loader, virt machine, cpu mode
Spawning AArch64 VMs using salt.control.virt requires a few extra
domain configuration items to be configurable:
- libvirt xml: pass loader param to vm
Based on upstream commit [1].
- libvirt xml: pass virt machine type
- libvirt xml: pass cpu mode to vm
- virt module: Allow NVRAM unlinking on DOM undefine
UEFI-enabled VMs usually have pflash (NVRAM) devices attached,
which require one additional libvirt flag to be passed at 'undefine'.
This is usually the case for AArch64 (arm64) VMs, where AAVMF (AA64
UEFI) is the only supported guest bootloader.
[1] https://github.com/saltstack/salt/commit/9cace9adb
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
diff --git a/tests/pillar/control_virt_custom.sls b/tests/pillar/control_virt_custom.sls
index 061d47d..833b5a2 100644
--- a/tests/pillar/control_virt_custom.sls
+++ b/tests/pillar/control_virt_custom.sls
@@ -96,11 +96,17 @@
image: ubuntu.qcow
size: medium
img_dest: /var/lib/libvirt/ssdimages
+ machine: virt-2.11
+ cpu_mode: host-passthrough
ubuntu2:
provider: node02.domain.com
image: bubuntu.qcomw
size: small
img_dest: /var/lib/libvirt/hddimages
+ loader:
+ readonly: yes
+ type: pflash
+ path: /usr/share/AAVMF/AAVMF_CODE.fd
ubuntu3:
provider: node03.domain.com
image: meowbuntu.qcom2