Compare commits

...

22 Commits

Author SHA1 Message Date
Andrea Bolognani
07b6189ef4 NEWS: Mention fixes to firmware selection
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-08-21 13:51:38 +02:00
Andrea Bolognani
7c328b6cf4 tests: Reintroduce firmware-auto-efi-format-mismatch
Since the previous version of this negative test now passes,
create a new version that still triggers the intended failure.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-08-21 13:51:37 +02:00
Andrea Bolognani
48e5fe7af4 tests: Rename firmware-auto-efi-format-loader-qcow2-nvram-path
Now that, after the recent changes, the test passes, its old
name is no longer accurate.

While at it, enable the xml2xml part for it as well.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-08-21 13:51:35 +02:00
Andrea Bolognani
10a8997cbb conf: Don't default to raw format for loader/NVRAM
Due to the way the information is stored by the XML parser, we've
had this quirk where specifying any information about the loader
or NVRAM would implicitly set its format to raw. That is,

  <nvram>/path/to/guest_VARS.fd</nvram>

would effectively be interpreted as

  <nvram format='raw'>/path/to/guest_VARS.fd</nvram>

forcing the use of raw format firmware even when qcow2 format
would normally be preferred based on the ordering of firmware
descriptors. This behavior can be worked around in a number of
ways, but it's fairly unintuitive.

In order to remove this quirk, move the selection of the default
firmware format from the parser down to the individual drivers.

Most drivers only support raw firmware images, so they can
unconditionally set the format early and be done with it; the
QEMU driver, however, supports multiple formats and so in that
case we want this default to be applied as late as possible,
when we have already ruled out the possibility of using qcow2
formatted firmware images.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-08-21 13:51:34 +02:00
Andrea Bolognani
b845e376a4 qemu: Match NVRAM template extension for new domains
Keep things consistent by using the same file extension for the
generated NVRAM path as the NVRAM template.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-08-21 13:51:32 +02:00
Andrea Bolognani
e96e322725 qemu: Filter firmware based on loader.readonly
If the user included loader.readonly=no in the domain XML, we
should not pick a firmware build that expects to work with
loader.readonly=yes.

https://bugzilla.redhat.com/show_bug.cgi?id=2196178

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-08-21 13:51:31 +02:00
Andrea Bolognani
ccbb987707 qemu: Generate NVRAM path in more cases
Right now, we only generate it after finding a matching entry
either among firmware descriptors or in the legacy firmware
list.

Even if the domain is configured to use a custom firmware build
that we know nothing about, however, we should still automatically
generate the NVRAM path instead of requiring the user to provide
it manually.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-08-21 13:51:30 +02:00
Andrea Bolognani
4a49114ff4 qemu: Don't overwrite NVRAM template for legacy firmware
Just because we have found a matching entry, it doesn't mean
that we should discard the information explicitly provided in
the domain XML.

https://bugzilla.redhat.com/show_bug.cgi?id=2196178
https://gitlab.com/libvirt/libvirt/-/issues/500

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-08-21 13:51:28 +02:00
Andrea Bolognani
1b3e9c67e3 tests: Include microvm in firmwaretest
libvirt doesn't really support the microvm machine type, but
it can parse the firmware descriptor just fine.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-08-21 13:51:27 +02:00
Andrea Bolognani
da6b98394b tests: Drop tags from BIOS firmware descriptor
They aren't used for anything.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-08-21 13:51:26 +02:00
Andrea Bolognani
a97c56888c tests: Update firmware descriptor files
These are imported from Fedora 38's edk2 package.

The files that are being replaced date back to RHEL 7 and no
longer represent what libvirt is likely to encounter on an
actual production system.

Notably, the paths have all changed, with both x86_64 and
aarch64 builds now living under /usr/share/edk2 and the AAVMF
name being having been phased out.

Additionally, the 4MB qcow2 format builds have been introduced
on x86_64 and given high priority, effectively making qcow2
the default format across architectures.

The impact of these changes on the test suite is, predictably,
quite severe.

For the cases where paths to firmware files were explicitly
provided as part of the input, they have been adjusted so that
the modern paths are used instead of the legacy ones. Other
than that, input files have been left untouched.

The following expected changes can be seen in output files:

  * where qcow2 firmware was used on x86_64, Secure Boot
    support is now enabled;

  * all ABI_UPDATE test cases for x86_64 now use qcow2
    formatted firmware;

  * test cases where legacy paths were manually provided
    no longer get additional information about the firmware
    added to the output XML.

Some of the changes described above highlight why, in order
to guarantee a stable guest ABI over time and regardless of
changes to the host's configuration, it was necessary to move
firmware selection from VM startup time to VM creation time.

In a few cases, updating the firmware descriptors changes the
behavior in a way that's undesired and uncovers latent bugs
in libvirt:

  * firmware-manual-efi-secboot-legacy-paths ends up with
    Secure Boot disabled, despite the input XML specifically
    requesting it to be enabled;

  * firmware-manual-efi-rw-modern-paths loses the
    loader.readonly=no part of the configuration and starts
    using an NVRAM file;

  * firmware-manual-efi-nvram-template-nonstandard starts
    failing altogether with a fairly obscure error message.

We're going to address all these issues with upcoming changes.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-08-21 13:51:24 +02:00
Andrea Bolognani
e930f62a02 tests: Add more tests for firmware selection
Most of these are just additional coverage, but a few demonstrate
bugs in libvirt:

  * firmware-manual-efi-nvram-template-nonstandard sees the NVRAM
    template path, which was explicitly provided in the XML,
    being overridden by the firmware selection machinery;

  * firmware-auto-efi-rw* and firmware-manual-efi-rw-legacy-paths
    lose the loader.readonly=no setting and thus behave
    differently than requested;

  * firmware-manual-efi-loader-path-nonstandard fails because an
    NVRAM path doesn't get generated.

We're going to address all these issues with upcoming changes.

Note that the firmware-auto-efi-nvram-template-nonstandard
failure is expected: firmware autoselection has been enabled, but
the NVRAM template points to a custom path that's not mentioned
in any of the firmware descriptors and so it can't succeed.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-08-21 13:51:23 +02:00
Andrea Bolognani
87d91e9e24 tests: Add some more DO_TEST*ABI_UPDATE* macros
These are going to be useful later.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-08-21 13:51:21 +02:00
Andrea Bolognani
ac76386eda qemu: Fix lookup against stateless/combined pflash
Just like the more common split builds, these are of type
QEMU_FIRMWARE_DEVICE_FLASH; however, they have no associated
NVRAM template, so we can't access the corresponding structure
member unconditionally or we'll trigger a crash.

https://bugzilla.redhat.com/show_bug.cgi?id=2196178

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-08-21 13:51:20 +02:00
Andrea Bolognani
d917883b30 qemu: Fix return value for qemuFirmwareFillDomainLegacy()
The documentation states that, just like the Modern() variant,
this function should return 1 if a match wasn't found. It
currently doesn't do that, and returns 0 instead.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-08-21 13:51:19 +02:00
Andrea Bolognani
4ba04107d9 tests: Rename firmware-auto-efi-nvram-path
The new name better describes the test scenario and will fit
better with the additional tests that we're about to introduce.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-08-21 13:51:17 +02:00
Andrea Bolognani
8627ec167c tests: Turn abi-update.xml into a symlink
Since the idea behind introducing the abi-update variant of
a test is showing that libvirt behaves differently based on
whether the configuration is for a newly-defined domain or an
existing one, we don't want the input files to ever go out of
sync.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-08-21 13:51:16 +02:00
Andrea Bolognani
1773526224 tests: Consistently use /path/to/guest_VARS.fd
That's what we already use in almost all cases.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-08-21 13:51:15 +02:00
Andrea Bolognani
5c129c8e7a tests: Use virt-4.0 machine type for aarch64
Using the unversioned machine type means that firmware
descriptors can't be used to discover additional information
about the chosen firmware build.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-08-21 13:51:13 +02:00
Andrea Bolognani
8c326914d8 tests: Switch to firmware autoselection for hvf
Firmware selection is not relevant to these tests, so adopt
the most convenient approach.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-08-21 13:51:06 +02:00
Andrea Bolognani
751b0e6dbf tests: Use DO_TEST_CAPS_*_ABI_UPDATE() for ppc64
We have a number of tests that can benefit from this macro
instead of open-coding it.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-08-21 13:50:53 +02:00
Peter Krempa
a771d7a5da test: qemu: Update qemu-8.1 test data on x86_64
Update to v8.1.0-rc4

Notable changes:
 - 'dirty-limit' migration feature added
    - 'vcpu-dirty-limit', 'x-vcpu-dirty-limit-period' parameters added
    - 'dirty-limit-ring-full-time', 'dirty-limit-throttle-time-per-round' statistics added
 - migration statistic of number of skipped zero pages is now deprecated

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2023-08-21 13:02:40 +02:00
198 changed files with 1995 additions and 358 deletions

View File

@ -21,6 +21,12 @@ v9.7.0 (unreleased)
* **Bug fixes** * **Bug fixes**
* qemu: Various fixes to firmware selection
The changes made to firmware selection in libvirt 9.2.0 have unfortunately
introduced a number of regressions. All known issues in this area have now
been resolved.
v9.6.0 (2023-08-01) v9.6.0 (2023-08-01)
=================== ===================

View File

