mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 22:55:23 +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;
|
virDomainMemoryFindInactiveByDef;
|
||||||
virDomainMemoryInsert;
|
virDomainMemoryInsert;
|
||||||
virDomainMemoryRemove;
|
virDomainMemoryRemove;
|
||||||
|
virDomainMemorySourceTypeFromString;
|
||||||
|
virDomainMemorySourceTypeToString;
|
||||||
virDomainNetAppendIPAddress;
|
virDomainNetAppendIPAddress;
|
||||||
virDomainNetDefClear;
|
virDomainNetDefClear;
|
||||||
virDomainNetDefFormat;
|
virDomainNetDefFormat;
|
||||||
|
@ -910,7 +910,7 @@ virQEMUDriverCreateXMLConf(virQEMUDriverPtr driver)
|
|||||||
return virDomainXMLOptionNew(&virQEMUDriverDomainDefParserConfig,
|
return virDomainXMLOptionNew(&virQEMUDriverDomainDefParserConfig,
|
||||||
&virQEMUDriverPrivateDataCallbacks,
|
&virQEMUDriverPrivateDataCallbacks,
|
||||||
&virQEMUDriverDomainXMLNamespace,
|
&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
|
bool
|
||||||
qemuDomainDefCheckABIStability(virQEMUDriverPtr driver,
|
qemuDomainDefCheckABIStability(virQEMUDriverPtr driver,
|
||||||
virDomainDefPtr src,
|
virDomainDefPtr src,
|
||||||
|
@ -636,6 +636,7 @@ void qemuDomainCleanupRun(virQEMUDriverPtr driver,
|
|||||||
extern virDomainXMLPrivateDataCallbacks virQEMUDriverPrivateDataCallbacks;
|
extern virDomainXMLPrivateDataCallbacks virQEMUDriverPrivateDataCallbacks;
|
||||||
extern virDomainXMLNamespace virQEMUDriverDomainXMLNamespace;
|
extern virDomainXMLNamespace virQEMUDriverDomainXMLNamespace;
|
||||||
extern virDomainDefParserConfig virQEMUDriverDomainDefParserConfig;
|
extern virDomainDefParserConfig virQEMUDriverDomainDefParserConfig;
|
||||||
|
extern virDomainABIStability virQEMUDriverDomainABIStability;
|
||||||
|
|
||||||
int qemuDomainUpdateDeviceList(virQEMUDriverPtr driver,
|
int qemuDomainUpdateDeviceList(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm, int asyncJob);
|
virDomainObjPtr vm, int asyncJob);
|
||||||
|
Loading…
Reference in New Issue
Block a user