[Libguestfs] Plan for nbdkit 1.8

2018-11-06 Thread Richard W.M. Jones
I would really like to release a new stable nbdkit (1.8) soon. The reasons are not only because of the many great new features (which I summarise below) but also a few practical reasons: - Dropping mandatory [key=].. (ie. "magic config key") for many plugin parameters makes nbdkit much easier

Re: [Libguestfs] [PATCH 2/3] v2v: linux: install packages

2018-11-06 Thread Richard W.M. Jones
On Tue, Nov 06, 2018 at 06:13:40PM +0100, Pino Toscano wrote: > On Tuesday, 6 November 2018 11:44:14 CET Tomáš Golembiovský wrote: > > Install packages from local files without touching network. > > > > Signed-off-by: Tomáš Golembiovský > > --- > > In this case, better name it

Re: [Libguestfs] [PATCH] p2v: use newer GTK APIs if possible

2018-11-06 Thread Richard W.M. Jones
On Tue, Nov 06, 2018 at 05:33:41PM +0100, Pino Toscano wrote: > Make use of APIs available in early GTK+ 3 versions, adding > compatibility functions/macros for older GTK+ versions. > > There is no behaviour change, and it helps in porting to even newer GTK+ > versions. > --- >

Re: [Libguestfs] [PATCH 2/3] v2v: linux: install packages

2018-11-06 Thread Pino Toscano
On Tuesday, 6 November 2018 11:44:14 CET Tomáš Golembiovský wrote: > Install packages from local files without touching network. > > Signed-off-by: Tomáš Golembiovský > --- In this case, better name it local_install/install_local (or something along these lines) to make it more clear it is not

[Libguestfs] [PATCH] p2v: use newer GTK APIs if possible

2018-11-06 Thread Pino Toscano
Make use of APIs available in early GTK+ 3 versions, adding compatibility functions/macros for older GTK+ versions. There is no behaviour change, and it helps in porting to even newer GTK+ versions. --- p2v/gui-gtk3-compat.h | 16 p2v/gui.c | 13 + 2