@ -80,6 +80,9 @@ bhyveFirmwareFillDomain(bhyveConn *driver,
if (!def->os.loader) if (!def->os.loader)
def->os.loader = virDomainLoaderDefNew(); def->os.loader = virDomainLoaderDefNew();
if (!def->os.loader->format)
def->os.loader->format = VIR_STORAGE_FILE_RAW;
if (def->os.loader->format != VIR_STORAGE_FILE_RAW) { if (def->os.loader->format != VIR_STORAGE_FILE_RAW) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unsupported loader format '%1$s'"), _("Unsupported loader format '%1$s'"),

View File

@ -3728,7 +3728,6 @@ virDomainLoaderDefNew(void)
virDomainLoaderDef *def = NULL; virDomainLoaderDef *def = NULL;
def = g_new0(virDomainLoaderDef, 1); def = g_new0(virDomainLoaderDef, 1);
def->format = VIR_STORAGE_FILE_RAW;
return def; return def;
} }
@ -16771,10 +16770,11 @@ virDomainLoaderDefParseXMLNvram(virDomainLoaderDef *loader,
if (virXMLPropEnumDefault(nvramNode, "format", if (virXMLPropEnumDefault(nvramNode, "format",
virStorageFileFormatTypeFromString, VIR_XML_PROP_NONE, virStorageFileFormatTypeFromString, VIR_XML_PROP_NONE,
&format, VIR_STORAGE_FILE_RAW) < 0) { &format, VIR_STORAGE_FILE_NONE) < 0) {
return -1; return -1;
} }
if (format != VIR_STORAGE_FILE_RAW && if (format &&
format != VIR_STORAGE_FILE_RAW &&
format != VIR_STORAGE_FILE_QCOW2) { format != VIR_STORAGE_FILE_QCOW2) {
virReportError(VIR_ERR_XML_ERROR, virReportError(VIR_ERR_XML_ERROR,
_("Unsupported nvram format '%1$s'"), _("Unsupported nvram format '%1$s'"),
@ -16860,10 +16860,11 @@ virDomainLoaderDefParseXMLLoader(virDomainLoaderDef *loader,
if (virXMLPropEnumDefault(loaderNode, "format", if (virXMLPropEnumDefault(loaderNode, "format",
virStorageFileFormatTypeFromString, VIR_XML_PROP_NONE, virStorageFileFormatTypeFromString, VIR_XML_PROP_NONE,
&format, VIR_STORAGE_FILE_RAW) < 0) { &format, VIR_STORAGE_FILE_NONE) < 0) {
return -1; return -1;
} }
if (format != VIR_STORAGE_FILE_RAW && if (format &&
format != VIR_STORAGE_FILE_RAW &&
format != VIR_STORAGE_FILE_QCOW2) { format != VIR_STORAGE_FILE_QCOW2) {
virReportError(VIR_ERR_XML_ERROR, virReportError(VIR_ERR_XML_ERROR,
_("Unsupported loader format '%1$s'"), _("Unsupported loader format '%1$s'"),
@ -16894,7 +16895,9 @@ virDomainLoaderDefParseXML(virDomainLoaderDef *loader,
loaderNode) < 0) loaderNode) < 0)
return -1; return -1;
if (loader->nvram && loader->format != loader->nvram->format) { if (loader->nvram &&
loader->format && loader->nvram->format &&
loader->format != loader->nvram->format) {
virReportError(VIR_ERR_XML_ERROR, virReportError(VIR_ERR_XML_ERROR,
_("Format mismatch: loader.format='%1$s' nvram.format='%2$s'"), _("Format mismatch: loader.format='%1$s' nvram.format='%2$s'"),
virStorageFileFormatTypeToString(loader->format), virStorageFileFormatTypeToString(loader->format),
@ -26224,7 +26227,8 @@ virDomainLoaderDefFormatNvram(virBuffer *buf,
return -1; return -1;
} }
if (src->format != VIR_STORAGE_FILE_RAW) { if (src->format &&
src->format != VIR_STORAGE_FILE_RAW) {
virBufferEscapeString(&attrBuf, " format='%s'", virBufferEscapeString(&attrBuf, " format='%s'",
virStorageFileFormatTypeToString(src->format)); virStorageFileFormatTypeToString(src->format));
} }
@ -26262,7 +26266,8 @@ virDomainLoaderDefFormat(virBuffer *buf,
virTristateBoolTypeToString(loader->stateless)); virTristateBoolTypeToString(loader->stateless));
} }
if (loader->format != VIR_STORAGE_FILE_RAW) { if (loader->format &&
loader->format != VIR_STORAGE_FILE_RAW) {
virBufferEscapeString(&loaderAttrBuf, " format='%s'", virBufferEscapeString(&loaderAttrBuf, " format='%s'",
virStorageFileFormatTypeToString(loader->format)); virStorageFileFormatTypeToString(loader->format));
} }

View File

@ -654,11 +654,16 @@ libxlMakeDomBuildInfo(virDomainDef *def,
b_info->u.hvm.system_firmware = g_strdup(def->os.loader->path); b_info->u.hvm.system_firmware = g_strdup(def->os.loader->path);
} }
if (def->os.loader && def->os.loader->format != VIR_STORAGE_FILE_RAW) { if (def->os.loader) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, if (!def->os.loader->format)
_("Unsupported loader format '%1$s'"), def->os.loader->format = VIR_STORAGE_FILE_RAW;
virStorageFileFormatTypeToString(def->os.loader->format));
return -1; if (def->os.loader->format != VIR_STORAGE_FILE_RAW) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unsupported loader format '%1$s'"),
virStorageFileFormatTypeToString(def->os.loader->format));
return -1;
}
} }
if (def->emulator) { if (def->emulator) {

View File

@ -115,6 +115,7 @@ xenParseXLOS(virConf *conf, virDomainDef *def, virCaps *caps)
if (bios && STREQ(bios, "ovmf")) { if (bios && STREQ(bios, "ovmf")) {
def->os.loader = virDomainLoaderDefNew(); def->os.loader = virDomainLoaderDefNew();
def->os.loader->format = VIR_STORAGE_FILE_RAW;
def->os.loader->type = VIR_DOMAIN_LOADER_TYPE_PFLASH; def->os.loader->type = VIR_DOMAIN_LOADER_TYPE_PFLASH;
def->os.loader->readonly = VIR_TRISTATE_BOOL_YES; def->os.loader->readonly = VIR_TRISTATE_BOOL_YES;
if (bios_path) if (bios_path)
@ -126,6 +127,7 @@ xenParseXLOS(virConf *conf, virDomainDef *def, virCaps *caps)
if (caps->guests[i]->ostype == VIR_DOMAIN_OSTYPE_HVM && if (caps->guests[i]->ostype == VIR_DOMAIN_OSTYPE_HVM &&
caps->guests[i]->arch.id == def->os.arch) { caps->guests[i]->arch.id == def->os.arch) {
def->os.loader = virDomainLoaderDefNew(); def->os.loader = virDomainLoaderDefNew();
def->os.loader->format = VIR_STORAGE_FILE_RAW;
def->os.loader->path = g_strdup(caps->guests[i]->arch.defaultInfo.loader); def->os.loader->path = g_strdup(caps->guests[i]->arch.defaultInfo.loader);
} }
} }

View File

@ -43,6 +43,7 @@ xenParseXMOS(virConf *conf, virDomainDef *def)
g_autofree char *boot = NULL; g_autofree char *boot = NULL;
def->os.loader = virDomainLoaderDefNew(); def->os.loader = virDomainLoaderDefNew();
def->os.loader->format = VIR_STORAGE_FILE_RAW;
if (xenConfigCopyString(conf, "kernel", &def->os.loader->path) < 0) if (xenConfigCopyString(conf, "kernel", &def->os.loader->path) < 0)
return -1; return -1;

View File

@ -4505,7 +4505,7 @@ qemuDomainDefBootPostParse(virDomainDef *def,
* to start the domain, qemuFirmwareFillDomain() will be run * to start the domain, qemuFirmwareFillDomain() will be run
* again, fail in the same way, and at that point we'll have a * again, fail in the same way, and at that point we'll have a
* chance to inform the user of any issues */ * chance to inform the user of any issues */
if (qemuFirmwareFillDomain(driver, def) < 0) { if (qemuFirmwareFillDomain(driver, def, abiUpdate) < 0) {
if (abiUpdate) { if (abiUpdate) {
return -1; return -1;
} else { } else {

View File

@ -32,6 +32,7 @@
#include "virlog.h" #include "virlog.h"
#include "viralloc.h" #include "viralloc.h"
#include "virenum.h" #include "virenum.h"
#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_QEMU #define VIR_FROM_THIS VIR_FROM_QEMU
@ -971,9 +972,12 @@ qemuFirmwareMatchesPaths(const qemuFirmware *fw,
if (loader && loader->path && if (loader && loader->path &&
STRNEQ(loader->path, flash->executable.filename)) STRNEQ(loader->path, flash->executable.filename))
return false; return false;
if (loader && loader->nvramTemplate && if (loader && loader->nvramTemplate) {
STRNEQ(loader->nvramTemplate, flash->nvram_template.filename)) if (flash->mode != QEMU_FIRMWARE_FLASH_MODE_SPLIT)
return false; return false;
if (STRNEQ(loader->nvramTemplate, flash->nvram_template.filename))
return false;
}
break; break;
case QEMU_FIRMWARE_DEVICE_MEMORY: case QEMU_FIRMWARE_DEVICE_MEMORY:
if (loader && loader->path && if (loader && loader->path &&
@ -1050,7 +1054,8 @@ qemuFirmwareOSInterfaceTypeFromOsDefLoaderType(virDomainLoader type)
/** /**
* qemuFirmwareEnsureNVRAM: * qemuFirmwareEnsureNVRAM:
* @def: domain definition * @def: domain definition
* @cfg: QEMU driver configuration * @driver: QEMU driver
* @abiUpdate: whether a new domain is being defined
* *
* Make sure that a source for the NVRAM file exists, possibly by * Make sure that a source for the NVRAM file exists, possibly by
* creating it. This might involve automatically generating the * creating it. This might involve automatically generating the
@ -1058,15 +1063,30 @@ qemuFirmwareOSInterfaceTypeFromOsDefLoaderType(virDomainLoader type)
*/ */
static void static void
qemuFirmwareEnsureNVRAM(virDomainDef *def, qemuFirmwareEnsureNVRAM(virDomainDef *def,
const virQEMUDriverConfig *cfg, virQEMUDriver *driver,
virStorageFileFormat format) bool abiUpdate)
{ {
g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver);
virDomainLoaderDef *loader = def->os.loader; virDomainLoaderDef *loader = def->os.loader;
const char *ext = NULL; const char *ext = NULL;
if (!loader) if (!loader)
return; return;
if (loader->type != VIR_DOMAIN_LOADER_TYPE_PFLASH)
return;
if (loader->readonly != VIR_TRISTATE_BOOL_YES)
return;
if (loader->stateless == VIR_TRISTATE_BOOL_YES)
return;
/* If the NVRAM format hasn't been set yet, inherit the same as
* the loader */
if (loader->nvram && !loader->nvram->format)
loader->nvram->format = loader->format;
/* If the source already exists and is fully specified, including /* If the source already exists and is fully specified, including
* the path, leave it alone */ * the path, leave it alone */
if (loader->nvram && loader->nvram->path) if (loader->nvram && loader->nvram->path)
@ -1077,11 +1097,28 @@ qemuFirmwareEnsureNVRAM(virDomainDef *def,
loader->nvram = virStorageSourceNew(); loader->nvram = virStorageSourceNew();
loader->nvram->type = VIR_STORAGE_TYPE_FILE; loader->nvram->type = VIR_STORAGE_TYPE_FILE;
loader->nvram->format = format; loader->nvram->format = loader->format;
if (format == VIR_STORAGE_FILE_RAW) if (loader->nvram->format == VIR_STORAGE_FILE_RAW) {
ext = ".fd"; /* The extension used by raw edk2 builds has historically
if (format == VIR_STORAGE_FILE_QCOW2) * been .fd, but more recent aarch64 builds have started
* using the .raw extension instead.
*
* If we're defining a new domain, we should try to match the
* extension for the file backing its NVRAM store with the
* one used by the template to keep things nice and
* consistent.
*
* If we're loading an existing domain, however, we need to
* stick with the .fd extension to ensure compatibility */
if (abiUpdate &&
loader->nvramTemplate &&
virStringHasSuffix(loader->nvramTemplate, ".raw"))
ext = ".raw";
else
ext = ".fd";
}
if (loader->nvram->format == VIR_STORAGE_FILE_QCOW2)
ext = ".qcow2"; ext = ".qcow2";
loader->nvram->path = g_strdup_printf("%s/%s_VARS%s", loader->nvram->path = g_strdup_printf("%s/%s_VARS%s",
@ -1283,13 +1320,20 @@ qemuFirmwareMatchDomain(const virDomainDef *def,
} }
} }
if (loader &&
loader->readonly == VIR_TRISTATE_BOOL_NO &&
flash->mode != QEMU_FIRMWARE_FLASH_MODE_COMBINED) {
VIR_DEBUG("Discarding readonly loader");
return false;
}
if (STRNEQ(flash->executable.format, "raw") && if (STRNEQ(flash->executable.format, "raw") &&
STRNEQ(flash->executable.format, "qcow2")) { STRNEQ(flash->executable.format, "qcow2")) {
VIR_DEBUG("Discarding loader with unsupported flash format '%s'", VIR_DEBUG("Discarding loader with unsupported flash format '%s'",
flash->executable.format); flash->executable.format);
return false; return false;
} }
if (loader && if (loader && loader->format &&
STRNEQ(flash->executable.format, virStorageFileFormatTypeToString(loader->format))) { STRNEQ(flash->executable.format, virStorageFileFormatTypeToString(loader->format))) {
VIR_DEBUG("Discarding loader with mismatching flash format '%s' != '%s'", VIR_DEBUG("Discarding loader with mismatching flash format '%s' != '%s'",
flash->executable.format, flash->executable.format,
@ -1303,7 +1347,7 @@ qemuFirmwareMatchDomain(const virDomainDef *def,
flash->nvram_template.format); flash->nvram_template.format);
return false; return false;
} }
if (loader && loader->nvram && if (loader && loader->nvram && loader->nvram->format &&
STRNEQ(flash->nvram_template.format, virStorageFileFormatTypeToString(loader->nvram->format))) { STRNEQ(flash->nvram_template.format, virStorageFileFormatTypeToString(loader->nvram->format))) {
VIR_DEBUG("Discarding loader with mismatching nvram template format '%s' != '%s'", VIR_DEBUG("Discarding loader with mismatching nvram template format '%s' != '%s'",
flash->nvram_template.format, flash->nvram_template.format,
@ -1344,8 +1388,7 @@ qemuFirmwareMatchDomain(const virDomainDef *def,
static int static int
qemuFirmwareEnableFeaturesModern(virQEMUDriverConfig *cfg, qemuFirmwareEnableFeaturesModern(virDomainDef *def,
virDomainDef *def,
const qemuFirmware *fw) const qemuFirmware *fw)
{ {
const qemuFirmwareMappingFlash *flash = &fw->mapping.data.flash; const qemuFirmwareMappingFlash *flash = &fw->mapping.data.flash;
@ -1374,16 +1417,15 @@ qemuFirmwareEnableFeaturesModern(virQEMUDriverConfig *cfg,
loader->path = g_strdup(flash->executable.filename); loader->path = g_strdup(flash->executable.filename);
if (flash->mode == QEMU_FIRMWARE_FLASH_MODE_SPLIT) { if (flash->mode == QEMU_FIRMWARE_FLASH_MODE_SPLIT) {
if ((format = virStorageFileFormatTypeFromString(flash->nvram_template.format)) < 0) /* Only fill in nvramTemplate if the NVRAM location is already
return -1; * known to be a local path or hasn't been provided, in which
* case a local path will be generated by libvirt later.
qemuFirmwareEnsureNVRAM(def, cfg, format); *
* We can't create or reset non-local NVRAM files, so filling
/* If the NVRAM is not a local path then we can't create or * in nvramTemplate for those would be misleading */
* reset it, so in that case filling in the nvramTemplate
* field would be misleading */
VIR_FREE(loader->nvramTemplate); VIR_FREE(loader->nvramTemplate);
if (loader->nvram && virStorageSourceIsLocalStorage(loader->nvram)) { if (!loader->nvram ||
(loader->nvram && virStorageSourceIsLocalStorage(loader->nvram))) {
loader->nvramTemplate = g_strdup(flash->nvram_template.filename); loader->nvramTemplate = g_strdup(flash->nvram_template.filename);
} }
} }
@ -1575,20 +1617,26 @@ qemuFirmwareFillDomainLegacy(virQEMUDriver *driver,
size_t i; size_t i;
if (!loader) if (!loader)
return 0; return 1;
if (loader->type != VIR_DOMAIN_LOADER_TYPE_PFLASH) { if (loader->type != VIR_DOMAIN_LOADER_TYPE_PFLASH) {
VIR_DEBUG("Ignoring legacy entries for '%s' loader", VIR_DEBUG("Ignoring legacy entries for '%s' loader",
virDomainLoaderTypeToString(loader->type)); virDomainLoaderTypeToString(loader->type));
return 0; return 1;
}
if (loader->readonly == VIR_TRISTATE_BOOL_NO) {
VIR_DEBUG("Ignoring legacy entries for read-write loader");
return 1;
} }
if (loader->stateless == VIR_TRISTATE_BOOL_YES) { if (loader->stateless == VIR_TRISTATE_BOOL_YES) {
VIR_DEBUG("Ignoring legacy entries for stateless loader"); VIR_DEBUG("Ignoring legacy entries for stateless loader");
return 0; return 1;
} }
if (loader->format != VIR_STORAGE_FILE_RAW) { if (loader->format &&
loader->format != VIR_STORAGE_FILE_RAW) {
VIR_DEBUG("Ignoring legacy entries for loader with flash format '%s'", VIR_DEBUG("Ignoring legacy entries for loader with flash format '%s'",
virStorageFileFormatTypeToString(loader->format)); virStorageFileFormatTypeToString(loader->format));
return 1; return 1;
@ -1605,11 +1653,32 @@ qemuFirmwareFillDomainLegacy(virQEMUDriver *driver,
loader->type = VIR_DOMAIN_LOADER_TYPE_PFLASH; loader->type = VIR_DOMAIN_LOADER_TYPE_PFLASH;
loader->readonly = VIR_TRISTATE_BOOL_YES; loader->readonly = VIR_TRISTATE_BOOL_YES;
loader->format = VIR_STORAGE_FILE_RAW;
VIR_FREE(loader->nvramTemplate); /* Only use the default template path if one hasn't been
loader->nvramTemplate = g_strdup(cfg->firmwares[i]->nvram); * provided by the user.
*
qemuFirmwareEnsureNVRAM(def, cfg, VIR_STORAGE_FILE_RAW); * In addition to fully-custom templates, which are a valid
* use case, we could simply be in a situation where
* qemu.conf contains
*
* nvram = [
* "/path/to/OVMF_CODE.secboot.fd:/path/to/OVMF_VARS.fd",
* "/path/to/OVMF_CODE.secboot.fd:/path/to/OVMF_VARS.secboot.fd"
* ]
*
* and the domain has been configured as
*
* <os>
* <loader readonly='yes' type='pflash'>/path/to/OVMF_CODE.secboot.fd</loader>
* <nvram template='/path/to/OVMF/OVMF_VARS.secboot.fd'>
* </os>
*
* 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)
loader->nvramTemplate = g_strdup(cfg->firmwares[i]->nvram);
VIR_DEBUG("decided on firmware '%s' template '%s'", VIR_DEBUG("decided on firmware '%s' template '%s'",
loader->path, NULLSTR(loader->nvramTemplate)); loader->path, NULLSTR(loader->nvramTemplate));
@ -1639,7 +1708,6 @@ static int
qemuFirmwareFillDomainModern(virQEMUDriver *driver, qemuFirmwareFillDomainModern(virQEMUDriver *driver,
virDomainDef *def) virDomainDef *def)
{ {
g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver);
g_auto(GStrv) paths = NULL; g_auto(GStrv) paths = NULL;
qemuFirmware **firmwares = NULL; qemuFirmware **firmwares = NULL;
ssize_t nfirmwares = 0; ssize_t nfirmwares = 0;
@ -1670,7 +1738,7 @@ qemuFirmwareFillDomainModern(virQEMUDriver *driver,
* likely that admin/FW manufacturer messed up. */ * likely that admin/FW manufacturer messed up. */
qemuFirmwareSanityCheck(theone, paths[i]); qemuFirmwareSanityCheck(theone, paths[i]);
if (qemuFirmwareEnableFeaturesModern(cfg, def, theone) < 0) if (qemuFirmwareEnableFeaturesModern(def, theone) < 0)
goto cleanup; goto cleanup;
ret = 0; ret = 0;
@ -1687,6 +1755,7 @@ qemuFirmwareFillDomainModern(virQEMUDriver *driver,
* qemuFirmwareFillDomain: * qemuFirmwareFillDomain:
* @driver: QEMU driver * @driver: QEMU driver
* @def: domain definition * @def: domain definition
* @abiUpdate: whether a new domain is being defined
* *
* Perform firmware selection. * Perform firmware selection.
* *
@ -1710,7 +1779,8 @@ qemuFirmwareFillDomainModern(virQEMUDriver *driver,
*/ */
int int
qemuFirmwareFillDomain(virQEMUDriver *driver, qemuFirmwareFillDomain(virQEMUDriver *driver,
virDomainDef *def) virDomainDef *def,
bool abiUpdate)
{ {
virDomainLoaderDef *loader = def->os.loader; virDomainLoaderDef *loader = def->os.loader;
virStorageSource *nvram = loader ? loader->nvram : NULL; virStorageSource *nvram = loader ? loader->nvram : NULL;
@ -1729,6 +1799,7 @@ qemuFirmwareFillDomain(virQEMUDriver *driver,
return -1; return -1;
if (loader && if (loader &&
loader->format &&
loader->format != VIR_STORAGE_FILE_RAW && loader->format != VIR_STORAGE_FILE_RAW &&
loader->format != VIR_STORAGE_FILE_QCOW2) { loader->format != VIR_STORAGE_FILE_QCOW2) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
@ -1737,6 +1808,7 @@ qemuFirmwareFillDomain(virQEMUDriver *driver,
return -1; return -1;
} }
if (nvram && if (nvram &&
nvram->format &&
nvram->format != VIR_STORAGE_FILE_RAW && nvram->format != VIR_STORAGE_FILE_RAW &&
nvram->format != VIR_STORAGE_FILE_QCOW2) { nvram->format != VIR_STORAGE_FILE_QCOW2) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
@ -1767,8 +1839,19 @@ qemuFirmwareFillDomain(virQEMUDriver *driver,
* CODE:NVRAM pairs that might have been provided at build * CODE:NVRAM pairs that might have been provided at build
* time */ * time */
if (!autoSelection) { if (!autoSelection) {
if (qemuFirmwareFillDomainLegacy(driver, def) < 0) if ((ret = qemuFirmwareFillDomainLegacy(driver, def)) < 0)
return -1; return -1;
/* If we've gotten this far without finding a match, it
* means that we're dealing with a set of completely
* custom paths. In that case, unless the user has
* specified otherwise, we have to assume that they're in
* raw format */
if (ret == 1) {
if (loader && !loader->format) {
loader->format = VIR_STORAGE_FILE_RAW;
}
}
} else { } else {
virReportError(VIR_ERR_OPERATION_FAILED, virReportError(VIR_ERR_OPERATION_FAILED,
_("Unable to find any firmware to satisfy '%1$s'"), _("Unable to find any firmware to satisfy '%1$s'"),
@ -1777,6 +1860,11 @@ qemuFirmwareFillDomain(virQEMUDriver *driver,
} }
} }
/* Always ensure that the NVRAM path is present, even if we
* haven't found a match: the configuration might simply be
* referring to a custom firmware build */
qemuFirmwareEnsureNVRAM(def, driver, abiUpdate);
return 0; return 0;
} }

View File

@ -44,7 +44,8 @@ qemuFirmwareFetchConfigs(char ***firmwares,
int int
qemuFirmwareFillDomain(virQEMUDriver *driver, qemuFirmwareFillDomain(virQEMUDriver *driver,
virDomainDef *def); virDomainDef *def,
bool abiUpdate);
int int
qemuFirmwareGetSupported(const char *machine, qemuFirmwareGetSupported(const char *machine,

View File

@ -6705,7 +6705,7 @@ qemuProcessPrepareDomain(virQEMUDriver *driver,
return -1; return -1;
VIR_DEBUG("Prepare bios/uefi paths"); VIR_DEBUG("Prepare bios/uefi paths");
if (qemuFirmwareFillDomain(driver, vm->def) < 0) if (qemuFirmwareFillDomain(driver, vm->def, false) < 0)
return -1; return -1;
if (qemuDomainInitializePflashStorageSource(vm, cfg) < 0) if (qemuDomainInitializePflashStorageSource(vm, cfg) < 0)
return -1; return -1;

View File

@ -17,11 +17,11 @@
{ {
"return": { "return": {
"qemu": { "qemu": {
"micro": 50, "micro": 94,
"minor": 0, "minor": 0,
"major": 8 "major": 8
}, },
"package": "v8.0.0-2835-g361d539735" "package": "v8.1.0-rc4"
}, },
"id": "libvirt-2" "id": "libvirt-2"
} }
@ -5554,6 +5554,16 @@
"name": "socket-address", "name": "socket-address",
"default": null, "default": null,
"type": "[377]" "type": "[377]"
},
{
"name": "dirty-limit-throttle-time-per-round",
"default": null,
"type": "int"
},
{
"name": "dirty-limit-ring-full-time",
"default": null,
"type": "int"
} }
], ],
"meta-type": "object" "meta-type": "object"
@ -5727,6 +5737,19 @@
"name": "block-bitmap-mapping", "name": "block-bitmap-mapping",
"default": null, "default": null,
"type": "[421]" "type": "[421]"
},
{
"name": "x-vcpu-dirty-limit-period",
"default": null,
"type": "int",
"features": [
"unstable"
]
},
{
"name": "vcpu-dirty-limit",
"default": null,
"type": "int"
} }
], ],
"meta-type": "object" "meta-type": "object"
@ -5871,6 +5894,19 @@
"name": "block-bitmap-mapping", "name": "block-bitmap-mapping",
"default": null, "default": null,
"type": "[421]" "type": "[421]"
},
{
"name": "x-vcpu-dirty-limit-period",
"default": null,
"type": "int",
"features": [
"unstable"
]
},
{
"name": "vcpu-dirty-limit",
"default": null,
"type": "int"
} }
], ],
"meta-type": "object" "meta-type": "object"
@ -13515,7 +13551,10 @@
}, },
{ {
"name": "skipped", "name": "skipped",
"type": "int" "type": "int",
"features": [
"deprecated"
]
}, },
{ {
"name": "normal", "name": "normal",
@ -13721,6 +13760,9 @@
}, },
{ {
"name": "switchover-ack" "name": "switchover-ack"
},
{
"name": "dirty-limit"
} }
], ],
"meta-type": "enum", "meta-type": "enum",
@ -13746,7 +13788,8 @@
"background-snapshot", "background-snapshot",
"zero-copy-send", "zero-copy-send",
"postcopy-preempt", "postcopy-preempt",
"switchover-ack" "switchover-ack",
"dirty-limit"
] ]
}, },
{ {
@ -36928,6 +36971,10 @@
{ {
"state": false, "state": false,
"capability": "switchover-ack" "capability": "switchover-ack"
},
{
"state": false,
"capability": "dirty-limit"
} }
], ],
"id": "libvirt-45" "id": "libvirt-45"

View File

@ -204,9 +204,9 @@
<flag name='rbd-encryption-luks-any'/> <flag name='rbd-encryption-luks-any'/>
<flag name='qcow2-discard-no-unref'/> <flag name='qcow2-discard-no-unref'/>
<flag name='run-with.async-teardown'/> <flag name='run-with.async-teardown'/>
<version>8000050</version> <version>8000094</version>
<microcodeVersion>43100245</microcodeVersion> <microcodeVersion>43100245</microcodeVersion>
<package>v8.0.0-2835-g361d539735</package> <package>v8.1.0-rc4</package>
<arch>x86_64</arch> <arch>x86_64</arch>
<hostCPU type='kvm' model='base' migratability='yes'> <hostCPU type='kvm' model='base' migratability='yes'>
<property name='avx-ne-convert' type='boolean' value='false'/> <property name='avx-ne-convert' type='boolean' value='false'/>

View File

@ -0,0 +1 @@
../../../usr/share/qemu/firmware/91-bios.json

View File

@ -1 +0,0 @@
../../../usr/share/qemu/firmware/50-ovmf-sb-keys.json

View File

@ -0,0 +1 @@
../../../usr/share/qemu/firmware/90-combined.json

View File

@ -4,13 +4,9 @@
], ],
"mapping": { "mapping": {
"device": "flash", "device": "flash",
"mode": "split", "mode": "stateless",
"executable": { "executable": {
"filename": "/usr/share/OVMF/OVMF_CODE.fd", "filename": "/usr/share/edk2/ovmf/OVMF.amdsev.fd",
"format": "raw"
},
"nvram-template": {
"filename": "/usr/share/OVMF/OVMF_VARS.fd",
"format": "raw" "format": "raw"
} }
}, },
@ -18,14 +14,13 @@
{ {
"architecture": "x86_64", "architecture": "x86_64",
"machines": [ "machines": [
"pc-i440fx-*",
"pc-q35-*" "pc-q35-*"
] ]
} }
], ],
"features": [ "features": [
"acpi-s3",
"amd-sev", "amd-sev",
"amd-sev-es",
"verbose-dynamic" "verbose-dynamic"
] ]
} }

View File

@ -0,0 +1,24 @@
{
"interface-types": [
"uefi"
],
"mapping": {
"device": "flash",
"mode": "stateless",
"executable": {
"filename": "/usr/share/edk2/ovmf/OVMF.inteltdx.fd",
"format": "raw"
}
},
"targets": [
{
"architecture": "x86_64",
"machines": [
"pc-q35-*"
]
}
],
"features": [
"verbose-dynamic"
]
}

View File

@ -0,0 +1,36 @@
{
"description": "OVMF with SB+SMM, SB enabled, MS certs enrolled",
"interface-types": [
"uefi"
],
"mapping": {
"device": "flash",
"mode" : "split",
"executable": {
"filename": "/usr/share/edk2/ovmf/OVMF_CODE_4M.secboot.qcow2",
"format": "qcow2"
},
"nvram-template": {
"filename": "/usr/share/edk2/ovmf/OVMF_VARS_4M.secboot.qcow2",
"format": "qcow2"
}
},
"targets": [
{
"architecture": "x86_64",
"machines": [
"pc-q35-*"
]
}
],
"features": [
"acpi-s3",
"enrolled-keys",
"requires-smm",
"secure-boot",
"verbose-dynamic"
],
"tags": [
]
}

View File

@ -5,12 +5,13 @@
], ],
"mapping": { "mapping": {
"device": "flash", "device": "flash",
"mode" : "split",
"executable": { "executable": {
"filename": "/usr/share/OVMF/OVMF_CODE.secboot.fd", "filename": "/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd",
"format": "raw" "format": "raw"
}, },
"nvram-template": { "nvram-template": {
"filename": "/usr/share/OVMF/OVMF_VARS.secboot.fd", "filename": "/usr/share/edk2/ovmf/OVMF_VARS.secboot.fd",
"format": "raw" "format": "raw"
} }
}, },
@ -24,7 +25,6 @@
], ],
"features": [ "features": [
"acpi-s3", "acpi-s3",
"amd-sev",
"enrolled-keys", "enrolled-keys",
"requires-smm", "requires-smm",
"secure-boot", "secure-boot",

View File

@ -1,17 +1,18 @@
{ {
"description": "OVMF with SB+SMM, empty varstore",
"interface-types": [ "interface-types": [
"uefi" "uefi"
], ],
"mapping": { "mapping": {
"device": "flash", "device": "flash",
"mode": "split", "mode" : "split",
"executable": { "executable": {
"filename": "/usr/share/OVMF/OVMF_CODE.secboot.fd", "filename": "/usr/share/edk2/ovmf/OVMF_CODE_4M.secboot.qcow2",
"format": "raw" "format": "qcow2"
}, },
"nvram-template": { "nvram-template": {
"filename": "/usr/share/OVMF/OVMF_VARS.secboot.fd", "filename": "/usr/share/edk2/ovmf/OVMF_VARS_4M.qcow2",
"format": "raw" "format": "qcow2"
} }
}, },
"targets": [ "targets": [
@ -24,10 +25,11 @@
], ],
"features": [ "features": [
"acpi-s3", "acpi-s3",
"amd-sev",
"enrolled-keys",
"requires-smm", "requires-smm",
"secure-boot", "secure-boot",
"verbose-dynamic" "verbose-dynamic"
],
"tags": [
] ]
} }

View File

@ -5,13 +5,13 @@
], ],
"mapping": { "mapping": {
"device": "flash", "device": "flash",
"mode": "split", "mode" : "split",
"executable": { "executable": {
"filename": "/usr/share/OVMF/OVMF_CODE.secboot.fd", "filename": "/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd",
"format": "raw" "format": "raw"
}, },
"nvram-template": { "nvram-template": {
"filename": "/usr/share/OVMF/OVMF_VARS.fd", "filename": "/usr/share/edk2/ovmf/OVMF_VARS.fd",
"format": "raw" "format": "raw"
} }
}, },
@ -25,7 +25,6 @@
], ],
"features": [ "features": [
"acpi-s3", "acpi-s3",
"amd-sev",
"requires-smm", "requires-smm",
"secure-boot", "secure-boot",
"verbose-dynamic" "verbose-dynamic"

View File

@ -1,17 +1,17 @@
{ {
"description": "UEFI firmware for ARM64 virtual machines (QCOW2 format)", "description": "UEFI firmware for ARM64 virtual machines",
"interface-types": [ "interface-types": [
"uefi" "uefi"
], ],
"mapping": { "mapping": {
"device": "flash", "device": "flash",
"mode": "split", "mode" : "split",
"executable": { "executable": {
"filename": "/usr/share/AAVMF/AAVMF_CODE.qcow2", "filename": "/usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.qcow2",
"format": "qcow2" "format": "qcow2"
}, },
"nvram-template": { "nvram-template": {
"filename": "/usr/share/AAVMF/AAVMF_VARS.qcow2", "filename": "/usr/share/edk2/aarch64/vars-template-pflash.qcow2",
"format": "qcow2" "format": "qcow2"
} }
}, },
@ -27,10 +27,6 @@
], ],
"tags": [ "tags": [
"-a AARCH64",
"-p ArmVirtPkg/ArmVirtQemu.dsc",
"-t GCC48",
"-b DEBUG",
"-D DEBUG_PRINT_ERROR_LEVEL=0x80000000"
] ]
} }

View File

@ -1,17 +1,17 @@
{ {
"description": "UEFI firmware for x86_64 virtual machines (QCOW2 format)", "description": "OVMF without SB+SMM, empty varstore",
"interface-types": [ "interface-types": [
"uefi" "uefi"
], ],
"mapping": { "mapping": {
"device": "flash", "device": "flash",
"mode": "split", "mode" : "split",
"executable": { "executable": {
"filename": "/usr/share/OVMF/OVMF_CODE.qcow2", "filename": "/usr/share/edk2/ovmf/OVMF_CODE_4M.qcow2",
"format": "qcow2" "format": "qcow2"
}, },
"nvram-template": { "nvram-template": {
"filename": "/usr/share/OVMF/OVMF_VARS.qcow2", "filename": "/usr/share/edk2/ovmf/OVMF_VARS_4M.qcow2",
"format": "qcow2" "format": "qcow2"
} }
}, },
@ -27,6 +27,7 @@
"features": [ "features": [
"acpi-s3", "acpi-s3",
"amd-sev", "amd-sev",
"amd-sev-es",
"verbose-dynamic" "verbose-dynamic"
], ],
"tags": [ "tags": [

View File

@ -0,0 +1,22 @@
{
"description": "OVMF for microvm",
"interface-types": [
"uefi"
],
"mapping": {
"device": "memory",
"filename": "/usr/share/edk2/ovmf/MICROVM.fd"
},
"targets": [
{
"architecture": "x86_64",
"machines": [
"microvm"
]
}
],
"features": [
],
"tags": [
]
}

View File

@ -5,12 +5,13 @@
], ],
"mapping": { "mapping": {
"device": "flash", "device": "flash",
"mode" : "split",
"executable": { "executable": {
"filename": "/usr/share/AAVMF/AAVMF_CODE.fd", "filename": "/usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.raw",
"format": "raw" "format": "raw"
}, },
"nvram-template": { "nvram-template": {
"filename": "/usr/share/AAVMF/AAVMF_VARS.fd", "filename": "/usr/share/edk2/aarch64/vars-template-pflash.raw",
"format": "raw" "format": "raw"
} }
}, },
@ -26,10 +27,6 @@
], ],
"tags": [ "tags": [
"-a AARCH64",
"-p ArmVirtPkg/ArmVirtQemu.dsc",
"-t GCC48",
"-b DEBUG",
"-D DEBUG_PRINT_ERROR_LEVEL=0x80000000"
] ]
} }

View File

@ -1,16 +1,17 @@
{ {
"description": "UEFI firmware for x86_64 virtual machines", "description": "OVMF without SB+SMM, empty varstore",
"interface-types": [ "interface-types": [
"uefi" "uefi"
], ],
"mapping": { "mapping": {
"device": "flash", "device": "flash",
"mode" : "split",
"executable": { "executable": {
"filename": "/usr/share/OVMF/OVMF_CODE.fd", "filename": "/usr/share/edk2/ovmf/OVMF_CODE.fd",
"format": "raw" "format": "raw"
}, },
"nvram-template": { "nvram-template": {
"filename": "/usr/share/OVMF/OVMF_VARS.fd", "filename": "/usr/share/edk2/ovmf/OVMF_VARS.fd",
"format": "raw" "format": "raw"
} }
}, },
@ -26,6 +27,7 @@
"features": [ "features": [
"acpi-s3", "acpi-s3",
"amd-sev", "amd-sev",
"amd-sev-es",
"verbose-dynamic" "verbose-dynamic"
], ],
"tags": [ "tags": [

View File

@ -0,0 +1,32 @@
{
"description": "UEFI firmware for ARM64 virtual machines, verbose logs",
"interface-types": [
"uefi"
],
"mapping": {
"device": "flash",
"mode" : "split",
"executable": {
"filename": "/usr/share/edk2/aarch64/QEMU_EFI-pflash.qcow2",
"format": "qcow2"
},
"nvram-template": {
"filename": "/usr/share/edk2/aarch64/vars-template-pflash.qcow2",
"format": "qcow2"
}
},
"targets": [
{
"architecture": "aarch64",
"machines": [
"virt-*"
]
}
],
"features": [
"verbose-static"
],
"tags": [
]
}

View File

@ -1,16 +1,17 @@
{ {
"description": "UEFI firmware for ARM64 virtual machines, verbose logs",
"interface-types": [ "interface-types": [
"uefi" "uefi"
], ],
"mapping": { "mapping": {
"device": "flash", "device": "flash",
"mode": "split", "mode" : "split",
"executable": { "executable": {
"filename": "/usr/share/AAVMF/AAVMF_CODE.fd", "filename": "/usr/share/edk2/aarch64/QEMU_EFI-pflash.raw",
"format": "raw" "format": "raw"
}, },
"nvram-template": { "nvram-template": {
"filename": "/usr/share/AAVMF/AAVMF_VARS.fd", "filename": "/usr/share/edk2/aarch64/vars-template-pflash.raw",
"format": "raw" "format": "raw"
} }
}, },
@ -23,6 +24,9 @@
} }
], ],
"features": [ "features": [
"verbose-static"
],
"tags": [
] ]
} }

View File

@ -1,5 +1,5 @@
{ {
"description": "OVMF for x86_64, with SEV, without SB, without SMM, with NO varstore", "description": "OVMF with SEV-ES support",
"interface-types": [ "interface-types": [
"uefi" "uefi"
], ],
@ -7,7 +7,7 @@
"device": "flash", "device": "flash",
"mode": "stateless", "mode": "stateless",
"executable": { "executable": {
"filename": "/usr/share/OVMF/OVMF.sev.fd", "filename": "/usr/share/edk2/ovmf/OVMF.amdsev.fd",
"format": "raw" "format": "raw"
} }
}, },
@ -20,9 +20,9 @@
} }
], ],
"features": [ "features": [
"acpi-s3",
"amd-sev", "amd-sev",
"amd-sev-es", "amd-sev-es",
"amd-sev-snp",
"verbose-dynamic" "verbose-dynamic"
], ],
"tags": [ "tags": [

View File

@ -0,0 +1,29 @@
{
"description": "OVMF with TDX support",
"interface-types": [
"uefi"
],
"mapping": {
"device": "flash",
"mode": "stateless",
"executable": {
"filename": "/usr/share/edk2/ovmf/OVMF.inteltdx.fd",
"format": "raw"
}
},
"targets": [
{
"architecture": "x86_64",
"machines": [
"pc-q35-*"
]
}
],
"features": [
"intel-tdx",
"verbose-dynamic"
],
"tags": [
]
}

View File

@ -5,9 +5,9 @@
], ],
"mapping": { "mapping": {
"device": "flash", "device": "flash",
"mode": "combined", "mode": "combined",
"executable": { "executable": {
"filename": "/usr/share/OVMF/OVMF.secboot.fd", "filename": "/usr/share/edk2/ovmf/OVMF.secboot.fd",
"format": "raw" "format": "raw"
} }
}, },

