[PATCH 03/10] parallels: fix home directory for VMs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>
---
 src/parallels/parallels_sdk.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/parallels/parallels_sdk.c b/src/parallels/parallels_sdk.c
index 9a2d658..e0c5895 100644
--- a/src/parallels/parallels_sdk.c
+++ b/src/parallels/parallels_sdk.c
@@ -1247,6 +1247,14 @@ prlsdkLoadDomain(parallelsConnPtr privconn,
     pret = PrlVmCfg_GetHomePath(sdkdom, pdom->home, &buflen);
     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) {
         /* assign new virDomainDef without any checks */
         /* we can't use virDomainObjAssignDef, because it checks
-- 
1.7.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]