mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
366907e520
Currently the qemu firmware code weirdly depends on the 'format' field of the nvram image itself to do the auto-selection process as well as then uses it to declare the actual type to qemu. As it's not technically required that the template and the on disk image share the type introduce a 'templateFormat' field which will split off from the shared purpose of the type and will be used for the selection and instantiation process, while 'format' will be left for the actual type of the on disk image. This patch introduces the field, adds XML infrastructure as well as plumbs it to the firmware bits. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
42 lines
1.5 KiB
XML
42 lines
1.5 KiB
XML
<domain type='kvm'>
|
|
<name>guest</name>
|
|
<uuid>63840878-0deb-4095-97e6-fc444d9bc9fa</uuid>
|
|
<memory unit='KiB'>1048576</memory>
|
|
<currentMemory unit='KiB'>1048576</currentMemory>
|
|
<vcpu placement='static'>1</vcpu>
|
|
<os firmware='efi'>
|
|
<type arch='x86_64' machine='pc-q35-4.0'>hvm</type>
|
|
<firmware>
|
|
<feature enabled='yes' name='enrolled-keys'/>
|
|
<feature enabled='yes' name='secure-boot'/>
|
|
</firmware>
|
|
<loader readonly='yes' secure='yes' type='pflash' format='qcow2'>/usr/share/edk2/ovmf/OVMF_CODE_4M.secboot.qcow2</loader>
|
|
<nvram template='/usr/share/edk2/ovmf/OVMF_VARS_4M.secboot.qcow2' templateFormat='qcow2' format='qcow2'>/var/lib/libvirt/qemu/nvram/guest_VARS.qcow2</nvram>
|
|
<boot dev='hd'/>
|
|
</os>
|
|
<features>
|
|
<acpi/>
|
|
<smm state='on'/>
|
|
</features>
|
|
<cpu mode='custom' match='exact' check='none'>
|
|
<model fallback='forbid'>qemu64</model>
|
|
</cpu>
|
|
<clock offset='utc'/>
|
|
<on_poweroff>destroy</on_poweroff>
|
|
<on_reboot>restart</on_reboot>
|
|
<on_crash>destroy</on_crash>
|
|
<devices>
|
|
<emulator>/usr/bin/qemu-system-x86_64</emulator>
|
|
<controller type='usb' index='0' model='none'/>
|
|
<controller type='sata' index='0'>
|
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
|
|
</controller>
|
|
<controller type='pci' index='0' model='pcie-root'/>
|
|
<input type='mouse' bus='ps2'/>
|
|
<input type='keyboard' bus='ps2'/>
|
|
<audio id='1' type='none'/>
|
|
<watchdog model='itco' action='reset'/>
|
|
<memballoon model='none'/>
|
|
</devices>
|
|
</domain>
|