View File

@ -28,8 +28,5 @@
"acpi-s4" "acpi-s4"
], ],
"tags": [ "tags": [
"CONFIG_BOOTSPLASH=n",
"CONFIG_ROM_SIZE=256",
"CONFIG_USE_SMM=n"
] ]
} }

View File

@ -67,16 +67,23 @@ testFWPrecedence(const void *opaque G_GNUC_UNUSED)
g_autofree char *fakehome = NULL; g_autofree char *fakehome = NULL;
g_auto(GStrv) fwList = NULL; g_auto(GStrv) fwList = NULL;
const char *expected[] = { const char *expected[] = {
PREFIX "/share/qemu/firmware/40-bios.json", SYSCONFDIR "/qemu/firmware/20-bios.json",
SYSCONFDIR "/qemu/firmware/40-ovmf-sb-keys.json", PREFIX "/share/qemu/firmware/30-edk2-ovmf-4m-qcow2-x64-sb-enrolled.json",
PREFIX "/share/qemu/firmware/45-ovmf-sev-stateless.json", PREFIX "/share/qemu/firmware/31-edk2-ovmf-2m-raw-x64-sb-enrolled.json",
PREFIX "/share/qemu/firmware/50-ovmf-sb-keys.json", PREFIX "/share/qemu/firmware/40-edk2-ovmf-4m-qcow2-x64-sb.json",
PREFIX "/share/qemu/firmware/55-ovmf-sb-combined.json", PREFIX "/share/qemu/firmware/41-edk2-ovmf-2m-raw-x64-sb.json",
PREFIX "/share/qemu/firmware/60-ovmf-sb.json", PREFIX "/share/qemu/firmware/50-edk2-aarch64-qcow2.json",
PREFIX "/share/qemu/firmware/61-ovmf.json", PREFIX "/share/qemu/firmware/50-edk2-ovmf-4m-qcow2-x64-nosb.json",
PREFIX "/share/qemu/firmware/65-ovmf-qcow2.json", PREFIX "/share/qemu/firmware/50-edk2-ovmf-x64-microvm.json",
PREFIX "/share/qemu/firmware/66-aavmf-qcow2.json", PREFIX "/share/qemu/firmware/51-edk2-aarch64-raw.json",
PREFIX "/share/qemu/firmware/70-aavmf.json", PREFIX "/share/qemu/firmware/51-edk2-ovmf-2m-raw-x64-nosb.json",
PREFIX "/share/qemu/firmware/52-edk2-aarch64-verbose-qcow2.json",
PREFIX "/share/qemu/firmware/53-edk2-aarch64-verbose-raw.json",
SYSCONFDIR "/qemu/firmware/59-combined.json",
PREFIX "/share/qemu/firmware/60-edk2-ovmf-x64-amdsev.json",
PREFIX "/share/qemu/firmware/60-edk2-ovmf-x64-inteltdx.json",
PREFIX "/share/qemu/firmware/90-combined.json",
PREFIX "/share/qemu/firmware/91-bios.json",
NULL NULL
}; };
const char **e; const char **e;
@ -231,15 +238,21 @@ mymain(void)
ret = -1; \ ret = -1; \
} while (0) } while (0)
DO_PARSE_TEST("usr/share/qemu/firmware/40-bios.json"); DO_PARSE_TEST("usr/share/qemu/firmware/30-edk2-ovmf-4m-qcow2-x64-sb-enrolled.json");
DO_PARSE_TEST("usr/share/qemu/firmware/45-ovmf-sev-stateless.json"); DO_PARSE_TEST("usr/share/qemu/firmware/31-edk2-ovmf-2m-raw-x64-sb-enrolled.json");
DO_PARSE_TEST("usr/share/qemu/firmware/50-ovmf-sb-keys.json"); DO_PARSE_TEST("usr/share/qemu/firmware/40-edk2-ovmf-4m-qcow2-x64-sb.json");
DO_PARSE_TEST("usr/share/qemu/firmware/55-ovmf-sb-combined.json"); DO_PARSE_TEST("usr/share/qemu/firmware/41-edk2-ovmf-2m-raw-x64-sb.json");
DO_PARSE_TEST("usr/share/qemu/firmware/60-ovmf-sb.json"); DO_PARSE_TEST("usr/share/qemu/firmware/50-edk2-aarch64-qcow2.json");
DO_PARSE_TEST("usr/share/qemu/firmware/61-ovmf.json"); DO_PARSE_TEST("usr/share/qemu/firmware/50-edk2-ovmf-4m-qcow2-x64-nosb.json");
DO_PARSE_TEST("usr/share/qemu/firmware/65-ovmf-qcow2.json"); DO_PARSE_TEST("usr/share/qemu/firmware/50-edk2-ovmf-x64-microvm.json");
DO_PARSE_TEST("usr/share/qemu/firmware/66-aavmf-qcow2.json"); DO_PARSE_TEST("usr/share/qemu/firmware/51-edk2-aarch64-raw.json");
DO_PARSE_TEST("usr/share/qemu/firmware/70-aavmf.json"); DO_PARSE_TEST("usr/share/qemu/firmware/51-edk2-ovmf-2m-raw-x64-nosb.json");
DO_PARSE_TEST("usr/share/qemu/firmware/52-edk2-aarch64-verbose-qcow2.json");
DO_PARSE_TEST("usr/share/qemu/firmware/53-edk2-aarch64-verbose-raw.json");
DO_PARSE_TEST("usr/share/qemu/firmware/60-edk2-ovmf-x64-amdsev.json");
DO_PARSE_TEST("usr/share/qemu/firmware/60-edk2-ovmf-x64-inteltdx.json");
DO_PARSE_TEST("usr/share/qemu/firmware/90-combined.json");
DO_PARSE_TEST("usr/share/qemu/firmware/91-bios.json");
if (virTestRun("QEMU FW precedence test", testFWPrecedence, NULL) < 0) if (virTestRun("QEMU FW precedence test", testFWPrecedence, NULL) < 0)
ret = -1; ret = -1;
@ -259,8 +272,8 @@ mymain(void)
DO_SUPPORTED_TEST("pc-i440fx-3.1", VIR_ARCH_X86_64, false, DO_SUPPORTED_TEST("pc-i440fx-3.1", VIR_ARCH_X86_64, false,
"/usr/share/seabios/bios-256k.bin:NULL:" "/usr/share/seabios/bios-256k.bin:NULL:"
"/usr/share/OVMF/OVMF_CODE.fd:/usr/share/OVMF/OVMF_VARS.fd:" "/usr/share/edk2/ovmf/OVMF_CODE_4M.qcow2:/usr/share/edk2/ovmf/OVMF_VARS_4M.qcow2:"
"/usr/share/OVMF/OVMF_CODE.qcow2:/usr/share/OVMF/OVMF_VARS.qcow2", "/usr/share/edk2/ovmf/OVMF_CODE.fd:/usr/share/edk2/ovmf/OVMF_VARS.fd",
VIR_DOMAIN_OS_DEF_FIRMWARE_BIOS, VIR_DOMAIN_OS_DEF_FIRMWARE_BIOS,
VIR_DOMAIN_OS_DEF_FIRMWARE_EFI); VIR_DOMAIN_OS_DEF_FIRMWARE_EFI);
DO_SUPPORTED_TEST("pc-i440fx-3.1", VIR_ARCH_I686, false, DO_SUPPORTED_TEST("pc-i440fx-3.1", VIR_ARCH_I686, false,
@ -268,20 +281,28 @@ mymain(void)
VIR_DOMAIN_OS_DEF_FIRMWARE_BIOS); VIR_DOMAIN_OS_DEF_FIRMWARE_BIOS);
DO_SUPPORTED_TEST("pc-q35-3.1", VIR_ARCH_X86_64, true, DO_SUPPORTED_TEST("pc-q35-3.1", VIR_ARCH_X86_64, true,
"/usr/share/seabios/bios-256k.bin:NULL:" "/usr/share/seabios/bios-256k.bin:NULL:"
"/usr/share/OVMF/OVMF_CODE.secboot.fd:/usr/share/OVMF/OVMF_VARS.secboot.fd:" "/usr/share/edk2/ovmf/OVMF_CODE_4M.secboot.qcow2:/usr/share/edk2/ovmf/OVMF_VARS_4M.secboot.qcow2:"
"/usr/share/OVMF/OVMF.sev.fd:NULL:" "/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd:/usr/share/edk2/ovmf/OVMF_VARS.secboot.fd:"
"/usr/share/OVMF/OVMF.secboot.fd:NULL:" "/usr/share/edk2/ovmf/OVMF_CODE_4M.secboot.qcow2:/usr/share/edk2/ovmf/OVMF_VARS_4M.qcow2:"
"/usr/share/OVMF/OVMF_CODE.secboot.fd:/usr/share/OVMF/OVMF_VARS.fd:" "/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd:/usr/share/edk2/ovmf/OVMF_VARS.fd:"
"/usr/share/OVMF/OVMF_CODE.fd:/usr/share/OVMF/OVMF_VARS.fd:" "/usr/share/edk2/ovmf/OVMF_CODE_4M.qcow2:/usr/share/edk2/ovmf/OVMF_VARS_4M.qcow2:"
"/usr/share/OVMF/OVMF_CODE.qcow2:/usr/share/OVMF/OVMF_VARS.qcow2", "/usr/share/edk2/ovmf/OVMF_CODE.fd:/usr/share/edk2/ovmf/OVMF_VARS.fd:"
"/usr/share/edk2/ovmf/OVMF.secboot.fd:NULL:"
"/usr/share/edk2/ovmf/OVMF.amdsev.fd:NULL:"
"/usr/share/edk2/ovmf/OVMF.inteltdx.fd:NULL",
VIR_DOMAIN_OS_DEF_FIRMWARE_BIOS, VIR_DOMAIN_OS_DEF_FIRMWARE_BIOS,
VIR_DOMAIN_OS_DEF_FIRMWARE_EFI); VIR_DOMAIN_OS_DEF_FIRMWARE_EFI);
DO_SUPPORTED_TEST("pc-q35-3.1", VIR_ARCH_I686, false, DO_SUPPORTED_TEST("pc-q35-3.1", VIR_ARCH_I686, false,
"/usr/share/seabios/bios-256k.bin:NULL", "/usr/share/seabios/bios-256k.bin:NULL",
VIR_DOMAIN_OS_DEF_FIRMWARE_BIOS); VIR_DOMAIN_OS_DEF_FIRMWARE_BIOS);
DO_SUPPORTED_TEST("microvm", VIR_ARCH_X86_64, false,
"/usr/share/edk2/ovmf/MICROVM.fd:NULL",
VIR_DOMAIN_OS_DEF_FIRMWARE_EFI);
DO_SUPPORTED_TEST("virt-3.1", VIR_ARCH_AARCH64, false, DO_SUPPORTED_TEST("virt-3.1", VIR_ARCH_AARCH64, false,
"/usr/share/AAVMF/AAVMF_CODE.qcow2:/usr/share/AAVMF/AAVMF_VARS.qcow2:" "/usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.qcow2:/usr/share/edk2/aarch64/vars-template-pflash.qcow2:"
"/usr/share/AAVMF/AAVMF_CODE.fd:/usr/share/AAVMF/AAVMF_VARS.fd", "/usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.raw:/usr/share/edk2/aarch64/vars-template-pflash.raw:"
"/usr/share/edk2/aarch64/QEMU_EFI-pflash.qcow2:/usr/share/edk2/aarch64/vars-template-pflash.qcow2:"
"/usr/share/edk2/aarch64/QEMU_EFI-pflash.raw:/usr/share/edk2/aarch64/vars-template-pflash.raw",
VIR_DOMAIN_OS_DEF_FIRMWARE_EFI); VIR_DOMAIN_OS_DEF_FIRMWARE_EFI);
virFileWrapperClearPrefixes(); virFileWrapperClearPrefixes();

