vz: fixed migration in p2p mode

dom xml generated on begin step should be passed
to perform step in VIR_MIGRATE_PARAM_DEST_XML parameter.
Otherwise 'XML error: failed to parse xml document' is
raised on destination host as dom xml is NULL.

Signed-off-by: Pavel Glushchak <pglushchak@virtuozzo.com>
This commit is contained in:
Pavel Glushchak 2016-11-14 18:20:30 +03:00 committed by Maxim Nestratov
parent bdd6899b55
commit 4f949f7486

View File

@ -3199,6 +3199,7 @@ vzDomainMigratePerformP2P(virDomainObjPtr dom,
virConnectPtr dconn = NULL; virConnectPtr dconn = NULL;
virTypedParameterPtr params = NULL; virTypedParameterPtr params = NULL;
int ret = -1; int ret = -1;
int maxparams = nparams;
if (virTypedParamsCopy(&params, orig_params, nparams) < 0) if (virTypedParamsCopy(&params, orig_params, nparams) < 0)
return -1; return -1;
@ -3210,6 +3211,10 @@ vzDomainMigratePerformP2P(virDomainObjPtr dom,
&cookieout, &cookieoutlen))) &cookieout, &cookieoutlen)))
goto done; goto done;
if (virTypedParamsAddString(&params, &nparams, &maxparams,
VIR_MIGRATE_PARAM_DEST_XML, dom_xml) < 0)
goto done;
cookiein = cookieout; cookiein = cookieout;
cookieinlen = cookieoutlen; cookieinlen = cookieoutlen;
cookieout = NULL; cookieout = NULL;