[libvirt] [PATCH 3/4] parallels: fix home directory for VMs

Michal Privoznik mprivozn at redhat.com
Tue Mar 17 14:51:16 UTC 2015


On 13.03.2015 16:40, Maxim Nestratov wrote:
> 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 at parallels.com>
> ---
>  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 b6026fd..1025da5 100644
> --- a/src/parallels/parallels_sdk.c
> +++ b/src/parallels/parallels_sdk.c
> @@ -1255,6 +1255,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
> 

ACK

Michal




More information about the libvir-list mailing list