View File

@ -10,11 +10,11 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
-name guest=guest,debug-threads=on \ -name guest=guest,debug-threads=on \
-S \ -S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/AAVMF/AAVMF_CODE.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.raw","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \ -blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/some/user/nvram/path/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/path/to/guest_VARS.raw","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \ -blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \
-machine virt,usb=off,gic-version=2,dump-guest-core=off,memory-backend=mach-virt.ram,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format \ -machine virt-4.0,usb=off,gic-version=2,dump-guest-core=off,memory-backend=mach-virt.ram,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format \
-accel tcg \ -accel tcg \
-cpu cortex-a15 \ -cpu cortex-a15 \
-m size=4194304k \ -m size=4194304k \

View File

@ -10,9 +10,9 @@
<currentMemory>4194304</currentMemory> <currentMemory>4194304</currentMemory>
<vcpu>4</vcpu> <vcpu>4</vcpu>
<os> <os>
<type arch='aarch64' machine='virt'>hvm</type> <type arch='aarch64' machine='virt-4.0'>hvm</type>
<loader readonly='yes' type='pflash'>/usr/share/AAVMF/AAVMF_CODE.fd</loader> <loader readonly='yes' type='pflash'>/usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.raw</loader>
<nvram>/some/user/nvram/path/guest_VARS.fd</nvram> <nvram>/path/to/guest_VARS.raw</nvram>
<boot dev='hd'/> <boot dev='hd'/>
</os> </os>
<features> <features>

