Re: [Libguestfs] [PATCH 01/11] v2v: also search for windows virtio drivers in symlinks

2016-05-12 Thread Cedric Bosdonnat
On Thu, 2016-05-12 at 17:01 +0200, Pino Toscano wrote: > On Thursday 12 May 2016 15:29:09 Cédric Bosdonnat wrote: > > To allow saving save in the package shipping the windows virtio > > s/save/space/, I guess? Oh, nice catch! I'll change that now on my local copy. -- Cedric

[Libguestfs] [PATCH 0/4] lib: qemu: Memoize qemu feature detection.

2016-05-12 Thread Richard W.M. Jones
Doing qemu feature detection in the direct backend takes ~100ms because we need to run `qemu -help' and `qemu -devices ?', and each of those interacts with glibc's very slow link loader. Fixing the link loader is really hard. Instead memoize the output of those two commands. This patch series fi

[Libguestfs] [PATCH 2/4] src/tmpdirs.c: Add internal documentation.

2016-05-12 Thread Richard W.M. Jones
--- src/tmpdirs.c | 45 ++--- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/src/tmpdirs.c b/src/tmpdirs.c index afa3dd4..293e4ea 100644 --- a/src/tmpdirs.c +++ b/src/tmpdirs.c @@ -16,6 +16,10 @@ * Foundation, Inc., 51 Franklin Street, Fif

[Libguestfs] [PATCH 4/4] lib: qemu: Memoize qemu feature detection.

2016-05-12 Thread Richard W.M. Jones
qemu feature detection takes about 95ms on my laptop. The overhead is almost all due to the time taken by the glibc link loader opening the 170+ libraries that qemu is linked to (×2 because we need to run qemu twice). Fixing that is seriously hard work. Therefore memoize the results of guestfs_i

[Libguestfs] [PATCH 1/4] lib: Move qemu testing code to a new module called 'qemu.c'.

2016-05-12 Thread Richard W.M. Jones
This is code motion, but I have cleaned up and formalized the interface between this module and other parts of the library. Also this adds documentation to the interface. --- docs/C_SOURCE_FILES| 1 + src/Makefile.am| 1 + src/guestfs-internal.h | 19 +- src/launch-direct.c|

[Libguestfs] [PATCH 3/4] appliance: Move code for creating supermin appliance directory to tmpdirs.c.

2016-05-12 Thread Richard W.M. Jones
This is largely code motion. --- src/appliance.c| 40 +++- src/guestfs-internal.h | 1 + src/tmpdirs.c | 55 ++ 3 files changed, 63 insertions(+), 33 deletions(-) diff --git a/src/appliance.c b/src/a

[Libguestfs] [PATCH 1/2] Revert "appliance: init: run ldconfig"

2016-05-12 Thread Richard W.M. Jones
Running ldconfig adds about 100ms to the boot time. I would prefer that we understood which libraries need ldconfig to be run, and fix that. We could also consider running ldconfig in parallel, but since it might be required by just about any binary that the init script runs it's not clear what b

[Libguestfs] [PATCH 2/2] appliance: Copy /etc/ld.so.cache from the host into the appliance.

2016-05-12 Thread Richard W.M. Jones
Previously we were running ldconfig to create /etc/ld.so.cache. This is required, at least on Fedora, if we need to run any binary that uses a library with a weird path. libiscsi (a dependency of qemu-img, used by virt-dib) is an example of such a weird library, since it puts its single library i

