up libvirt copies so called master NVRAM store file either selected by the
firmware autoselection process or defined in ``qemu.conf``.
If needed, the ``template`` attribute can be used to override the
- automatically chosen NVRAM template.
+ automatically chosen NVRAM template and ``templateFormat`` to specify the
+ format for the template file (currently supported are ``raw`` and ``qcow2``).
+ When firmware auto-selection is in use the ``templateFormat`` field reflects
+ the format of the picked template. :since:`Since 10.10.0 (QEMU only)`
Note, that for transient domains if the NVRAM file has been created by
libvirt it is left behind and it is management application's responsibility
**Note:** ``network`` backed NVRAM the variables are not instantiated from
the ``template`` and it's user's responsibility to provide a valid NVRAM image.
- This element supports a ``format`` attribute, which has the same semantics
- as the attribute of the same name for the ``<loader>`` element.
- :since:`Since 9.2.0 (QEMU only)`
+ This element supports a ``format`` attribute, which specifies the format
+ of the NVRAM image. :since:`Since 9.2.0 (QEMU only)`
It is not valid to provide this element if the loader is marked as
stateless.
loader->nvramTemplate = virXMLPropString(nvramNode, "template");
+ if (virXMLPropEnumDefault(nvramNode, "templateFormat",
+ virStorageFileFormatTypeFromString, VIR_XML_PROP_NONE,
+ &format, VIR_STORAGE_FILE_NONE) < 0) {
+ return -1;
+ }
+ loader->nvramTemplateFormat = format;
+
+ if (loader->nvramTemplateFormat != VIR_STORAGE_FILE_NONE &&
+ loader->nvramTemplateFormat != VIR_STORAGE_FILE_RAW &&
+ loader->nvramTemplateFormat != VIR_STORAGE_FILE_QCOW2) {
+ virReportError(VIR_ERR_XML_ERROR,
+ _("Unsupported nvram template format '%1$s'"),
+ virStorageFileFormatTypeToString(loader->nvramTemplateFormat));
+ return -1;
+ }
+
if (virXMLPropEnumDefault(nvramNode, "format",
virStorageFileFormatTypeFromString, VIR_XML_PROP_NONE,
&format, VIR_STORAGE_FILE_NONE) < 0) {
virBufferEscapeString(&attrBuf, " template='%s'", loader->nvramTemplate);
+ if (loader->nvramTemplateFormat > VIR_STORAGE_FILE_NONE) {
+ virBufferAsprintf(&attrBuf, " templateFormat='%s'",
+ virStorageFileFormatTypeToString(loader->nvramTemplateFormat));
+ }
+
if (loader->nvram) {
virStorageSource *src = loader->nvram;
virStorageSource *nvram;
bool newStyleNVRAM;
char *nvramTemplate; /* user override of path to master nvram */
+ virStorageFileFormat nvramTemplateFormat;
};
virDomainLoaderDef *virDomainLoaderDefNew(void);
<attribute name="template">
<ref name="absFilePath"/>
</attribute>
+ <optional>
+ <attribute name="templateFormat">
+ <ref name="pflashFormatTypes"/>
+ </attribute>
+ </optional>
</optional>
<optional>
<ref name="pflashFormat"/>
</element>
</define>
+ <define name="pflashFormatTypes">
+ <choice>
+ <value>raw</value>
+ <value>qcow2</value>
+ </choice>
+ </define>
+
<define name="pflashFormat">
<attribute name="format">
- <choice>
- <value>raw</value>
- <value>qcow2</value>
- </choice>
+ <ref name="pflashFormatTypes"/>
</attribute>
</define>
loader->nvram = virStorageSourceNew();
loader->nvram->type = VIR_STORAGE_TYPE_FILE;
- loader->nvram->format = loader->format;
+
+ /* The nvram template format should be always present but as a failsafe,
+ * duplicate the loader format if it is not available. */
+ if (loader->nvramTemplateFormat > VIR_STORAGE_FILE_NONE)
+ loader->nvram->format = loader->nvramTemplateFormat;
+ else
+ loader->nvram->format = loader->format;
if (loader->nvram->format == VIR_STORAGE_FILE_RAW) {
/* The extension used by raw edk2 builds has historically
* We can't create or reset non-local NVRAM files, so filling
* in nvramTemplate for those would be misleading */
VIR_FREE(loader->nvramTemplate);
- if (!loader->nvram ||
- (loader->nvram && virStorageSourceIsLocalStorage(loader->nvram))) {
+ loader->nvramTemplateFormat = VIR_STORAGE_FILE_NONE;
+
+ if (!loader->nvram || virStorageSourceIsLocalStorage(loader->nvram)) {
+ /* validation when parsing the JSON files ensures that we get
+ * only 'raw' and 'qcow2' here. Fall back to sharing format with loader */
+ if (flash->nvram_template.format)
+ loader->nvramTemplateFormat = virStorageFileFormatTypeFromString(flash->nvram_template.format);
+ else
+ loader->nvramTemplateFormat = loader->format;
+
loader->nvramTemplate = g_strdup(flash->nvram_template.filename);
}
}
loader->format = VIR_STORAGE_FILE_RAW;
/* Only use the default template path if one hasn't been
- * provided by the user.
+ * provided by the user. Assume that the template is in 'raw' format.
*
* In addition to fully-custom templates, which are a valid
* use case, we could simply be in a situation where
* In this case, the global default is to have Secure Boot
* disabled, but the domain configuration explicitly enables
* it, and we shouldn't overrule this choice */
- if (!loader->nvramTemplate)
+ if (!loader->nvramTemplate) {
loader->nvramTemplate = g_strdup(cfg->firmwares[i]->nvram);
+ loader->nvramTemplateFormat = VIR_STORAGE_FILE_RAW;
+ }
+
+ if (loader->nvramTemplateFormat == VIR_STORAGE_FILE_NONE)
+ loader->nvramTemplateFormat = VIR_STORAGE_FILE_RAW;
VIR_DEBUG("decided on firmware '%s' template '%s'",
loader->path, NULLSTR(loader->nvramTemplate));
<feature enabled='no' name='secure-boot'/>
</firmware>
<loader readonly='yes' type='pflash'>/usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.raw</loader>
- <nvram template='/usr/share/edk2/aarch64/vars-template-pflash.raw'>/path/to/guest_VARS.raw</nvram>
+ <nvram template='/usr/share/edk2/aarch64/vars-template-pflash.raw' templateFormat='raw'>/path/to/guest_VARS.raw</nvram>
<boot dev='hd'/>
</os>
<features>
<feature enabled='no' name='secure-boot'/>
</firmware>
<loader readonly='yes' type='pflash'>/usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.raw</loader>
- <nvram template='/usr/share/edk2/aarch64/vars-template-pflash.raw'>/path/to/guest_VARS.raw</nvram>
+ <nvram template='/usr/share/edk2/aarch64/vars-template-pflash.raw' templateFormat='raw'>/path/to/guest_VARS.raw</nvram>
<boot dev='hd'/>
</os>
<features>
<feature enabled='no' name='secure-boot'/>
</firmware>
<loader readonly='yes' type='pflash'>/usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.raw</loader>
- <nvram template='/usr/share/edk2/aarch64/vars-template-pflash.raw'>/path/to/guest_VARS.raw</nvram>
+ <nvram template='/usr/share/edk2/aarch64/vars-template-pflash.raw' templateFormat='raw'>/path/to/guest_VARS.raw</nvram>
<boot dev='hd'/>
</os>
<features>
<feature enabled='no' name='secure-boot'/>
</firmware>
<loader readonly='yes' type='pflash' format='qcow2'>/usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.qcow2</loader>
- <nvram template='/usr/share/edk2/aarch64/vars-template-pflash.qcow2' format='qcow2'>/var/lib/libvirt/qemu/nvram/guest_VARS.qcow2</nvram>
+ <nvram template='/usr/share/edk2/aarch64/vars-template-pflash.qcow2' templateFormat='qcow2' format='qcow2'>/var/lib/libvirt/qemu/nvram/guest_VARS.qcow2</nvram>
<boot dev='hd'/>
</os>
<features>
<feature enabled='no' name='secure-boot'/>
</firmware>
<loader readonly='yes' type='pflash'>/usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.raw</loader>
- <nvram template='/usr/share/edk2/aarch64/vars-template-pflash.raw'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
+ <nvram template='/usr/share/edk2/aarch64/vars-template-pflash.raw' templateFormat='raw'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<features>
<feature enabled='yes' name='secure-boot'/>
</firmware>
<loader readonly='yes' secure='yes' type='pflash'>/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd</loader>
- <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.secboot.fd'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
+ <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.secboot.fd' templateFormat='raw'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<features>
<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' format='qcow2'>/path/to/guest_VARS.qcow2</nvram>
+ <nvram template='/usr/share/edk2/ovmf/OVMF_VARS_4M.secboot.qcow2' templateFormat='qcow2' format='qcow2'>/path/to/guest_VARS.qcow2</nvram>
<boot dev='hd'/>
</os>
<features>
<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' format='qcow2'>/var/lib/libvirt/qemu/nvram/guest_VARS.qcow2</nvram>
+ <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>
<feature enabled='no' name='secure-boot'/>
</firmware>
<loader readonly='yes' type='pflash'>/usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.raw</loader>
- <nvram template='/usr/share/edk2/aarch64/vars-template-pflash.raw'>/var/lib/libvirt/qemu/nvram/guest_VARS.raw</nvram>
+ <nvram template='/usr/share/edk2/aarch64/vars-template-pflash.raw' templateFormat='raw'>/var/lib/libvirt/qemu/nvram/guest_VARS.raw</nvram>
<boot dev='hd'/>
</os>
<features>
<feature enabled='no' name='secure-boot'/>
</firmware>
<loader readonly='yes' type='pflash'>/usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.raw</loader>
- <nvram template='/usr/share/edk2/aarch64/vars-template-pflash.raw'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
+ <nvram template='/usr/share/edk2/aarch64/vars-template-pflash.raw' templateFormat='raw'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<features>
<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' format='qcow2'>/path/to/guest_VARS.qcow2</nvram>
+ <nvram template='/usr/share/edk2/ovmf/OVMF_VARS_4M.secboot.qcow2' templateFormat='qcow2' format='qcow2'>/path/to/guest_VARS.qcow2</nvram>
<boot dev='hd'/>
</os>
<features>
<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' format='qcow2'>/var/lib/libvirt/qemu/nvram/guest_VARS.qcow2</nvram>
+ <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>
<feature enabled='no' name='secure-boot'/>
</firmware>
<loader readonly='yes' secure='no' type='pflash'>/usr/share/edk2/ovmf/OVMF_CODE.fd</loader>
- <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.fd'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
+ <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.fd' templateFormat='raw'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<features>
<feature enabled='no' name='secure-boot'/>
</firmware>
<loader readonly='yes' type='pflash'>/usr/share/edk2/ovmf/OVMF_CODE.fd</loader>
- <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.fd'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
+ <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.fd' templateFormat='raw'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<features>
<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' format='qcow2'>/var/lib/libvirt/qemu/nvram/guest_VARS.qcow2</nvram>
+ <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>
<feature enabled='yes' name='secure-boot'/>
</firmware>
<loader readonly='yes' secure='yes' type='pflash'>/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd</loader>
- <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.secboot.fd'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
+ <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.secboot.fd' templateFormat='raw'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<features>
<feature enabled='no' name='secure-boot'/>
</firmware>
<loader readonly='yes' type='pflash'>/usr/share/edk2/loongarch64/QEMU_EFI.fd</loader>
- <nvram template='/usr/share/edk2/loongarch64/QEMU_VARS.fd'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
+ <nvram template='/usr/share/edk2/loongarch64/QEMU_VARS.fd' templateFormat='raw'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<features>
<feature enabled='no' name='secure-boot'/>
</firmware>
<loader readonly='yes' type='pflash'>/usr/share/edk2/loongarch64/QEMU_EFI.fd</loader>
- <nvram template='/usr/share/edk2/loongarch64/QEMU_VARS.fd'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
+ <nvram template='/usr/share/edk2/loongarch64/QEMU_VARS.fd' templateFormat='raw'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<features>
<feature enabled='yes' name='secure-boot'/>
</firmware>
<loader readonly='yes' secure='yes' type='pflash'>/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd</loader>
- <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.fd'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
+ <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.fd' templateFormat='raw'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<features>
<feature enabled='no' name='secure-boot'/>
</firmware>
<loader readonly='yes' type='pflash'>/usr/share/edk2/ovmf/OVMF_CODE.fd</loader>
- <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.fd'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
+ <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.fd' templateFormat='raw'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<features>
<feature enabled='no' name='secure-boot'/>
</firmware>
<loader readonly='yes' type='pflash'>/usr/share/edk2/ovmf/OVMF_CODE.fd</loader>
- <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.fd' type='file'>
+ <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.fd' templateFormat='raw' type='file'>
<source file='/path/to/guest_VARS.fd'/>
</nvram>
<boot dev='hd'/>
<feature enabled='yes' name='secure-boot'/>
</firmware>
<loader readonly='yes' secure='yes' type='pflash'>/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd</loader>
- <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.secboot.fd'>/path/to/guest_VARS.fd</nvram>
+ <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.secboot.fd' templateFormat='raw'>/path/to/guest_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<features>
<feature enabled='yes' name='secure-boot'/>
</firmware>
<loader readonly='yes' secure='yes' type='pflash'>/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd</loader>
- <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.fd'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
+ <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.fd' templateFormat='raw'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<features>
<feature enabled='no' name='secure-boot'/>
</firmware>
<loader readonly='yes' type='pflash' format='qcow2'>/usr/share/edk2/riscv/RISCV_VIRT_CODE.qcow2</loader>
- <nvram template='/usr/share/edk2/riscv/RISCV_VIRT_VARS.qcow2' format='qcow2'>/var/lib/libvirt/qemu/nvram/guest_VARS.qcow2</nvram>
+ <nvram template='/usr/share/edk2/riscv/RISCV_VIRT_VARS.qcow2' templateFormat='qcow2' format='qcow2'>/var/lib/libvirt/qemu/nvram/guest_VARS.qcow2</nvram>
<boot dev='hd'/>
</os>
<cpu mode='custom' match='exact' check='none'>
<feature enabled='yes' name='secure-boot'/>
</firmware>
<loader readonly='yes' secure='yes' type='pflash'>/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd</loader>
- <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.secboot.fd'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
+ <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.secboot.fd' templateFormat='raw'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<features>
<feature enabled='no' name='secure-boot'/>
</firmware>
<loader readonly='yes' type='pflash'>/usr/share/edk2/ovmf/OVMF_CODE.fd</loader>
- <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.fd'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
+ <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.fd' templateFormat='raw'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<features>
<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' format='qcow2'>/var/lib/libvirt/qemu/nvram/guest_VARS.qcow2</nvram>
+ <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>
<feature enabled='yes' name='secure-boot'/>
</firmware>
<loader readonly='yes' secure='yes' type='pflash'>/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd</loader>
- <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.secboot.fd'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
+ <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.secboot.fd' templateFormat='raw'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<features>
<os>
<type arch='aarch64' machine='virt-4.0'>hvm</type>
<loader readonly='yes' type='pflash'>/usr/share/AAVMF/AAVMF_CODE.fd</loader>
- <nvram template='/usr/share/AAVMF/AAVMF_VARS.fd'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
+ <nvram template='/usr/share/AAVMF/AAVMF_VARS.fd' templateFormat='raw'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<features>
<feature enabled='no' name='secure-boot'/>
</firmware>
<loader readonly='yes' type='pflash'>/usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.raw</loader>
- <nvram template='/usr/share/edk2/aarch64/vars-template-pflash.raw'>/path/to/guest_VARS.raw</nvram>
+ <nvram template='/usr/share/edk2/aarch64/vars-template-pflash.raw' templateFormat='raw'>/path/to/guest_VARS.raw</nvram>
<boot dev='hd'/>
</os>
<features>
<feature enabled='no' name='secure-boot'/>
</firmware>
<loader readonly='yes' type='pflash'>/usr/share/edk2/ovmf/OVMF_CODE.fd</loader>
- <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.fd'>/path/to/guest_VARS.fd</nvram>
+ <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.fd' templateFormat='raw'>/path/to/guest_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<features>
<feature enabled='no' name='secure-boot'/>
</firmware>
<loader readonly='yes' type='pflash'>/usr/share/edk2/ovmf/OVMF_CODE.fd</loader>
- <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.fd'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
+ <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.fd' templateFormat='raw'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<features>
<feature enabled='yes' name='secure-boot'/>
</firmware>
<loader readonly='yes' secure='yes' type='pflash'>/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd</loader>
- <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.secboot.fd'>/path/to/guest_VARS.fd</nvram>
+ <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.secboot.fd' templateFormat='raw'>/path/to/guest_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<features>
<os>
<type arch='x86_64' machine='pc-q35-4.0'>hvm</type>
<loader readonly='yes' secure='yes' type='pflash'>/usr/share/OVMF/OVMF_CODE.secboot.fd</loader>
- <nvram template='/usr/share/OVMF/OVMF_VARS.fd'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
+ <nvram template='/usr/share/OVMF/OVMF_VARS.fd' templateFormat='raw'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<features>
<feature enabled='yes' name='secure-boot'/>
</firmware>
<loader readonly='yes' secure='yes' type='pflash'>/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd</loader>
- <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.fd'>/path/to/guest_VARS.fd</nvram>
+ <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.fd' templateFormat='raw'>/path/to/guest_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<features>
<os>
<type arch='x86_64' machine='pc-q35-4.0'>hvm</type>
<loader readonly='yes' type='pflash'>/usr/share/OVMF/OVMF_CODE.fd</loader>
- <nvram template='/usr/share/OVMF/OVMF_VARS.fd'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
+ <nvram template='/usr/share/OVMF/OVMF_VARS.fd' templateFormat='raw'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<features>
<feature enabled='no' name='secure-boot'/>
</firmware>
<loader readonly='yes' type='pflash'>/usr/share/edk2/ovmf/OVMF_CODE.fd</loader>
- <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.fd'>/path/to/guest_VARS.fd</nvram>
+ <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.fd' templateFormat='raw'>/path/to/guest_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<features>
<feature enabled='no' name='secure-boot'/>
</firmware>
<loader readonly='yes' type='pflash'>/usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.raw</loader>
- <nvram template='/usr/share/edk2/aarch64/vars-template-pflash.raw'>/path/to/guest_VARS.raw</nvram>
+ <nvram template='/usr/share/edk2/aarch64/vars-template-pflash.raw' templateFormat='raw'>/path/to/guest_VARS.raw</nvram>
<boot dev='hd'/>
</os>
<features>
<feature enabled='no' name='secure-boot'/>
</firmware>
<loader readonly='yes' type='pflash'>/usr/share/edk2/ovmf/OVMF_CODE.fd</loader>
- <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.fd' type='file'>
+ <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.fd' templateFormat='raw' type='file'>
<source file='/path/to/guest_VARS.fd'/>
</nvram>
<boot dev='hd'/>
<feature enabled='no' name='secure-boot'/>
</firmware>
<loader readonly='yes' type='pflash'>/usr/share/edk2/ovmf/OVMF_CODE.fd</loader>
- <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.fd'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
+ <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.fd' templateFormat='raw'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<features>
<os>
<type arch='x86_64' machine='pc-q35-4.0'>hvm</type>
<loader readonly='yes' secure='yes' type='pflash'>/usr/share/OVMF/OVMF_CODE.secboot.fd</loader>
- <nvram template='/usr/share/OVMF/OVMF_VARS.secboot.fd'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
+ <nvram template='/usr/share/OVMF/OVMF_VARS.secboot.fd' templateFormat='raw'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<features>
<feature enabled='yes' name='secure-boot'/>
</firmware>
<loader readonly='yes' secure='yes' type='pflash'>/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd</loader>
- <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.secboot.fd'>/path/to/guest_VARS.fd</nvram>
+ <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.secboot.fd' templateFormat='raw'>/path/to/guest_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<features>
<feature enabled='no' name='secure-boot'/>
</firmware>
<loader readonly='yes' type='pflash'>/usr/share/edk2/ovmf/OVMF_CODE.fd</loader>
- <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.fd'>/path/to/guest_VARS.fd</nvram>
+ <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.fd' templateFormat='raw'>/path/to/guest_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<features>
<feature enabled='no' name='secure-boot'/>
</firmware>
<loader readonly='yes' type='pflash'>/usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.raw</loader>
- <nvram template='/usr/share/edk2/aarch64/vars-template-pflash.raw'>/var/lib/libvirt/qemu/nvram/test_VARS.fd</nvram>
+ <nvram template='/usr/share/edk2/aarch64/vars-template-pflash.raw' templateFormat='raw'>/var/lib/libvirt/qemu/nvram/test_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<features>
<feature enabled='yes' name='secure-boot'/>
</firmware>
<loader readonly='yes' secure='yes' type='pflash'>/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd</loader>
- <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.secboot.fd'>/var/lib/libvirt/qemu/nvram/test_VARS.fd</nvram>
+ <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.secboot.fd' templateFormat='raw'>/var/lib/libvirt/qemu/nvram/test_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<features>
<feature enabled='no' name='secure-boot'/>
</firmware>
<loader readonly='yes' type='pflash'>/usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.raw</loader>
- <nvram template='/usr/share/edk2/aarch64/vars-template-pflash.raw'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
+ <nvram template='/usr/share/edk2/aarch64/vars-template-pflash.raw' templateFormat='raw'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<features>
<feature enabled='no' name='secure-boot'/>
</firmware>
<loader readonly='yes' type='pflash'>/usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.raw</loader>
- <nvram template='/usr/share/edk2/aarch64/vars-template-pflash.raw'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
+ <nvram template='/usr/share/edk2/aarch64/vars-template-pflash.raw' templateFormat='raw'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<features>
<feature enabled='no' name='secure-boot'/>
</firmware>
<loader readonly='yes' type='pflash'>/usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.raw</loader>
- <nvram template='/usr/share/edk2/aarch64/vars-template-pflash.raw'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
+ <nvram template='/usr/share/edk2/aarch64/vars-template-pflash.raw' templateFormat='raw'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<features>