On Wednesday, 23 May 2018 15:42:42 CEST Tomáš Golembiovský wrote: > On Fri, 18 May 2018 17:42:15 +0200 > Pino Toscano <ptosc...@redhat.com> wrote: > > > If the RHV Setup Tools ISO is installed, open it, and copy RHEV APT from > > there, instead of using (if available) the executable located in the > > virt-tools data directory. > > > > This way, RHV conversion hosts with the RHV Setup Tools ISO installed > > will always install the latest version when convering Windows guests, > > no matter which version is (eventually) shipped as virt-tools. > > --- > > v2v/convert_windows.ml | 57 ++++++++++++++++++++++++++++++++++++------ > > v2v/virt-v2v.pod | 18 +++++++++++++ > > 2 files changed, 67 insertions(+), 8 deletions(-) > > > > diff --git a/v2v/convert_windows.ml b/v2v/convert_windows.ml > > index 163319545..21dafe4f4 100644 > > --- a/v2v/convert_windows.ml > > +++ b/v2v/convert_windows.ml > > @@ -27,6 +27,10 @@ open Types > > > > module G = Guestfs > > > > +type tool_location = > > + | Local_path of string (* path of file *) > > + | ISO of string * string (* path of ISO, path to look for inside the ISO > > *) > > + > > (* Convert Windows guests. > > * > > * This only does a "pre-conversion", the steps needed to get the > > @@ -239,12 +243,15 @@ let convert (g : G.guestfs) inspect source output > > rcaps = > > > > (* Install RHEV-APT only if appropriate for the output hypervisor. *) > > if output#install_rhev_apt then ( > > - let tool_path = virt_tools_data_dir () // "rhev-apt.exe" in > > - if Sys.file_exists tool_path then > > - configure_rhev_apt tool_path > > - else > > - warning (f_"%s is missing, but the output hypervisor is oVirt or > > RHV. Installing RHEV-APT in the guest would mean the guest is > > automatically updated with new drivers etc. You may wish to install > > RHEV-APT manually after conversion.") > > - tool_path > > + let rhev_apt = > > + let iso = virt_tools_data_dir () // "rhv-guest-tools-iso" // > > "rhv-tools-setup.iso" in > > Using virt_tools_data_dir seems wrong, if you meant to use the ISO > (actually a symlink) at `/usr/share/rhv-guest-tools-iso/rhv-tools-setup.iso`.
virt_tools_data_dir () will be /usr/share when --prefix=/usr, although I can hardcode it to /usr/share, since it's where the rhv-guest-tools-iso RPM will install it anyway. > Still, the ISO is rarely used this way in RHV. Most of the time the ISO > is stored somewhere else in storage domain and we pass it's location in > VIRTIO_WIN environment variable. > > Could you first check the VIRTIO_WIN variable, and fallback to the ISO > in /usr? From what I remember, VIRTIO_WIN is usually pointed to the virtio-win.iso, not to the RHV Tools ISO. Am I missing anything? -- Pino Toscano
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Libguestfs mailing list Libguestfs@redhat.com https://www.redhat.com/mailman/listinfo/libguestfs