Re: [Libguestfs] [PATCH] New API: btrfs-filesystem-show (RHBZ#1164765)

2016-05-12 Thread Richard W.M. Jones
On Thu, May 12, 2016 at 05:14:50PM +0200, Pino Toscano wrote: > Add a new API to list all the devices where a btrfs filesystem is > spanned. > --- > daemon/btrfs.c | 78 > > generator/actions.ml | 27 ++ > src/MAX_PROC_NR

[Libguestfs] [PATCH] New API: btrfs-filesystem-show (RHBZ#1164765)

2016-05-12 Thread Pino Toscano
Add a new API to list all the devices where a btrfs filesystem is spanned. --- daemon/btrfs.c | 78 generator/actions.ml | 27 ++ src/MAX_PROC_NR | 2 +- 3 files changed, 106 insertions(+), 1 deletion(-) diff --git a

Re: [Libguestfs] [PATCH 02/11] Update packagelist for SLES

2016-05-12 Thread Pino Toscano
On Thursday 12 May 2016 15:29:10 Cédric Bosdonnat wrote: > diff --git a/appliance/packagelist.in b/appliance/packagelist.in > index daf589e..c221854 100644 > --- a/appliance/packagelist.in > +++ b/appliance/packagelist.in > @@ -132,11 +132,11 @@ ifelse(SUSE,1, >gptfdisk > - hivex > + libhivex

Re: [Libguestfs] [PATCH 01/11] v2v: also search for windows virtio drivers in symlinks

2016-05-12 Thread Pino Toscano
On Thursday 12 May 2016 15:29:09 Cédric Bosdonnat wrote: > To allow saving save in the package shipping the windows virtio s/save/space/, I guess? -- Pino Toscano signature.asc Description: This is a digitally signed message part. ___ Libguestfs maili

Re: [Libguestfs] [PATCH 07/11] v2v: add support for SUSE VMDP drivers

2016-05-12 Thread Roman Kagan
On Thu, May 12, 2016 at 03:29:15PM +0200, Cédric Bosdonnat wrote: > To add this support, two things are needed: > * make the existing code searches for either the viostor >or the SUSE VMDP (Virtual Machine Driver Pack) files. > > * add a firstboot script setting up VMDP. > > Note that 2 fir

Re: [Libguestfs] [PATCH 03/11] customize: fix windows firstboot script

2016-05-12 Thread Roman Kagan
On Thu, May 12, 2016 at 03:29:11PM +0200, Cédric Bosdonnat wrote: > Sync the windows firstboot script with its linux brother. Also change > the main redirection to append to the log rather than overwriting it. > With this change, the firstboot script will resist reboots in the > executed scripts. >

Re: [Libguestfs] [PATCH 11/11] v2v: improve initrd search

2016-05-12 Thread Richard W.M. Jones
On Thu, May 12, 2016 at 03:29:19PM +0200, Cédric Bosdonnat wrote: > To make sure we can also find the initrd on openSUSE and SLES, we need two > improvements: > * the initrd filename may not end with '.img' > * don't use the version + release from the RPM data, rather from the >/lib/modules/

Re: [Libguestfs] [PATCH 07/11] v2v: add support for SUSE VMDP drivers

2016-05-12 Thread Richard W.M. Jones
On Thu, May 12, 2016 at 03:29:15PM +0200, Cédric Bosdonnat wrote: > + (* Check if either RHEV-APT or VMDP exists. This is optional. *) > + let tools = ["rhev-apt.exe"; "vmdp.exe"] in Strong typing FTW ... let tools = [ `RhevApt, "rhev-apt.exe"; `VmdpExe, "vmdp.exe" ] in > + let installer =

Re: [Libguestfs] [PATCH 05/11] customize: add support for pvvxsvc

2016-05-12 Thread Richard W.M. Jones
On Thu, May 12, 2016 at 03:29:13PM +0200, Cédric Bosdonnat wrote: > -(* rhsrvany.exe must exist. > +(* either rhsrvany.exe or pvvxsvc.exe must exist. Best to capitalize "either" in this comment. > * > * (Check also that it's not a dangling symlink but a real file). > *)

Re: [Libguestfs] [PATCH 04/11] customize: change windows firstboot path

2016-05-12 Thread Richard W.M. Jones
On Thu, May 12, 2016 at 03:29:12PM +0200, Cédric Bosdonnat wrote: > Rename the C:\Program Files\Red Hat\Firstboot folder into the more vendor > independent C:\Program Files\Guestfs\Firstboot. > --- > builder/virt-builder.pod | 2 +- > customize/firstboot.ml | 2 +- > 2 files changed, 2 insertion

Re: [Libguestfs] [PATCH 02/11] Update packagelist for SLES

2016-05-12 Thread Richard W.M. Jones
On Thu, May 12, 2016 at 03:29:10PM +0200, Cédric Bosdonnat wrote: > SUSE Linux Entreprise Server doesn't have dhcpcd and the hivex package > is not in the default repositories. Better use dhcp-client and libhivex0 > --- > appliance/packagelist.in | 4 ++-- > 1 file changed, 2 insertions(+), 2 dele

[Libguestfs] [PATCH 08/11] v2v: don't set spice display if QXL isn't supported

2016-05-12 Thread Cédric Bosdonnat
Setting spice display if we know the libvirt guest doesn't have QXL capabilities will only make the guest slower for the user. Fallback to VNC in such a case. A typical use case is when v2v-ing a windows guest without having the windows QXL driver at hand. --- v2v/output_libvirt.ml | 4 +++- 1 fi

[Libguestfs] [PATCH 04/11] customize: change windows firstboot path

2016-05-12 Thread Cédric Bosdonnat
Rename the C:\Program Files\Red Hat\Firstboot folder into the more vendor independent C:\Program Files\Guestfs\Firstboot. --- builder/virt-builder.pod | 2 +- customize/firstboot.ml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/builder/virt-builder.pod b/builder/virt-bui

[Libguestfs] [PATCH 05/11] customize: add support for pvvxsvc

2016-05-12 Thread Cédric Bosdonnat
SUSE VMDP comes with a replacement for rhsrvany.exe named pvvxsvc.exe. Check for either one of them instead of only rhsrvany. --- builder/virt-builder.pod | 11 +-- customize/firstboot.ml | 38 +++--- customize/virt-customize.pod | 6 ++ syspr

[Libguestfs] [PATCH 11/11] v2v: improve initrd search

2016-05-12 Thread Cédric Bosdonnat
To make sure we can also find the initrd on openSUSE and SLES, we need two improvements: * the initrd filename may not end with '.img' * don't use the version + release from the RPM data, rather from the /lib/modules// path as we need to find it out anyway. --- v2v/convert_linux.ml | 11

[Libguestfs] [PATCH 01/11] v2v: also search for windows virtio drivers in symlinks

2016-05-12 Thread Cédric Bosdonnat
To allow saving save in the package shipping the windows virtio drivers, we can use symlinks between the drivers folders. For example SUSE VMDP drivers are the same for Win8.1 and Win2012r2, one folder is a symlink to the other. To take advantages of this, find must use the -L flag. --- v2v/windo

[Libguestfs] [PATCH 09/11] appliance: fix errors in init for SLE / openSUSE

2016-05-12 Thread Cédric Bosdonnat
Running the init on openSUSE and SLE machines showed up minor errors: * skip the /etc/mtab symlink creation if the file is already existing. * make sure /run/lvm is created or lvmetab will complain. --- appliance/init | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/applia

[Libguestfs] [PATCH 02/11] Update packagelist for SLES

2016-05-12 Thread Cédric Bosdonnat
SUSE Linux Entreprise Server doesn't have dhcpcd and the hivex package is not in the default repositories. Better use dhcp-client and libhivex0 --- appliance/packagelist.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appliance/packagelist.in b/appliance/packagelist.in i

[Libguestfs] [PATCH 10/11] v2v: rename RHEL 5 Xen input section into Xen in man

2016-05-12 Thread Cédric Bosdonnat
In virt-v2v man page the documentation on how to use RHEL 5 Xen as input is generic enough to fit other Xen versions. --- v2v/virt-v2v.pod | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/v2v/virt-v2v.pod b/v2v/virt-v2v.pod index 293efeb..292c5a3 100644 --- a/v2v/virt-v2v

[Libguestfs] [PATCH 06/11] v2v: document SUSE's Xen as a working input hypervisor

2016-05-12 Thread Cédric Bosdonnat
--- v2v/virt-v2v.pod | 2 ++ 1 file changed, 2 insertions(+) diff --git a/v2v/virt-v2v.pod b/v2v/virt-v2v.pod index c2a2ed2..293efeb 100644 --- a/v2v/virt-v2v.pod +++ b/v2v/virt-v2v.pod @@ -167,6 +167,8 @@ OVAs from other hypervisors will not work. =item RHEL 5 Xen +=item SUSE Xen + =item C

[Libguestfs] [PATCH 07/11] v2v: add support for SUSE VMDP drivers

2016-05-12 Thread Cédric Bosdonnat
To add this support, two things are needed: * make the existing code searches for either the viostor or the SUSE VMDP (Virtual Machine Driver Pack) files. * add a firstboot script setting up VMDP. Note that 2 firstboot scripts are intentionally added for the VMDP setup. This is due to window

[Libguestfs] [PATCH 00/11] Getting it work with SLES / openSUSE

2016-05-12 Thread Cédric Bosdonnat
Hi there! I know it's been a while since I posted my first version of some patches. But here I have rebased them on top of Roman's work and added a few other ones. Cédric Bosdonnat (11): v2v: also search for windows virtio drivers in symlinks Update packagelist for SLES customize: fix windo

[Libguestfs] [PATCH 03/11] customize: fix windows firstboot script

2016-05-12 Thread Cédric Bosdonnat
Sync the windows firstboot script with its linux brother. Also change the main redirection to append to the log rather than overwriting it. With this change, the firstboot script will resist reboots in the executed scripts. --- customize/firstboot.ml | 13 ++--- 1 file changed, 6 insertion