Call virDomainDefAddImplicitControllers to add disk
controllers, so virDomainDef, filled by this function
will look exactly like the one returned by virDomainDefParseString.
Signed-off-by: Dmitry Guryanov <dguryanov(a)parallels.com>
---
src/parallels/parallels_sdk.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/parallels/parallels_sdk.c b/src/parallels/parallels_sdk.c
index ea090b7..4441524 100644
--- a/src/parallels/parallels_sdk.c
+++ b/src/parallels/parallels_sdk.c
@@ -1247,6 +1247,9 @@ prlsdkLoadDomain(parallelsConnPtr privconn,
pret = PrlVmCfg_GetHomePath(sdkdom, pdom->home, &buflen);
prlsdkCheckRetGoto(pret, error);
+ if (virDomainDefAddImplicitControllers(def) < 0)
+ goto error;
+
if (olddom) {
/* assign new virDomainDef without any checks */
/* we can't use virDomainObjAssignDef, because it checks
--
2.1.0