mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
parallels: fix home directory for VMs
Failures of parallelsStorageOpen occured because we incorrectly treated path to VM' configuration file as a directory. Now initialization of parallels VM domains home directory is fixed. Signed-off-by: Maxim Nestratov <mnestratov@parallels.com>
This commit is contained in:
parent
2765fb72bd
commit
b980c34dec
@ -1245,6 +1245,14 @@ prlsdkLoadDomain(parallelsConnPtr privconn,
|
|||||||
pret = PrlVmCfg_GetHomePath(sdkdom, pdom->home, &buflen);
|
pret = PrlVmCfg_GetHomePath(sdkdom, pdom->home, &buflen);
|
||||||
prlsdkCheckRetGoto(pret, error);
|
prlsdkCheckRetGoto(pret, error);
|
||||||
|
|
||||||
|
/* For VMs pdom->home is actually /directory/config.pvs */
|
||||||
|
if (!IS_CT(def)) {
|
||||||
|
/* Get rid of /config.pvs in path string */
|
||||||
|
char *s = strrchr(pdom->home, '/');
|
||||||
|
if (s)
|
||||||
|
*s = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
if (olddom) {
|
if (olddom) {
|
||||||
/* assign new virDomainDef without any checks */
|
/* assign new virDomainDef without any checks */
|
||||||
/* we can't use virDomainObjAssignDef, because it checks
|
/* we can't use virDomainObjAssignDef, because it checks
|
||||||
|
Loading…
x
Reference in New Issue
Block a user