Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/esx/esx_driver.c | 4 ++--
src/vmware/vmware_conf.c | 3 ++-
src/vmware/vmware_driver.c | 2 +-
src/vmx/vmx.c | 5 +++++
src/vmx/vmx.h | 1 +
tests/vmx2xmltest.c | 2 +-
6 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
index ebf23be..8d4b3fd 100644
--- a/src/esx/esx_driver.c
+++ b/src/esx/esx_driver.c
@@ -2743,7 +2743,7 @@ esxDomainGetXMLDesc(virDomainPtr domain, unsigned int flags)
ctx.autodetectSCSIControllerModel = NULL;
ctx.datacenterPath = priv->primary->datacenterPath;
- def = virVMXParseConfig(&ctx, priv->xmlopt, vmx);
+ def = virVMXParseConfig(&ctx, priv->xmlopt, priv->caps, vmx);
if (def) {
if (powerState != esxVI_VirtualMachinePowerState_PoweredOff)
@@ -2802,7 +2802,7 @@ esxConnectDomainXMLFromNative(virConnectPtr conn, const char
*nativeFormat,
ctx.autodetectSCSIControllerModel = NULL;
ctx.datacenterPath = NULL;
- def = virVMXParseConfig(&ctx, priv->xmlopt, nativeConfig);
+ def = virVMXParseConfig(&ctx, priv->xmlopt, priv->caps, nativeConfig);
if (def)
xml = virDomainDefFormat(def, VIR_DOMAIN_DEF_FORMAT_INACTIVE);
diff --git a/src/vmware/vmware_conf.c b/src/vmware/vmware_conf.c
index f3cbbf5..b30b5de 100644
--- a/src/vmware/vmware_conf.c
+++ b/src/vmware/vmware_conf.c
@@ -166,7 +166,8 @@ vmwareLoadDomains(struct vmware_driver *driver)
goto cleanup;
if ((vmdef =
- virVMXParseConfig(&ctx, driver->xmlopt, vmx)) == NULL) {
+ virVMXParseConfig(&ctx, driver->xmlopt,
+ driver->caps, vmx)) == NULL) {
goto cleanup;
}
diff --git a/src/vmware/vmware_driver.c b/src/vmware/vmware_driver.c
index a12b03a..7eedba3 100644
--- a/src/vmware/vmware_driver.c
+++ b/src/vmware/vmware_driver.c
@@ -1035,7 +1035,7 @@ vmwareConnectDomainXMLFromNative(virConnectPtr conn, const char
*nativeFormat,
ctx.autodetectSCSIControllerModel = NULL;
ctx.datacenterPath = NULL;
- def = virVMXParseConfig(&ctx, driver->xmlopt, nativeConfig);
+ def = virVMXParseConfig(&ctx, driver->xmlopt, driver->caps, nativeConfig);
if (def != NULL)
xml = virDomainDefFormat(def, VIR_DOMAIN_DEF_FORMAT_INACTIVE);
diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c
index 7c3c10a..2ae83f3 100644
--- a/src/vmx/vmx.c
+++ b/src/vmx/vmx.c
@@ -1276,6 +1276,7 @@ virVMXGatherSCSIControllers(virVMXContext *ctx, virDomainDefPtr
def,
virDomainDefPtr
virVMXParseConfig(virVMXContext *ctx,
virDomainXMLOptionPtr xmlopt,
+ virCapsPtr caps,
const char *vmx)
{
bool success = false;
@@ -1811,6 +1812,10 @@ virVMXParseConfig(virVMXContext *ctx,
def->namespaceData = namespaceData;
}
+ if (virDomainDefPostParse(def, caps, VIR_DOMAIN_DEF_PARSE_ABI_UPDATE,
+ xmlopt) < 0)
+ goto cleanup;
+
success = true;
cleanup:
diff --git a/src/vmx/vmx.h b/src/vmx/vmx.h
index 90bd747..08b6277 100644
--- a/src/vmx/vmx.h
+++ b/src/vmx/vmx.h
@@ -82,6 +82,7 @@ char *virVMXConvertToUTF8(const char *encoding, const char *string);
virDomainDefPtr virVMXParseConfig(virVMXContext *ctx,
virDomainXMLOptionPtr xmlopt,
+ virCapsPtr caps,
const char *vmx);
int virVMXParseVNC(virConfPtr conf, virDomainGraphicsDefPtr *def);
diff --git a/tests/vmx2xmltest.c b/tests/vmx2xmltest.c
index 2b14804..0bbf055 100644
--- a/tests/vmx2xmltest.c
+++ b/tests/vmx2xmltest.c
@@ -78,7 +78,7 @@ testCompareFiles(const char *vmx, const char *xml)
if (virtTestLoadFile(vmx, &vmxData) < 0)
goto cleanup;
- if (!(def = virVMXParseConfig(&ctx, xmlopt, vmxData)))
+ if (!(def = virVMXParseConfig(&ctx, xmlopt, caps, vmxData)))
goto cleanup;
if (!virDomainDefCheckABIStability(def, def)) {
--
2.6.3