[Libguestfs] [PATCH 2/2] v2v: linux: uninstall Parallels tools

Richard W.M. Jones rjones at redhat.com
Sat Jun 11 20:38:51 UTC 2016


On Sat, Jun 11, 2016 at 08:51:57PM +0300, Pavel Butsykin wrote:
> Guest tools for Linux in Parallels / Virtuozzo Server 6 come with a script
> that can be used to uninstall them.
> 
> Signed-off-by: Pavel Butsykin <pbutsykin at virtuozzo.com>
> ---
>  v2v/convert_linux.ml | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/v2v/convert_linux.ml b/v2v/convert_linux.ml
> index 7eef2ab..681466e 100644
> --- a/v2v/convert_linux.ml
> +++ b/v2v/convert_linux.ml
> @@ -694,6 +694,20 @@ let rec convert ~keep_serial_console (g : G.guestfs) inspect source rcaps =
>          ignore (g#command [| "/sbin/chkconfig"; "kudzu"; "off" |])
>        )
>  
> +  and unconfigure_prltools () =
> +    let prltools_path = "/usr/lib/parallels-tools/install" in
> +    if g#is_file ~followsymlinks:true prltools_path then (
> +      try
> +        ignore (g#command [| prltools_path; "-r" |]);
> +
> +        (* Reload Augeas to detect changes made by prltools uninst. *)
> +        Linux.augeas_reload g
> +      with
> +        G.Error msg ->
> +          warning (f_"Parallels tools was detected, but uninstallation failed. The error message was: %s (ignored)")
> +            msg
> +    )
> +
>    and configure_kernel () =
>      (* Previously this function would try to install kernels, but we
>       * don't do that any longer.
> @@ -1414,6 +1428,7 @@ let rec convert ~keep_serial_console (g : G.guestfs) inspect source rcaps =
>    unconfigure_vmware ();
>    unconfigure_citrix ();
>    unconfigure_kudzu ();
> +  unconfigure_prltools ();
>  
>    let kernel, virtio = configure_kernel () in

I have pushed this patch.

Thanks for your contribution.

I will look at the other more complex patch series later -- tomorrow
hopefully.

My apologies for the mailing list delays/filtering -- this is because
spammers try to sign up for the list to spam it, so we have to
moderate initial messages.  Every mail from should go though without
any delays now.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/




More information about the Libguestfs mailing list