search for: copy_virtio_drivers

Displaying 15 results from an estimated 15 matches for "copy_virtio_drivers".

2015 Oct 15
2
Re: [PATCH v3 0/3] v2v: simplify driver copying from virtio-win iso
...pact is necessary!) Why? As a matter of fact that was the primary reason I even started with this patchset: that Gc.compact was sitting in the middle of the main v2v function and was yet another obstacle in the refactoring I was after. Now that the extra guestfs handle doesn't survive beyond copy_virtio_drivers() what is the need for that explicit GC (which was introduced at the time exactly to clear up that handle in commit 47b5f245bec908f803f0a89c3b1e3166cfe33aad)? Roman.
2015 Oct 13
2
[PATCH v2 1/4] v2v: consolidate virtio-win file copying
...ws.ml @@ -271,12 +271,9 @@ echo uninstalling Xen PV driver with Not_found -> () - and install_virtio_drivers root current_cs = - (* Copy the virtio drivers to the guest. *) - let driverdir = sprintf "%s/Drivers/VirtIO" systemroot in - g#mkdir_p driverdir; + and copy_virtio_drivers driverdir = + (* Copy the matching drivers to the driverdir. *) - (* Load the list of drivers available. *) let drivers = find_virtio_win_drivers virtio_win in (* Filter out only drivers matching the current guest. *) @@ -300,73 +297,60 @@ echo uninstalling Xen PV driver...
2015 Oct 15
1
Re: [PATCH v3 0/3] v2v: simplify driver copying from virtio-win iso
...primary reason I even started > > with this patchset: that Gc.compact was sitting in the middle of the > > main v2v function and was yet another obstacle in the refactoring I was > > after. > > > > Now that the extra guestfs handle doesn't survive beyond > > copy_virtio_drivers() what is the need for that explicit GC (which was > > introduced at the time exactly to clear up that handle in commit > > 47b5f245bec908f803f0a89c3b1e3166cfe33aad)? > > Just because the handle becomes unreachable doesn't mean the GC will > immediately collect it. Object...
2015 Oct 13
0
Re: [PATCH v2 1/4] v2v: consolidate virtio-win file copying
...ces.") > - inspect.i_major_version inspect.i_minor_version > - inspect.i_arch inspect.i_product_variant > - virtio_win; > - ( IDE, RTL8139, Cirrus ) I believe this warning gets lost in this patch. To get it back, let's make 'copy_virtio_drivers' returns a true/false indication ('true' meaning that at least some drivers were copied), and the caller code in 'install_virtio_drivers' should check this, and either do the code above, or continue with the code below. > + copy_virtio_drivers driverdir; > + > +...
2015 Oct 14
1
Re: [PATCH v2 1/4] v2v: consolidate virtio-win file copying
...spect.i_major_version inspect.i_minor_version > > - inspect.i_arch inspect.i_product_variant > > - virtio_win; > > - ( IDE, RTL8139, Cirrus ) > > I believe this warning gets lost in this patch. > > To get it back, let's make 'copy_virtio_drivers' returns a true/false > indication ('true' meaning that at least some drivers were copied), > and the caller code in 'install_virtio_drivers' should check this, and > either do the code above, or continue with the code below. Is there any difference between not being a...
2015 Aug 10
0
[PATCH 2/4] v2v: consolidate virtio-win file copying
...ws.ml @@ -231,12 +231,9 @@ echo uninstalling Xen PV driver with Not_found -> () - and install_virtio_drivers root current_cs = - (* Copy the virtio drivers to the guest. *) - let driverdir = sprintf "%s/Drivers/VirtIO" systemroot in - g#mkdir_p driverdir; + and copy_virtio_drivers driverdir = + (* Copy the matching drivers to the driverdir. *) - (* Load the list of drivers available. *) let drivers = find_virtio_win_drivers virtio_win in (* Filter out only drivers matching the current guest. *) @@ -260,73 +257,60 @@ echo uninstalling Xen PV driver...
2015 Oct 14
5
[PATCH v3 0/3] v2v: simplify driver copying from virtio-win iso
Libguestfs supports passing an ISO image as a source of virtio windows drivers to v2v. This series attempts to make it simpler and better scoped. Roman Kagan (3): v2v: consolidate virtio-win file copying v2v: copy virtio drivers without guestfs handle leak v2v: drop useless forced gc --- changes since v2: - drop patch 4 (reuse of the master guestfs handle for hot-adding the ISO image)
2015 Aug 10
15
[PATCH 0/4] v2v: simplify driver copying from virtio-win iso
Libguestfs supports passing an ISO image as a source of virtio windows drivers to v2v. That support, however, looks too heavy-weight: in order to access those drivers, a separate guestfs handle is created (and thus a new emulator process is started), which runs until v2v completes. This series attempts to make it simpler and lighter-weight, by making the relevant code more local, and by
2015 Oct 15
0
Re: [PATCH v3 0/3] v2v: simplify driver copying from virtio-win iso
...a matter of fact that was the primary reason I even started > with this patchset: that Gc.compact was sitting in the middle of the > main v2v function and was yet another obstacle in the refactoring I was > after. > > Now that the extra guestfs handle doesn't survive beyond > copy_virtio_drivers() what is the need for that explicit GC (which was > introduced at the time exactly to clear up that handle in commit > 47b5f245bec908f803f0a89c3b1e3166cfe33aad)? Just because the handle becomes unreachable doesn't mean the GC will immediately collect it. Objects are only required to be...
2015 Nov 10
0
[PATCH 4/4] mllib, v2v: Allow open_guestfs to set the handle identifier.
...estfs ~identifier:"v2v" () in g#set_network true; (match conversion_mode with | Copying (overlays, _) -> populate_overlays g overlays diff --git a/v2v/windows.ml b/v2v/windows.ml index d3bc5d9..b7447a5 100644 --- a/v2v/windows.ml +++ b/v2v/windows.ml @@ -72,8 +72,7 @@ let rec copy_virtio_drivers g inspect virtio_win driverdir = ) else if is_regular_file virtio_win then ( try - let g2 = open_guestfs () in - g2#set_identifier "virtio_win"; + let g2 = open_guestfs ~identifier:"virtio_win" () in g2#add_drive_opts virtio_win ~readonly:true;...
2015 Aug 10
0
[PATCH 3/4] v2v: copy virtio drivers without guestfs handle leak
...-------------------------------- 2 files changed, 118 insertions(+), 183 deletions(-) diff --git a/v2v/convert_windows.ml b/v2v/convert_windows.ml index 26609f2..b6e6c62 100644 --- a/v2v/convert_windows.ml +++ b/v2v/convert_windows.ml @@ -233,35 +233,54 @@ echo uninstalling Xen PV driver and copy_virtio_drivers driverdir = (* Copy the matching drivers to the driverdir. *) - - let drivers = find_virtio_win_drivers virtio_win in - - (* Filter out only drivers matching the current guest. *) - let drivers = - List.filter ( - fun { vwd_os_arch = arch; - vwd_os_major = os_...
2015 Nov 10
7
[PATCH 0/4]: mllib: Add 'may' function, and refactoring.
The 'may' function is a higher-order function (HOF) that replaces: match x with | None -> () | Some x -> f x with: may f x The idea comes from lablgtk (OCaml Gtk bindings) where it is widely used. If this change is clearer than previous code, then this could be used in many more places. However I previously steered clear from using HOFs like this because they can be
2015 Oct 13
2
[PATCH v2 2/4] v2v: copy virtio drivers without guestfs handle leak
...-------------------------------- 2 files changed, 113 insertions(+), 177 deletions(-) diff --git a/v2v/convert_windows.ml b/v2v/convert_windows.ml index 55213aa..cfa5474 100644 --- a/v2v/convert_windows.ml +++ b/v2v/convert_windows.ml @@ -273,35 +273,55 @@ echo uninstalling Xen PV driver and copy_virtio_drivers driverdir = (* Copy the matching drivers to the driverdir. *) - - let drivers = find_virtio_win_drivers virtio_win in - - (* Filter out only drivers matching the current guest. *) - let drivers = - List.filter ( - fun { vwd_os_arch = arch; - vwd_os_major = os_...
2015 Nov 17
0
[PATCH 3/3] v2v: windows: Use '*.inf' files to control how Windows drivers are installed.
...3b57..2e18307 100644 --- a/v2v/windows.ml +++ b/v2v/windows.ml @@ -50,128 +50,185 @@ and (=~) str rex = (* Copy the matching drivers to the driverdir; return true if any have * been copied. *) +type virtio_win_source = + | Virtio_Win_Directory + | Virtio_Win_ISO of Guestfs.guestfs + let rec copy_virtio_drivers g inspect virtio_win driverdir = - let ret = ref false in - if is_directory virtio_win then ( - let cmd = sprintf "cd %s && find -type f" (quote virtio_win) in - let paths = external_command cmd in - List.iter ( - fun path -> - if virtio_iso_path_matches_...
2015 Nov 17
8
[PATCH 0/3] v2v: windows: Use '*.inf' files to control how Windows drivers are installed.
https://github.com/rwmjones/libguestfs/tree/rewrite-virtio-copy-drivers Instead of trying to split and parse elements from virtio-win paths, use the '*.inf' files supplied with the drivers to control how Windows drivers are installed. The following emails best explain how this works: https://www.redhat.com/archives/libguestfs/2015-October/msg00352.html