View File

@ -10,11 +10,11 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
-name guest=guest,debug-threads=on \ -name guest=guest,debug-threads=on \
-S \ -S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/AAVMF/AAVMF_CODE.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.raw","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \ -blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/some/user/nvram/path/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/path/to/guest_VARS.raw","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \ -blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \
-machine virt,usb=off,gic-version=2,dump-guest-core=off,memory-backend=mach-virt.ram,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format \ -machine virt-4.0,usb=off,gic-version=2,dump-guest-core=off,memory-backend=mach-virt.ram,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format \
-accel tcg \ -accel tcg \
-cpu cortex-a15 \ -cpu cortex-a15 \
-m size=4194304k \ -m size=4194304k \

View File

@ -10,9 +10,9 @@
<currentMemory>4194304</currentMemory> <currentMemory>4194304</currentMemory>
<vcpu>4</vcpu> <vcpu>4</vcpu>
<os> <os>
<type arch='aarch64' machine='virt'>hvm</type> <type arch='aarch64' machine='virt-4.0'>hvm</type>
<loader readonly='yes' type='pflash'>/usr/share/AAVMF/AAVMF_CODE.fd</loader> <loader readonly='yes' type='pflash'>/usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.raw</loader>
<nvram>/some/user/nvram/path/guest_VARS.fd</nvram> <nvram>/path/to/guest_VARS.raw</nvram>
<boot dev='hd'/> <boot dev='hd'/>
</os> </os>
<features> <features>

