mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 09:17:52 +03:00
qemuDomainInitializePflashStorageSource: Properly and fully initialize nvram source
Setup all fields for use with -blockdev. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> Tested-by: Rohit Kumar <rohit.kumar3@nutanix.com>
This commit is contained in:
parent
9945c24259
commit
c3c586baa1
@ -11311,7 +11311,8 @@ qemuDomainSupportsCheckpointsBlockjobs(virDomainObj *vm)
|
|||||||
* 'libvirt-pflash1-format' for pflash1.
|
* 'libvirt-pflash1-format' for pflash1.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
qemuDomainInitializePflashStorageSource(virDomainObj *vm)
|
qemuDomainInitializePflashStorageSource(virDomainObj *vm,
|
||||||
|
virQEMUDriverConfig *cfg)
|
||||||
{
|
{
|
||||||
qemuDomainObjPrivate *priv = vm->privateData;
|
qemuDomainObjPrivate *priv = vm->privateData;
|
||||||
virDomainDef *def = vm->def;
|
virDomainDef *def = vm->def;
|
||||||
@ -11334,8 +11335,12 @@ qemuDomainInitializePflashStorageSource(virDomainObj *vm)
|
|||||||
|
|
||||||
|
|
||||||
if (def->os.loader->nvram) {
|
if (def->os.loader->nvram) {
|
||||||
def->os.loader->nvram->nodeformat = g_strdup("libvirt-pflash1-format");
|
if (qemuDomainPrepareStorageSourceBlockdevNodename(NULL,
|
||||||
def->os.loader->nvram->nodestorage = g_strdup("libvirt-pflash1-storage");
|
def->os.loader->nvram,
|
||||||
|
"libvirt-pflash1",
|
||||||
|
priv,
|
||||||
|
cfg) < 0)
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
priv->pflash0 = g_steal_pointer(&pflash0);
|
priv->pflash0 = g_steal_pointer(&pflash0);
|
||||||
|
@ -1048,7 +1048,8 @@ int
|
|||||||
qemuDomainMakeCPUMigratable(virCPUDef *cpu);
|
qemuDomainMakeCPUMigratable(virCPUDef *cpu);
|
||||||
|
|
||||||
int
|
int
|
||||||
qemuDomainInitializePflashStorageSource(virDomainObj *vm);
|
qemuDomainInitializePflashStorageSource(virDomainObj *vm,
|
||||||
|
virQEMUDriverConfig *cfg);
|
||||||
|
|
||||||
bool
|
bool
|
||||||
qemuDomainDiskBlockJobIsSupported(virDomainObj *vm,
|
qemuDomainDiskBlockJobIsSupported(virDomainObj *vm,
|
||||||
|
@ -6702,7 +6702,7 @@ qemuProcessPrepareDomain(virQEMUDriver *driver,
|
|||||||
VIR_DEBUG("Prepare bios/uefi paths");
|
VIR_DEBUG("Prepare bios/uefi paths");
|
||||||
if (qemuFirmwareFillDomain(driver, vm->def, flags) < 0)
|
if (qemuFirmwareFillDomain(driver, vm->def, flags) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
if (qemuDomainInitializePflashStorageSource(vm) < 0)
|
if (qemuDomainInitializePflashStorageSource(vm, cfg) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
VIR_DEBUG("Preparing external devices");
|
VIR_DEBUG("Preparing external devices");
|
||||||
|
Loading…
Reference in New Issue
Block a user