mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-28 19:41:16 +00:00
virQEMUDriverDomainABIStability: Check for memoryBacking
https://bugzilla.redhat.com/show_bug.cgi?id=1450349 Problem is, qemu fails to load guest memory image if these attribute change on migration/restore from an image. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
4f0aeed871
commit
7b4e9b2c55
@ -409,6 +409,8 @@ virDomainMemoryFindByDef;
|
||||
virDomainMemoryFindInactiveByDef;
|
||||
virDomainMemoryInsert;
|
||||
virDomainMemoryRemove;
|
||||
virDomainMemorySourceTypeFromString;
|
||||
virDomainMemorySourceTypeToString;
|
||||
virDomainNetAppendIPAddress;
|
||||
virDomainNetDefClear;
|
||||
virDomainNetDefFormat;
|
||||
|
@ -910,7 +910,7 @@ virQEMUDriverCreateXMLConf(virQEMUDriverPtr driver)
|
||||
return virDomainXMLOptionNew(&virQEMUDriverDomainDefParserConfig,
|
||||
&virQEMUDriverPrivateDataCallbacks,
|
||||
&virQEMUDriverDomainXMLNamespace,
|
||||
NULL);
|
||||
&virQEMUDriverDomainABIStability);
|
||||
}
|
||||
|
||||
|
||||
|
@ -5820,6 +5820,28 @@ qemuDomainUpdateMemoryDeviceInfo(virQEMUDriverPtr driver,
|
||||
}
|
||||
|
||||
|
||||
static bool
|
||||
qemuDomainABIStabilityCheck(const virDomainDef *src,
|
||||
const virDomainDef *dst)
|
||||
{
|
||||
if (src->mem.source != dst->mem.source) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("Target memoryBacking source '%s' doesn't "
|
||||
"match source memoryBacking source'%s'"),
|
||||
virDomainMemorySourceTypeToString(dst->mem.source),
|
||||
virDomainMemorySourceTypeToString(src->mem.source));
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
virDomainABIStability virQEMUDriverDomainABIStability = {
|
||||
.domain = qemuDomainABIStabilityCheck,
|
||||
};
|
||||
|
||||
|
||||
bool
|
||||
qemuDomainDefCheckABIStability(virQEMUDriverPtr driver,
|
||||
virDomainDefPtr src,
|
||||
|
@ -636,6 +636,7 @@ void qemuDomainCleanupRun(virQEMUDriverPtr driver,
|
||||
extern virDomainXMLPrivateDataCallbacks virQEMUDriverPrivateDataCallbacks;
|
||||
extern virDomainXMLNamespace virQEMUDriverDomainXMLNamespace;
|
||||
extern virDomainDefParserConfig virQEMUDriverDomainDefParserConfig;
|
||||
extern virDomainABIStability virQEMUDriverDomainABIStability;
|
||||
|
||||
int qemuDomainUpdateDeviceList(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm, int asyncJob);
|
||||
|
Loading…
Reference in New Issue
Block a user