Re: [Libguestfs] [PATCH v2 2/2] p2v: add a Shutdown action (RHBZ#1642044)

2018-11-06 Thread Pino Toscano
On Tuesday, 6 November 2018 16:29:08 CET Richard W.M. Jones wrote: > On Tue, Nov 06, 2018 at 04:06:35PM +0100, Pino Toscano wrote: > > On Tuesday, 6 November 2018 14:07:51 CET Richard W.M. Jones wrote: > > > On Tue, Nov 06, 2018 at 12:51:30PM +0100, Pino Toscano wrote: > > > > +static void > > > >

Re: [Libguestfs] [Qemu-devel] How to emulate block I/O timeout on qemu side?

2018-11-06 Thread Richard W.M. Jones
On Tue, Nov 06, 2018 at 09:43:06AM +, Richard W.M. Jones wrote: > On Tue, Nov 06, 2018 at 09:14:57AM +, Richard W.M. Jones wrote: > > This link shows how to combine delay and error filters together: > > > > https://rwmj.wordpress.com/2018/11/04/nbd-graphical-viewer/ > > Oops, that's in

Re: [Libguestfs] [PATCH v2 2/2] p2v: add a Shutdown action (RHBZ#1642044)

2018-11-06 Thread Richard W.M. Jones
On Tue, Nov 06, 2018 at 04:06:35PM +0100, Pino Toscano wrote: > On Tuesday, 6 November 2018 14:07:51 CET Richard W.M. Jones wrote: > > On Tue, Nov 06, 2018 at 12:51:30PM +0100, Pino Toscano wrote: > > > +static void > > > +shutdown_clicked (GtkWidget *w, gpointer data) > > > +{ > > > + if

Re: [Libguestfs] [PATCH v2 2/2] p2v: add a Shutdown action (RHBZ#1642044)

2018-11-06 Thread Pino Toscano
On Tuesday, 6 November 2018 14:07:51 CET Richard W.M. Jones wrote: > On Tue, Nov 06, 2018 at 12:51:30PM +0100, Pino Toscano wrote: > > +static void > > +shutdown_clicked (GtkWidget *w, gpointer data) > > +{ > > + if (!is_iso_environment) > > +return; > > + > > + sync (); > > + sleep (2); >

Re: [Libguestfs] [PATCH v2 2/2] p2v: add a Shutdown action (RHBZ#1642044)

2018-11-06 Thread Richard W.M. Jones
On Tue, Nov 06, 2018 at 12:51:30PM +0100, Pino Toscano wrote: > +static void > +shutdown_clicked (GtkWidget *w, gpointer data) > +{ > + if (!is_iso_environment) > +return; > + > + sync (); > + sleep (2); > + ignore_value (system ("/sbin/shutdown now")); > +} I've tested this and it works

Re: [Libguestfs] [PATCH] p2v: make-disk: rely on os-release for host distro detection

2018-11-06 Thread Richard W.M. Jones
On Tue, Nov 06, 2018 at 01:33:11PM +0100, Pino Toscano wrote: > Instead of assuming the latest Fedora version if /etc/redhat-release is > available, or the latest Debian with /etc/debian_version, use only > /etc/os-release. The possible name of the virt-builder template is > created by

[Libguestfs] [PATCH] p2v: make-disk: rely on os-release for host distro detection

2018-11-06 Thread Pino Toscano
Instead of assuming the latest Fedora version if /etc/redhat-release is available, or the latest Debian with /etc/debian_version, use only /etc/os-release. The possible name of the virt-builder template is created by concatenating $ID and $VERSION_ID, which is generally a better guess than what

[Libguestfs] [PATCH v2 0/2] p2v: add Shutdown option

2018-11-06 Thread Pino Toscano
This small series for p2v refactors the Reboot menu of the conversion dialog into something slightly more general, and add the possibility to shut the machine down. Lots of work to deal with old GTK versions ... Changes from v1: - fix shutdown command Pino Toscano (2): p2v: turn Reboot button

[Libguestfs] [PATCH v2 1/2] p2v: turn Reboot button into a Shutdown popup menu button

2018-11-06 Thread Pino Toscano
To ease adding a proper Shutdown action in the conversion dialog, turn the current Reboot button into a button that pops a menu up, with Reboot as the only available action. The menu is implemented using a popover when using "recent" versions of GLib, and GTK+ 3, because of all the APIs needed.

[Libguestfs] [PATCH v2 2/2] p2v: add a Shutdown action (RHBZ#1642044)

2018-11-06 Thread Pino Toscano
Add a "Shutdown" action to the Shutdown button in the conversion dialog, before the Reboot action: this way it is possible to shutdown the physical server directly from the GUI after the conversion. --- p2v/gui.c | 24 +++- 1 file changed, 23 insertions(+), 1 deletion(-) diff

Re: [Libguestfs] [PATCH 3/3] v2v: linux: install QEMU-GA

2018-11-06 Thread Richard W.M. Jones
On Tue, Nov 06, 2018 at 11:44:15AM +0100, Tomáš Golembiovský wrote: > Signed-off-by: Tomáš Golembiovský The commit message should end with " (RHBZ#1619665)." > v2v/convert_linux.ml | 2 ++ > v2v/windows_virtio.ml | 30 ++ > v2v/windows_virtio.mli | 5 + > 3

Re: [Libguestfs] [PATCH 2/2] p2v: add a Shutdown action (RHBZ#1642044)

2018-11-06 Thread Richard W.M. Jones
On Tue, Nov 06, 2018 at 10:17:57AM +, Richard W.M. Jones wrote: > On Tue, Nov 06, 2018 at 10:09:19AM +, Richard W.M. Jones wrote: > > On Mon, Nov 05, 2018 at 06:31:25PM +0100, Pino Toscano wrote: > > > +static void > > > +shutdown_clicked (GtkWidget *w, gpointer data) > > > +{ > > > + if

Re: [Libguestfs] [PATCH 2/3] v2v: linux: install packages

2018-11-06 Thread Richard W.M. Jones
On Tue, Nov 06, 2018 at 11:44:14AM +0100, Tomáš Golembiovský wrote: > Install packages from local files without touching network. In fact, not limited to local files, but is limited to guests which use ‘yum’. So I think the function needs a better name unless you're planning to combine it with

Re: [Libguestfs] [PATCH 1/3] v2v: refactor copy_drivers() in Windows_virtio

2018-11-06 Thread Richard W.M. Jones
On Tue, Nov 06, 2018 at 11:44:13AM +0100, Tomáš Golembiovský wrote: > Changed the function to be more generic and renamed to copy_files. > The only change in behavior is in produced debug messages. > > Signed-off-by: Tomáš Golembiovský > --- > v2v/windows_virtio.ml | 52

[Libguestfs] [PATCH 1/3] v2v: refactor copy_drivers() in Windows_virtio

2018-11-06 Thread Tomáš Golembiovský
Changed the function to be more generic and renamed to copy_files. The only change in behavior is in produced debug messages. Signed-off-by: Tomáš Golembiovský --- v2v/windows_virtio.ml | 52 ++- 1 file changed, 32 insertions(+), 20 deletions(-) diff

[Libguestfs] [PATCH 0/3] Install QEMU-GA from oVirt guest tools ISO on Linux

2018-11-06 Thread Tomáš Golembiovský
This installs packages with QEMU Guest Agent when converting Linux machine. The packages should be available on guest tools ISO. The patches work "as-is" but probably deserve some more attention: - it is "abusing" Winows_virtio code but renaming/refactoring everything to remove "windows" from

[Libguestfs] Plan to fix virt-v2v Windows static IPs bug (RHBZ#1626503)

2018-11-06 Thread Richard W.M. Jones
https://bugzilla.redhat.com/show_bug.cgi?id=1626503 If you use virt-v2v to convert a Windows guest then everything usually works fine as long as the guest is using DHCP. However if it has static IPs then that information is lost after conversion (the guest will end up with new virtio network

[Libguestfs] [PATCH 2/3] v2v: linux: install packages

2018-11-06 Thread Tomáš Golembiovský
Install packages from local files without touching network. Signed-off-by: Tomáš Golembiovský --- v2v/linux.ml | 19 +++ v2v/linux.mli | 3 +++ 2 files changed, 22 insertions(+) diff --git a/v2v/linux.ml b/v2v/linux.ml index 177724e39..6a5cae512 100644 --- a/v2v/linux.ml +++

[Libguestfs] [PATCH 3/3] v2v: linux: install QEMU-GA

2018-11-06 Thread Tomáš Golembiovský
Signed-off-by: Tomáš Golembiovský --- v2v/convert_linux.ml | 2 ++ v2v/windows_virtio.ml | 30 ++ v2v/windows_virtio.mli | 5 + 3 files changed, 37 insertions(+) diff --git a/v2v/convert_linux.ml b/v2v/convert_linux.ml index e8c64ac1b..a1bafe91a 100644 ---

Re: [Libguestfs] [PATCH 2/2] p2v: add a Shutdown action (RHBZ#1642044)

2018-11-06 Thread Richard W.M. Jones
On Tue, Nov 06, 2018 at 10:09:19AM +, Richard W.M. Jones wrote: > On Mon, Nov 05, 2018 at 06:31:25PM +0100, Pino Toscano wrote: > > +static void > > +shutdown_clicked (GtkWidget *w, gpointer data) > > +{ > > + if (!is_iso_environment) > > +return; > > + > > + sync (); > > + sleep (2); >

Re: [Libguestfs] [PATCH 2/2] p2v: add a Shutdown action (RHBZ#1642044)

2018-11-06 Thread Richard W.M. Jones
On Mon, Nov 05, 2018 at 06:31:25PM +0100, Pino Toscano wrote: > +static void > +shutdown_clicked (GtkWidget *w, gpointer data) > +{ > + if (!is_iso_environment) > +return; > + > + sync (); > + sleep (2); > + ignore_value (system ("/sbin/shutdown")); > +} > + The shutdown button doesn't

Re: [Libguestfs] [Qemu-devel] How to emulate block I/O timeout on qemu side?

2018-11-06 Thread Richard W.M. Jones
On Tue, Nov 06, 2018 at 09:14:57AM +, Richard W.M. Jones wrote: > This link shows how to combine delay and error filters together: > > https://rwmj.wordpress.com/2018/11/04/nbd-graphical-viewer/ Oops, that's in a forthcoming blog post not this one. Not enough caffeine this morning.

Re: [Libguestfs] [PATCH 0/2] p2v: add Shutdown option

2018-11-06 Thread Richard W.M. Jones
On Mon, Nov 05, 2018 at 06:31:23PM +0100, Pino Toscano wrote: > This small series for p2v refactors the Reboot menu of the conversion > dialog into something slightly more general, and add the possibility to > shut the machine down. > > Lots of work to deal with old GTK versions ...

Re: [Libguestfs] [Qemu-devel] How to emulate block I/O timeout on qemu side?

2018-11-06 Thread Richard W.M. Jones
On Tue, Nov 06, 2018 at 02:17:46PM +0800, Dongli Zhang wrote: > On 11/06/2018 01:49 AM, Eric Blake wrote: > > On 11/2/18 3:11 AM, Dongli Zhang wrote: > >> Hi, > >> > >> Is there any way to emulate I/O timeout on qemu side (not fault > >> injection in VM kernel) without modifying qemu source code?

[Libguestfs] Further nbdkit patches for Haiku

2018-11-06 Thread Richard W.M. Jones
François, thanks for the patches so far. This morning I pushed: https://github.com/libguestfs/nbdkit/commit/e26fb6cea3fdba13b5472daf6767e76abacd8d03 build: add missing #include "byte-swapping.h" https://github.com/libguestfs/nbdkit/commit/b962272a561bfed087316d24b7d510e4ab29a985