View File

@ -10,7 +10,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
-name guest=guest,debug-threads=on \ -name guest=guest,debug-threads=on \
-S \ -S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/AAVMF/AAVMF_CODE.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.raw","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \ -blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \ -blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \

View File

@ -10,7 +10,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
-name guest=guest,debug-threads=on \ -name guest=guest,debug-threads=on \
-S \ -S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/AAVMF/AAVMF_CODE.qcow2","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.qcow2","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"qcow2","file":"libvirt-pflash0-storage"}' \ -blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"qcow2","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.qcow2","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.qcow2","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"qcow2","file":"libvirt-pflash1-storage"}' \ -blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"qcow2","file":"libvirt-pflash1-storage"}' \

View File

@ -1,17 +0,0 @@
<domain type='qemu'>
<name>guest</name>
<uuid>63840878-0deb-4095-97e6-fc444d9bc9fa</uuid>
<memory unit='KiB'>1048576</memory>
<vcpu placement='static'>1</vcpu>
<os firmware='efi'>
<type arch='aarch64' machine='virt-4.0'>hvm</type>
</os>
<features>
<acpi/>
</features>
<devices>
<emulator>/usr/bin/qemu-system-aarch64</emulator>
<controller type='usb' model='none'/>
<memballoon model='none'/>
</devices>
</domain>

View File

@ -0,0 +1 @@
firmware-auto-efi-aarch64.xml

View File

@ -0,0 +1,38 @@
LC_ALL=C \
PATH=/bin \
HOME=/var/lib/libvirt/qemu/domain--1-guest \
USER=test \
LOGNAME=test \
XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-guest/.local/share \
XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-guest/.cache \
XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
/usr/bin/qemu-system-x86_64 \
-name guest=guest,debug-threads=on \
-S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/edk2/ovmf/OVMF_CODE_4M.secboot.qcow2","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"qcow2","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.qcow2","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"qcow2","file":"libvirt-pflash1-storage"}' \
-machine pc-q35-4.0,usb=off,smm=on,dump-guest-core=off,memory-backend=pc.ram,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format,acpi=on \
-accel kvm \
-cpu qemu64 \
-global driver=cfi.pflash01,property=secure,value=on \
-m size=1048576k \
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}' \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
-uuid 63840878-0deb-4095-97e6-fc444d9bc9fa \
-display none \
-no-user-config \
-nodefaults \
-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc \
-no-shutdown \
-boot strict=on \
-audiodev '{"id":"audio1","driver":"none"}' \
-global ICH9-LPC.noreboot=off \
-watchdog-action reset \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on

View File

@ -0,0 +1 @@
firmware-auto-efi.xml

View File

@ -10,7 +10,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
-name guest=guest,debug-threads=on \ -name guest=guest,debug-threads=on \
-S \ -S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/OVMF/OVMF_CODE.secboot.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \ -blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \ -blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \

View File

@ -0,0 +1,38 @@
LC_ALL=C \
PATH=/bin \
HOME=/var/lib/libvirt/qemu/domain--1-guest \
USER=test \
LOGNAME=test \
XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-guest/.local/share \
XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-guest/.cache \
XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
/usr/bin/qemu-system-x86_64 \
-name guest=guest,debug-threads=on \
-S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/edk2/ovmf/OVMF_CODE_4M.secboot.qcow2","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"qcow2","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/path/to/guest_VARS.qcow2","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"qcow2","file":"libvirt-pflash1-storage"}' \
-machine pc-q35-4.0,usb=off,smm=on,dump-guest-core=off,memory-backend=pc.ram,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format,acpi=on \
-accel kvm \
-cpu qemu64 \
-global driver=cfi.pflash01,property=secure,value=on \
-m size=1048576k \
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}' \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
-uuid 63840878-0deb-4095-97e6-fc444d9bc9fa \
-display none \
-no-user-config \
-nodefaults \
-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc \
-no-shutdown \
-boot strict=on \
-audiodev '{"id":"audio1","driver":"none"}' \
-global ICH9-LPC.noreboot=off \
-watchdog-action reset \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on

View File

@ -0,0 +1,19 @@
<domain type='kvm'>
<name>guest</name>
<uuid>63840878-0deb-4095-97e6-fc444d9bc9fa</uuid>
<memory unit='KiB'>1048576</memory>
<vcpu placement='static'>1</vcpu>
<os firmware='efi'>
<type arch='x86_64' machine='pc-q35-4.0'>hvm</type>
<loader format='qcow2'/>
<nvram>/path/to/guest_VARS.qcow2</nvram>
</os>
<features>
<acpi/>
</features>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<controller type='usb' model='none'/>
<memballoon model='none'/>
</devices>
</domain>

View File

@ -10,13 +10,14 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
-name guest=guest,debug-threads=on \ -name guest=guest,debug-threads=on \
-S \ -S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/OVMF/OVMF_CODE.qcow2","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/usr/share/edk2/ovmf/OVMF_CODE_4M.secboot.qcow2","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"qcow2","file":"libvirt-pflash0-storage"}' \ -blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"qcow2","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.qcow2","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.qcow2","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"qcow2","file":"libvirt-pflash1-storage"}' \ -blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"qcow2","file":"libvirt-pflash1-storage"}' \
-machine pc-q35-4.0,usb=off,dump-guest-core=off,memory-backend=pc.ram,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format,acpi=on \ -machine pc-q35-4.0,usb=off,smm=on,dump-guest-core=off,memory-backend=pc.ram,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format,acpi=on \
-accel kvm \ -accel kvm \
-cpu qemu64 \ -cpu qemu64 \
-global driver=cfi.pflash01,property=secure,value=on \
-m size=1048576k \ -m size=1048576k \
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}' \ -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}' \
-overcommit mem-lock=off \ -overcommit mem-lock=off \

View File

@ -0,0 +1,35 @@
LC_ALL=C \
PATH=/bin \
HOME=/var/lib/libvirt/qemu/domain--1-guest \
USER=test \
LOGNAME=test \
XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-guest/.local/share \
XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-guest/.cache \
XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
/usr/bin/qemu-system-aarch64 \
-name guest=guest,debug-threads=on \
-S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.raw","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.raw","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \
-machine virt-4.0,usb=off,gic-version=2,dump-guest-core=off,memory-backend=mach-virt.ram,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format \
-accel tcg \
-cpu cortex-a15 \
-m size=1048576k \
-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":1073741824}' \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
-uuid 63840878-0deb-4095-97e6-fc444d9bc9fa \
-display none \
-no-user-config \
-nodefaults \
-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc \
-no-shutdown \
-boot strict=on \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on

