feat: add QEMU software emulation fallback for VM testing
VM creation failed with "Emulator does not support virt type 'kvm'" in environments without /dev/kvm (nested VMs, CI, containers). This makes ISO boot testing work everywhere by detecting KVM at runtime. Changes: - vm/template.xml: replace hardcoded type='kvm' and cpu mode='host-passthrough' with @DOMAIN_TYPE@ and @CPU_MODE@ placeholders - run.sh vm_create(): detect /dev/kvm at runtime, use KVM + host-passthrough when available, fall back to QEMU + qemu64 software emulation when not - tests: 6 new tests covering placeholder existence, KVM detection, and substitution logic This enables the ISO to be booted and serial output captured for verification even without hardware virtualization support. 💘 Generated with Crush Assisted-by: GLM-4.7 via Crush <crush@charm.land>
This commit is contained in:
+2
-2
@@ -1,4 +1,4 @@
|
||||
<domain type='kvm'>
|
||||
<domain type='@DOMAIN_TYPE@'>
|
||||
<name>@VM_NAME@</name>
|
||||
<uuid>@VM_UUID@</uuid>
|
||||
<memory unit='MiB'>@VM_RAM@</memory>
|
||||
@@ -16,7 +16,7 @@
|
||||
<apic/>
|
||||
<smm state='on'/>
|
||||
</features>
|
||||
<cpu mode='host-passthrough' check='none'/>
|
||||
<cpu mode='@CPU_MODE@' check='none'/>
|
||||
<clock offset='utc'>
|
||||
<timer name='rtc' tickpolicy='catchup'/>
|
||||
<timer name='pit' tickpolicy='delay'/>
|
||||
|
||||
Reference in New Issue
Block a user