Roman Kagan
2015-Feb-27 14:28 UTC
[Libguestfs] [PATCH] v2v: allow configurable location for virtio drivers
Make the location of the Windows virtio drivers overridable with the environment variable VIRTIO_WIN_DIR, in the same vein as is done for virt-tools. Signed-off-by: Roman Kagan <rkagan@parallels.com> --- v2v/convert_windows.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/v2v/convert_windows.ml b/v2v/convert_windows.ml index 0cd818a..e966341 100644 --- a/v2v/convert_windows.ml +++ b/v2v/convert_windows.ml @@ -47,7 +47,9 @@ let convert ~verbose ~keep_serial_console (g : G.guestfs) inspect source try Sys.getenv "VIRT_TOOLS_DATA_DIR" with Not_found -> Config.datadir // "virt-tools" in - let virtio_win_dir = "/usr/share/virtio-win" in + let virtio_win_dir + try Sys.getenv "VIRTIO_WIN_DIR" + with Not_found -> Config.datadir // "virtio-win" in (* Check if RHEV-APT exists. This is optional. *) let rhev_apt_exe = virt_tools_data_dir // "rhev-apt.exe" in -- 2.1.0
Richard W.M. Jones
2015-Feb-27 15:09 UTC
Re: [Libguestfs] [PATCH] v2v: allow configurable location for virtio drivers
On Fri, Feb 27, 2015 at 05:28:58PM +0300, Roman Kagan wrote:> Make the location of the Windows virtio drivers overridable with the > environment variable VIRTIO_WIN_DIR, in the same vein as is done for > virt-tools. > > Signed-off-by: Roman Kagan <rkagan@parallels.com> > --- > v2v/convert_windows.ml | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/v2v/convert_windows.ml b/v2v/convert_windows.ml > index 0cd818a..e966341 100644 > --- a/v2v/convert_windows.ml > +++ b/v2v/convert_windows.ml > @@ -47,7 +47,9 @@ let convert ~verbose ~keep_serial_console (g : G.guestfs) inspect source > try Sys.getenv "VIRT_TOOLS_DATA_DIR" > with Not_found -> Config.datadir // "virt-tools" in > > - let virtio_win_dir = "/usr/share/virtio-win" in > + let virtio_win_dir > + try Sys.getenv "VIRTIO_WIN_DIR" > + with Not_found -> Config.datadir // "virtio-win" inThis slightly changes the semantics, especially for people who don't use `./configure --prefix /usr'. But I guess that's OK. The main problem with the patch is that it doesn't update the documentation (v2v/virt-v2v.pod). Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top
Roman Kagan
2015-Mar-02 10:34 UTC
Re: [Libguestfs] [PATCH] v2v: allow configurable location for virtio drivers
On Fri, Feb 27, 2015 at 03:09:31PM +0000, Richard W.M. Jones wrote:> On Fri, Feb 27, 2015 at 05:28:58PM +0300, Roman Kagan wrote: > > Make the location of the Windows virtio drivers overridable with the > > environment variable VIRTIO_WIN_DIR, in the same vein as is done for > > virt-tools. > > > > Signed-off-by: Roman Kagan <rkagan@parallels.com> > > --- > > v2v/convert_windows.ml | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/v2v/convert_windows.ml b/v2v/convert_windows.ml > > index 0cd818a..e966341 100644 > > --- a/v2v/convert_windows.ml > > +++ b/v2v/convert_windows.ml > > @@ -47,7 +47,9 @@ let convert ~verbose ~keep_serial_console (g : G.guestfs) inspect source > > try Sys.getenv "VIRT_TOOLS_DATA_DIR" > > with Not_found -> Config.datadir // "virt-tools" in > > > > - let virtio_win_dir = "/usr/share/virtio-win" in > > + let virtio_win_dir > > + try Sys.getenv "VIRTIO_WIN_DIR" > > + with Not_found -> Config.datadir // "virtio-win" in > > This slightly changes the semantics, especially for people who don't > use `./configure --prefix /usr'. But I guess that's OK.I guess so too.> The main problem with the patch is that it doesn't update the > documentation (v2v/virt-v2v.pod).Indeed. I'll add a note to the docs and resubmit. Thanks, Roman.
Roman Kagan
2015-Mar-31 13:26 UTC
[Libguestfs] [PATCH v2] v2v: allow configurable location for virtio drivers
Make the location of the Windows virtio drivers overridable with the environment variable VIRTIO_WIN_DIR, in the same vein as is done for virt-tools. Signed-off-by: Roman Kagan <rkagan@parallels.com> --- changes from v1: - document the new environment variable v2v/convert_windows.ml | 4 +++- v2v/virt-v2v.pod | 10 ++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/v2v/convert_windows.ml b/v2v/convert_windows.ml index 0cd818a..e966341 100644 --- a/v2v/convert_windows.ml +++ b/v2v/convert_windows.ml @@ -47,7 +47,9 @@ let convert ~verbose ~keep_serial_console (g : G.guestfs) inspect source try Sys.getenv "VIRT_TOOLS_DATA_DIR" with Not_found -> Config.datadir // "virt-tools" in - let virtio_win_dir = "/usr/share/virtio-win" in + let virtio_win_dir + try Sys.getenv "VIRTIO_WIN_DIR" + with Not_found -> Config.datadir // "virtio-win" in (* Check if RHEV-APT exists. This is optional. *) let rhev_apt_exe = virt_tools_data_dir // "rhev-apt.exe" in diff --git a/v2v/virt-v2v.pod b/v2v/virt-v2v.pod index 7b6419e..4f7088c 100644 --- a/v2v/virt-v2v.pod +++ b/v2v/virt-v2v.pod @@ -720,8 +720,9 @@ below. OpenSUSE 10 kernel >= 2.6.25.5-1.1 - Windows Drivers are installed from /usr/share/virtio-win - if present + Windows Drivers are installed from the directory pointed to by + "VIRTIO_WIN_DIR" environment variable + (/usr/share/virtio-win by default) if present =head1 RHEL 4 @@ -1500,6 +1501,11 @@ not distributed with virt-v2v. =back +=item C<VIRTIO_WIN_DIR> + +This is where VirtIO drivers for Windows are searched for +(F</usr/share/virtio-win> if unset). See L<ENABLING VIRTIO>. + =back For other environment variables, see L<guestfs(3)/ENVIRONMENT VARIABLES>. -- 2.1.0
Possibly Parallel Threads
- [PATCH v2] v2v: allow configurable location for virtio drivers
- Re: [PATCH v2] v2v: allow configurable location for virtio drivers
- Re: [PATCH] v2v: allow configurable location for virtio drivers
- [PATCH v2 0/2] v2v:windows: prevent conflicts with PnP on firstboot
- [PATCH v2] v2v: Support loading virtio-win drivers from