View File

@ -0,0 +1 @@
firmware-auto-efi-format-loader-raw.xml

View File

@ -10,7 +10,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
-name guest=guest,debug-threads=on \ -name guest=guest,debug-threads=on \
-S \ -S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/AAVMF/AAVMF_CODE.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.raw","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \ -blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \ -blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \

View File

@ -6,7 +6,7 @@
<os firmware='efi'> <os firmware='efi'>
<type arch='x86_64' machine='pc-q35-4.0'>hvm</type> <type arch='x86_64' machine='pc-q35-4.0'>hvm</type>
<loader format='qcow2'/> <loader format='qcow2'/>
<nvram>/path/to/guest_VARS.fd</nvram> <nvram format='raw'/>
</os> </os>
<features> <features>
<acpi/> <acpi/>

View File

@ -10,7 +10,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
-name guest=guest,debug-threads=on \ -name guest=guest,debug-threads=on \
-S \ -S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/OVMF/OVMF_CODE.qcow2","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/usr/share/edk2/ovmf/OVMF_CODE_4M.qcow2","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"qcow2","file":"libvirt-pflash0-storage"}' \ -blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"qcow2","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"nbd","server":{"type":"inet","host":"example.org","port":"6000"},"export":"bar","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"nbd","server":{"type":"inet","host":"example.org","port":"6000"},"export":"bar","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"qcow2","file":"libvirt-pflash1-storage"}' \ -blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"qcow2","file":"libvirt-pflash1-storage"}' \

View File

@ -10,13 +10,14 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
-name guest=guest,debug-threads=on \ -name guest=guest,debug-threads=on \
-S \ -S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/OVMF/OVMF_CODE.qcow2","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/usr/share/edk2/ovmf/OVMF_CODE_4M.secboot.qcow2","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"qcow2","file":"libvirt-pflash0-storage"}' \ -blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"qcow2","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/path/to/guest_VARS.qcow2","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/path/to/guest_VARS.qcow2","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"qcow2","file":"libvirt-pflash1-storage"}' \ -blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"qcow2","file":"libvirt-pflash1-storage"}' \
-machine pc-q35-4.0,usb=off,dump-guest-core=off,memory-backend=pc.ram,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format,acpi=on \ -machine pc-q35-4.0,usb=off,smm=on,dump-guest-core=off,memory-backend=pc.ram,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format,acpi=on \
-accel kvm \ -accel kvm \
-cpu qemu64 \ -cpu qemu64 \
-global driver=cfi.pflash01,property=secure,value=on \
-m size=1048576k \ -m size=1048576k \
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}' \ -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}' \
-overcommit mem-lock=off \ -overcommit mem-lock=off \

View File

@ -10,13 +10,14 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
-name guest=guest,debug-threads=on \ -name guest=guest,debug-threads=on \
-S \ -S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/OVMF/OVMF_CODE.qcow2","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/usr/share/edk2/ovmf/OVMF_CODE_4M.secboot.qcow2","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"qcow2","file":"libvirt-pflash0-storage"}' \ -blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"qcow2","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.qcow2","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.qcow2","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"qcow2","file":"libvirt-pflash1-storage"}' \ -blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"qcow2","file":"libvirt-pflash1-storage"}' \
-machine pc-q35-4.0,usb=off,dump-guest-core=off,memory-backend=pc.ram,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format,acpi=on \ -machine pc-q35-4.0,usb=off,smm=on,dump-guest-core=off,memory-backend=pc.ram,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format,acpi=on \
-accel kvm \ -accel kvm \
-cpu qemu64 \ -cpu qemu64 \
-global driver=cfi.pflash01,property=secure,value=on \
-m size=1048576k \ -m size=1048576k \
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}' \ -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}' \
-overcommit mem-lock=off \ -overcommit mem-lock=off \

View File

@ -10,7 +10,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
-name guest=guest,debug-threads=on \ -name guest=guest,debug-threads=on \
-S \ -S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/OVMF/OVMF_CODE.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/usr/share/edk2/ovmf/OVMF_CODE.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \ -blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \ -blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \

View File

@ -10,7 +10,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
-name guest=guest,debug-threads=on \ -name guest=guest,debug-threads=on \
-S \ -S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/OVMF/OVMF_CODE.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/usr/share/edk2/ovmf/OVMF_CODE.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \ -blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \ -blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \

View File

@ -5,7 +5,7 @@
<vcpu placement='static'>1</vcpu> <vcpu placement='static'>1</vcpu>
<os firmware='efi'> <os firmware='efi'>
<type arch='x86_64' machine='pc-q35-4.0'>hvm</type> <type arch='x86_64' machine='pc-q35-4.0'>hvm</type>
<loader readonly='yes' type='pflash'>/usr/share/OVMF/OVMF_CODE.fd</loader> <loader readonly='yes' type='pflash'>/usr/share/edk2/ovmf/OVMF_CODE.fd</loader>
</os> </os>
<features> <features>
<acpi/> <acpi/>

View File

@ -0,0 +1,38 @@
LC_ALL=C \
PATH=/bin \
HOME=/var/lib/libvirt/qemu/domain--1-guest \
USER=test \
LOGNAME=test \
XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-guest/.local/share \
XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-guest/.cache \
XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
/usr/bin/qemu-system-x86_64 \
-name guest=guest,debug-threads=on \
-S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/edk2/ovmf/OVMF_CODE_4M.secboot.qcow2","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"qcow2","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.qcow2","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"qcow2","file":"libvirt-pflash1-storage"}' \
-machine pc-q35-4.0,usb=off,smm=on,dump-guest-core=off,memory-backend=pc.ram,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format,acpi=on \
-accel kvm \
-cpu qemu64 \
-global driver=cfi.pflash01,property=secure,value=on \
-m size=1048576k \
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}' \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
-uuid 63840878-0deb-4095-97e6-fc444d9bc9fa \
-display none \
-no-user-config \
-nodefaults \
-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc \
-no-shutdown \
-boot strict=on \
-audiodev '{"id":"audio1","driver":"none"}' \
-global ICH9-LPC.noreboot=off \
-watchdog-action reset \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on

View File

@ -0,0 +1 @@
firmware-auto-efi-loader-secure.xml

View File

@ -10,7 +10,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
-name guest=guest,debug-threads=on \ -name guest=guest,debug-threads=on \
-S \ -S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/OVMF/OVMF_CODE.secboot.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \ -blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \ -blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \

View File

@ -10,7 +10,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
-name guest=guest,debug-threads=on \ -name guest=guest,debug-threads=on \
-S \ -S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/OVMF/OVMF_CODE.secboot.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \ -blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \ -blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \

View File

@ -10,7 +10,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
-name guest=guest,debug-threads=on \ -name guest=guest,debug-threads=on \
-S \ -S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/OVMF/OVMF_CODE.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/usr/share/edk2/ovmf/OVMF_CODE.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \ -blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \ -blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \

View File

@ -10,7 +10,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
-name guest=guest,debug-threads=on \ -name guest=guest,debug-threads=on \
-S \ -S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/OVMF/OVMF_CODE.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/usr/share/edk2/ovmf/OVMF_CODE.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \ -blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/path/to/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/path/to/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \ -blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \

View File

@ -10,7 +10,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
-name guest=guest,debug-threads=on \ -name guest=guest,debug-threads=on \
-S \ -S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/OVMF/OVMF_CODE.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/usr/share/edk2/ovmf/OVMF_CODE.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \ -blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
-object '{"qom-type":"secret","id":"libvirt-pflash1-storage-auth-secret0","data":"9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1","keyid":"masterKey0","iv":"AAECAwQFBgcICQoLDA0ODw==","format":"base64"}' \ -object '{"qom-type":"secret","id":"libvirt-pflash1-storage-auth-secret0","data":"9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1","keyid":"masterKey0","iv":"AAECAwQFBgcICQoLDA0ODw==","format":"base64"}' \
-blockdev '{"driver":"iscsi","portal":"example.com:6000","target":"iqn.2013-07.com.example:iscsi-nopool","lun":0,"transport":"tcp","user":"myname","password-secret":"libvirt-pflash1-storage-auth-secret0","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"iscsi","portal":"example.com:6000","target":"iqn.2013-07.com.example:iscsi-nopool","lun":0,"transport":"tcp","user":"myname","password-secret":"libvirt-pflash1-storage-auth-secret0","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \

View File

@ -10,7 +10,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
-name guest=guest,debug-threads=on \ -name guest=guest,debug-threads=on \
-S \ -S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/OVMF/OVMF_CODE.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/usr/share/edk2/ovmf/OVMF_CODE.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \ -blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"nbd","server":{"type":"inet","host":"example.org","port":"6000"},"export":"bar","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"nbd","server":{"type":"inet","host":"example.org","port":"6000"},"export":"bar","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \ -blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \

View File

@ -10,7 +10,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
-name guest=guest,debug-threads=on \ -name guest=guest,debug-threads=on \
-S \ -S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/OVMF/OVMF_CODE.secboot.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \ -blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/path/to/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/path/to/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \ -blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \

View File

@ -0,0 +1 @@
operation failed: Unable to find any firmware to satisfy 'efi'

View File

@ -0,0 +1,19 @@
<domain type='kvm'>
<name>guest</name>
<uuid>63840878-0deb-4095-97e6-fc444d9bc9fa</uuid>
<memory unit='KiB'>1048576</memory>
<vcpu placement='static'>1</vcpu>
<os firmware='efi'>
<type arch='x86_64' machine='pc-q35-4.0'>hvm</type>
<loader readonly='yes' type='pflash'>/usr/share/edk2/ovmf/OVMF_CODE.fd</loader>
<nvram template='/path/to/OVMF_VARS.fd'/>
</os>
<features>
<acpi/>
</features>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<controller type='usb' model='none'/>
<memballoon model='none'/>
</devices>
</domain>

View File

@ -0,0 +1,38 @@
LC_ALL=C \
PATH=/bin \
HOME=/var/lib/libvirt/qemu/domain--1-guest \
USER=test \
LOGNAME=test \
XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-guest/.local/share \
XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-guest/.cache \
XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
/usr/bin/qemu-system-x86_64 \
-name guest=guest,debug-threads=on \
-S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \
-machine pc-q35-4.0,usb=off,smm=on,dump-guest-core=off,memory-backend=pc.ram,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format,acpi=on \
-accel kvm \
-cpu qemu64 \
-global driver=cfi.pflash01,property=secure,value=on \
-m size=1048576k \
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}' \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
-uuid 63840878-0deb-4095-97e6-fc444d9bc9fa \
-display none \
-no-user-config \
-nodefaults \
-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc \
-no-shutdown \
-boot strict=on \
-audiodev '{"id":"audio1","driver":"none"}' \
-global ICH9-LPC.noreboot=off \
-watchdog-action reset \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on

View File

@ -0,0 +1,18 @@
<domain type='kvm'>
<name>guest</name>
<uuid>63840878-0deb-4095-97e6-fc444d9bc9fa</uuid>
<memory unit='KiB'>1048576</memory>
<vcpu placement='static'>1</vcpu>
<os firmware='efi'>
<type arch='x86_64' machine='pc-q35-4.0'>hvm</type>
<nvram template='/usr/share/edk2/ovmf/OVMF_VARS.fd'/>
</os>
<features>
<acpi/>
</features>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<controller type='usb' model='none'/>
<memballoon model='none'/>
</devices>
</domain>

View File

@ -0,0 +1 @@
operation failed: Unable to find any firmware to satisfy 'efi'

View File

@ -0,0 +1 @@
firmware-auto-efi-rw.xml

View File

@ -0,0 +1 @@
operation failed: Unable to find any firmware to satisfy 'efi'

View File

@ -0,0 +1,18 @@
<domain type='kvm'>
<name>guest</name>
<uuid>63840878-0deb-4095-97e6-fc444d9bc9fa</uuid>
<memory unit='KiB'>1048576</memory>
<vcpu placement='static'>1</vcpu>
<os firmware='efi'>
<type arch='x86_64' machine='pc-q35-4.0'>hvm</type>
<loader readonly='no'/>
</os>
<features>
<acpi/>
</features>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<controller type='usb' model='none'/>
<memballoon model='none'/>
</devices>
</domain>

View File

@ -10,7 +10,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
-name guest=guest,debug-threads=on \ -name guest=guest,debug-threads=on \
-S \ -S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/OVMF/OVMF_CODE.secboot.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \ -blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \ -blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \

View File

@ -10,7 +10,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
-name guest=guest,debug-threads=on \ -name guest=guest,debug-threads=on \
-S \ -S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/OVMF/OVMF_CODE.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/usr/share/edk2/ovmf/OVMF_CODE.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \ -blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \ -blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \

View File

@ -10,7 +10,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
-name guest=guest,debug-threads=on \ -name guest=guest,debug-threads=on \
-S \ -S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/OVMF/OVMF.sev.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/usr/share/edk2/ovmf/OVMF.amdsev.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \ -blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
-machine pc-q35-4.0,usb=off,dump-guest-core=off,memory-backend=pc.ram,pflash0=libvirt-pflash0-format,acpi=on \ -machine pc-q35-4.0,usb=off,dump-guest-core=off,memory-backend=pc.ram,pflash0=libvirt-pflash0-format,acpi=on \
-accel kvm \ -accel kvm \

View File

@ -10,7 +10,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
-name guest=guest,debug-threads=on \ -name guest=guest,debug-threads=on \
-S \ -S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/OVMF/OVMF_CODE.secboot.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \ -blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \ -blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \

View File

@ -0,0 +1,35 @@
LC_ALL=C \
PATH=/bin \
HOME=/var/lib/libvirt/qemu/domain--1-guest \
USER=test \
LOGNAME=test \
XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-guest/.local/share \
XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-guest/.cache \
XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
/usr/bin/qemu-system-aarch64 \
-name guest=guest,debug-threads=on \
-S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/AAVMF/AAVMF_CODE.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \
-machine virt-4.0,usb=off,gic-version=2,dump-guest-core=off,memory-backend=mach-virt.ram,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format \
-accel tcg \
-cpu cortex-a15 \
-m size=1048576k \
-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":1073741824}' \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
-uuid 63840878-0deb-4095-97e6-fc444d9bc9fa \
-display none \
-no-user-config \
-nodefaults \
-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc \
-no-shutdown \
-boot strict=on \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on

View File

@ -0,0 +1,19 @@
<domain type='qemu'>
<name>guest</name>
<uuid>63840878-0deb-4095-97e6-fc444d9bc9fa</uuid>
<memory unit='KiB'>1048576</memory>
<vcpu placement='static'>1</vcpu>
<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'/>
</os>
<features>
<acpi/>
</features>
<devices>
<emulator>/usr/bin/qemu-system-aarch64</emulator>
<controller type='usb' model='none'/>
<memballoon model='none'/>
</devices>
</domain>

View File

@ -10,9 +10,9 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
-name guest=guest,debug-threads=on \ -name guest=guest,debug-threads=on \
-S \ -S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/AAVMF/AAVMF_CODE.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.raw","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \ -blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/path/to/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/path/to/guest_VARS.raw","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \ -blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \
-machine virt-4.0,usb=off,gic-version=2,dump-guest-core=off,memory-backend=mach-virt.ram,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format \ -machine virt-4.0,usb=off,gic-version=2,dump-guest-core=off,memory-backend=mach-virt.ram,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format \
-accel tcg \ -accel tcg \

View File

@ -5,8 +5,8 @@
<vcpu placement='static'>1</vcpu> <vcpu placement='static'>1</vcpu>
<os> <os>
<type arch='aarch64' machine='virt-4.0'>hvm</type> <type arch='aarch64' machine='virt-4.0'>hvm</type>
<loader readonly='yes' type='pflash'>/usr/share/AAVMF/AAVMF_CODE.fd</loader> <loader readonly='yes' type='pflash'>/usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.raw</loader>
<nvram>/path/to/guest_VARS.fd</nvram> <nvram>/path/to/guest_VARS.raw</nvram>
</os> </os>
<features> <features>
<acpi/> <acpi/>

View File

@ -10,7 +10,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
-name guest=guest,debug-threads=on \ -name guest=guest,debug-threads=on \
-S \ -S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/OVMF/OVMF_CODE.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/usr/share/edk2/ovmf/OVMF_CODE.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \ -blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/path/to/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/path/to/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \ -blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \

View File

@ -5,7 +5,7 @@
<vcpu placement='static'>1</vcpu> <vcpu placement='static'>1</vcpu>
<os> <os>
<type arch='x86_64' machine='pc-q35-4.0'>hvm</type> <type arch='x86_64' machine='pc-q35-4.0'>hvm</type>
<loader readonly='yes' type='pflash'>/usr/share/OVMF/OVMF_CODE.fd</loader> <loader readonly='yes' type='pflash'>/usr/share/edk2/ovmf/OVMF_CODE.fd</loader>
<nvram>/path/to/guest_VARS.fd</nvram> <nvram>/path/to/guest_VARS.fd</nvram>
</os> </os>
<features> <features>

View File

@ -10,7 +10,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
-name guest=guest,debug-threads=on \ -name guest=guest,debug-threads=on \
-S \ -S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/OVMF/OVMF_CODE.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/usr/share/edk2/ovmf/OVMF_CODE.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \ -blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \ -blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \

View File

@ -8,7 +8,7 @@
<firmware> <firmware>
<feature enabled='no' name='enrolled-keys'/> <feature enabled='no' name='enrolled-keys'/>
</firmware> </firmware>
<loader readonly='yes' type='pflash'>/usr/share/OVMF/OVMF_CODE.fd</loader> <loader readonly='yes' type='pflash'>/usr/share/edk2/ovmf/OVMF_CODE.fd</loader>
</os> </os>
<features> <features>
<acpi/> <acpi/>

View File

@ -0,0 +1,37 @@
LC_ALL=C \
PATH=/bin \
HOME=/var/lib/libvirt/qemu/domain--1-guest \
USER=test \
LOGNAME=test \
XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-guest/.local/share \
XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-guest/.cache \
XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
/usr/bin/qemu-system-x86_64 \
-name guest=guest,debug-threads=on \
-S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/path/to/OVMF_CODE.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \
-machine pc-q35-4.0,usb=off,dump-guest-core=off,memory-backend=pc.ram,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format,acpi=on \
-accel tcg \
-cpu qemu64 \
-m size=1048576k \
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}' \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
-uuid 63840878-0deb-4095-97e6-fc444d9bc9fa \
-display none \
-no-user-config \
-nodefaults \
-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc \
-no-shutdown \
-boot strict=on \
-audiodev '{"id":"audio1","driver":"none"}' \
-global ICH9-LPC.noreboot=off \
-watchdog-action reset \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on

View File

@ -0,0 +1,19 @@
<domain type='qemu'>
<name>guest</name>
<uuid>63840878-0deb-4095-97e6-fc444d9bc9fa</uuid>
<memory unit='KiB'>1048576</memory>
<vcpu placement='static'>1</vcpu>
<os>
<type arch='x86_64' machine='pc-q35-4.0'>hvm</type>
<loader readonly='yes' type='pflash'>/path/to/OVMF_CODE.fd</loader>
<nvram template='/path/to/OVMF_VARS.fd'/>
</os>
<features>
<acpi/>
</features>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<controller type='usb' model='none'/>
<memballoon model='none'/>
</devices>
</domain>

View File

@ -10,7 +10,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
-name guest=guest,debug-threads=on \ -name guest=guest,debug-threads=on \
-S \ -S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/OVMF/OVMF_CODE.secboot.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \ -blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/path/to/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/path/to/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \ -blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \

View File

@ -5,7 +5,7 @@
<vcpu placement='static'>1</vcpu> <vcpu placement='static'>1</vcpu>
<os> <os>
<type arch='x86_64' machine='pc-q35-4.0'>hvm</type> <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> <loader readonly='yes' secure='yes' type='pflash'>/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd</loader>
<nvram>/path/to/guest_VARS.fd</nvram> <nvram>/path/to/guest_VARS.fd</nvram>
</os> </os>
<features> <features>

View File

@ -0,0 +1,38 @@
LC_ALL=C \
PATH=/bin \
HOME=/var/lib/libvirt/qemu/domain--1-guest \
USER=test \
LOGNAME=test \
XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-guest/.local/share \
XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-guest/.cache \
XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
/usr/bin/qemu-system-x86_64 \
-name guest=guest,debug-threads=on \
-S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/OVMF/OVMF_CODE.secboot.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \
-machine pc-q35-4.0,usb=off,smm=on,dump-guest-core=off,memory-backend=pc.ram,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format,acpi=on \
-accel tcg \
-cpu qemu64 \
-global driver=cfi.pflash01,property=secure,value=on \
-m size=1048576k \
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}' \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
-uuid 63840878-0deb-4095-97e6-fc444d9bc9fa \
-display none \
-no-user-config \
-nodefaults \
-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc \
-no-shutdown \
-boot strict=on \
-audiodev '{"id":"audio1","driver":"none"}' \
-global ICH9-LPC.noreboot=off \
-watchdog-action reset \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on

View File

@ -0,0 +1,20 @@
<domain type='qemu'>
<name>guest</name>
<uuid>63840878-0deb-4095-97e6-fc444d9bc9fa</uuid>
<memory unit='KiB'>1048576</memory>
<vcpu placement='static'>1</vcpu>
<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'/>
</os>
<features>
<acpi/>
<smm state='on'/>
</features>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<controller type='usb' model='none'/>
<memballoon model='none'/>
</devices>
</domain>

View File

@ -10,7 +10,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
-name guest=guest,debug-threads=on \ -name guest=guest,debug-threads=on \
-S \ -S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/OVMF/OVMF_CODE.secboot.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \ -blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/path/to/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/path/to/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \ -blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \

View File

@ -5,8 +5,8 @@
<vcpu placement='static'>1</vcpu> <vcpu placement='static'>1</vcpu>
<os> <os>
<type arch='x86_64' machine='pc-q35-4.0'>hvm</type> <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> <loader readonly='yes' secure='yes' type='pflash'>/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd</loader>
<nvram template='/usr/share/OVMF/OVMF_VARS.fd'>/path/to/guest_VARS.fd</nvram> <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.fd'>/path/to/guest_VARS.fd</nvram>
</os> </os>
<features> <features>
<acpi/> <acpi/>

View File

@ -0,0 +1,37 @@
LC_ALL=C \
PATH=/bin \
HOME=/var/lib/libvirt/qemu/domain--1-guest \
USER=test \
LOGNAME=test \
XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-guest/.local/share \
XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-guest/.cache \
XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
/usr/bin/qemu-system-x86_64 \
-name guest=guest,debug-threads=on \
-S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/OVMF/OVMF_CODE.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \
-machine pc-q35-4.0,usb=off,dump-guest-core=off,memory-backend=pc.ram,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format,acpi=on \
-accel tcg \
-cpu qemu64 \
-m size=1048576k \
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}' \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
-uuid 63840878-0deb-4095-97e6-fc444d9bc9fa \
-display none \
-no-user-config \
-nodefaults \
-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc \
-no-shutdown \
-boot strict=on \
-audiodev '{"id":"audio1","driver":"none"}' \
-global ICH9-LPC.noreboot=off \
-watchdog-action reset \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on

View File

@ -0,0 +1,19 @@
<domain type='qemu'>
<name>guest</name>
<uuid>63840878-0deb-4095-97e6-fc444d9bc9fa</uuid>
<memory unit='KiB'>1048576</memory>
<vcpu placement='static'>1</vcpu>
<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'/>
</os>
<features>
<acpi/>
</features>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<controller type='usb' model='none'/>
<memballoon model='none'/>
</devices>
</domain>

View File

@ -10,7 +10,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
-name guest=guest,debug-threads=on \ -name guest=guest,debug-threads=on \
-S \ -S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/OVMF/OVMF_CODE.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/usr/share/edk2/ovmf/OVMF_CODE.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \ -blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/path/to/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"file","filename":"/path/to/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \ -blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \

Some files were not shown because too many files have changed in this diff Show More