[Libguestfs] [PATCH 2/2] Make sure gpg-agent is terminated before umount

2015-07-28 Thread Cédric Bosdonnat
gpg-agent uses /sysroot/dev/null and thus /sysroot/dev can't be unmounted if gpg-agent is still around. Note that this problem only affects installing packages on fedora-22 guests. --- customize/customize_run.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[Libguestfs] [PATCH 0/2] Misc fixes

2015-07-28 Thread Cédric Bosdonnat
Here are two patches: one fixes the gpg-agent causing unmount to fail after running dnf to install packages. The other ones fixes dhcpcd call in the init program to provide it an interface name. Cédric Bosdonnat (2): appliance init: find NIC name for dhcpcd Make sure gpg-agent is terminated

[Libguestfs] [PATCH 1/2] appliance init: find NIC name for dhcpcd

2015-07-28 Thread Cédric Bosdonnat
dhcpcd requires an interface name as parameter to work. We are now getting it from /proc/sys/net/ipv4/conf/ folder children. --- appliance/init | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/appliance/init b/appliance/init index cca62e7..ef18959 100755 --- a/appliance/init

[Libguestfs] [PATCH 2/2] builder: add opensuse images sources

2015-09-08 Thread Cédric Bosdonnat
--- builder/Makefile.am | 3 ++- builder/opensuse.conf.in | 3 +++ builder/opensuse.gpg | 21 + configure.ac | 1 + 4 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 builder/opensuse.conf.in create mode 100644 builder/opensuse.gpg

[Libguestfs] [PATCH 0/2] virt-builder OpenSUSE images

2015-09-08 Thread Cédric Bosdonnat
Hi guys, Here are two patches to get opensuse images in virt-builder. Cédric Bosdonnat (2): Allow curl to follow redirects. builder: add opensuse images sources builder/Makefile.am | 3 ++- builder/downloader.ml| 4 ++-- builder/opensuse.conf.in | 3 +++ builder/opensuse.gpg

[Libguestfs] [PATCH 1/2] Allow curl to follow redirects.

2015-09-08 Thread Cédric Bosdonnat
download.opensuse.org uses redirects to point to the relevant mirror. Adding -L --max-redirs 5 to curl options will get us the requested images. --- builder/downloader.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builder/downloader.ml b/builder/downloader.ml index

[Libguestfs] [PATCH v2 1/2] builder: add opensuse images sources

2015-09-29 Thread Cédric Bosdonnat
--- builder/Makefile.am | 3 ++- builder/opensuse.conf.in | 3 +++ builder/opensuse.gpg | 21 + configure.ac | 1 + 4 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 builder/opensuse.conf.in create mode 100644 builder/opensuse.gpg

[Libguestfs] [PATCH v2 2/2] customize: get zypper to eat licenses and gpg keys

2015-09-29 Thread Cédric Bosdonnat
Without these flags --install will most likely fail as the GPG key may no be imported in the guest image. --- customize/customize_run.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/customize/customize_run.ml b/customize/customize_run.ml index 9d97522..ad0ab7f 100644

[Libguestfs] [PATCH] customize: sles password defaults.

2015-10-01 Thread Cédric Bosdonnat
--- customize/password.ml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/customize/password.ml b/customize/password.ml index 258d726..1f9b8fe 100644 --- a/customize/password.ml +++ b/customize/password.ml @@ -165,6 +165,9 @@ and default_crypto g root = | "opensuse", v when v >= 11 ->

[Libguestfs] [PATCH] customize: remove zypper's gpg keys auto-import

2015-10-02 Thread Cédric Bosdonnat
This option was considered unsecure, found a fix on the generated opensuse images instead. --- customize/customize_run.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/customize/customize_run.ml b/customize/customize_run.ml index ad0ab7f..6cb2328 100644 ---

[Libguestfs] [PATCH] Add opensuse.gpg to the dist tarball

2015-09-30 Thread Cédric Bosdonnat
Adding missing opensuse.gpg to EXTRA_DIST. --- builder/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/builder/Makefile.am b/builder/Makefile.am index 3111ef2..0d5ce3b 100644 --- a/builder/Makefile.am +++ b/builder/Makefile.am @@ -22,6 +22,7 @@ AM_YFLAGS = -d EXTRA_DIST = \

[Libguestfs] [PATCH] filesystems: don't try to get the size of btrfs subvolume

2016-06-08 Thread Cédric Bosdonnat
virt-filesystem -l tries to get the size of btrfs subvolumes, which results in an error. Teach it to skip the subvolumes. --- cat/filesystems.c | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/cat/filesystems.c b/cat/filesystems.c index f1c2852..f679517

[Libguestfs] [PATCH v2] filesystems: don't try to get the size of btrfs subvolume

2016-06-15 Thread Cédric Bosdonnat
virt-filesystem -l tries to get the size of btrfs subvolumes, which results in an error. Teach it to skip the subvolumes. --- cat/filesystems.c | 23 +-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/cat/filesystems.c b/cat/filesystems.c index f1c2852..cfdac86

[Libguestfs] [PATCH 2/4] p2v: fix dependencies for SLES / openSUSE

2016-06-22 Thread Cédric Bosdonnat
Use the common denominator for SLES and openSUSE in the dependencies. For example most of NetworkManager pieces and metacity aren't provided on SLES. ifconfig is in the net-tools-deprecated package in openSUSE Factory, which means after openSUSE Leap 42.2. Older versions have it in the net-tools

[Libguestfs] [PATCH 3/4] p2v: add virt-p2v-make-kiwi to generate kiwi config

2016-06-22 Thread Cédric Bosdonnat
tion to the C folder. If not specified, the default is +F in the current directory. + +=item B<-V> + +=item B<--version> + +Display version number and exit. + +=back + +=head1 FILES + +=over 4 + +=item F<$libexecdir/virt-p2v> + +The L<virt-p2v(1)> binary which is c

[Libguestfs] [PATCH 0/4] virt-p2v support for openSUSE / SLES

2016-06-22 Thread Cédric Bosdonnat
Hi there, Here are a few patches to get virt-p2v working on openSUSE and SLES. Note that I intentionnaly use icewm and yast2 lan for SLES and openSUSE since SLES doesn't ship metacity and all of NetworkManager pieces. Cédric Bosdonnat (4): p2v: use yast2 lan on SUSE distros rather than NM

[Libguestfs] [PATCH 1/4] p2v: use yast2 lan on SUSE distros rather than NM

2016-06-22 Thread Cédric Bosdonnat
NetworkManager isn't provided on SLES. As yast2 lan is available on all openSUSE / SLE distro, use it instead. --- p2v/gui.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/p2v/gui.c b/p2v/gui.c index e720002..b50cadf 100644 --- a/p2v/gui.c +++ b/p2v/gui.c @@ -51,6 +51,7

[Libguestfs] [PATCH 4/4] p2v: add -x option to nm-online

2016-06-22 Thread Cédric Bosdonnat
On distros not running NetworkManager, use the nm-online -x parameter to exit quickly. The network connection will be checked just after anyway when attempting to connect to the conversion server using ssh. --- p2v/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Libguestfs] [PATCH v3 0/4] virt-p2v support for openSUSE / SLES

2016-06-22 Thread Cédric Bosdonnat
Diff to v2: * remove leftover variable declaration in gui.c Cédric Bosdonnat (4): p2v: use yast2 lan on SUSE distros rather than NM p2v: fix dependencies for SLES / openSUSE p2v: add virt-p2v-make-kiwi to generate kiwi config p2v: add -x option to nm-online .gitignore

[Libguestfs] [PATCH v3 3/4] p2v: add virt-p2v-make-kiwi to generate kiwi config

2016-06-22 Thread Cédric Bosdonnat
tion to the C folder. If not specified, the default is +F in the current directory. + +=item B<-V> + +=item B<--version> + +Display version number and exit. + +=back + +=head1 FILES + +=over 4 + +=item F<$libexecdir/virt-p2v> + +The L<virt-p2v(1)> binary which is c

[Libguestfs] [PATCH v3 1/4] p2v: use yast2 lan on SUSE distros rather than NM

2016-06-22 Thread Cédric Bosdonnat
NetworkManager isn't provided on SLES. As yast2 lan is available on all openSUSE / SLE distro, use it instead. --- p2v/gui.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/p2v/gui.c b/p2v/gui.c index e720002..f8605a3 100644 --- a/p2v/gui.c +++ b/p2v/gui.c @@ -654,7

[Libguestfs] [PATCH v3 4/4] p2v: add -x option to nm-online

2016-06-22 Thread Cédric Bosdonnat
On distros not running NetworkManager, use the nm-online -x parameter to exit quickly. The network connection will be checked just after anyway when attempting to connect to the conversion server using ssh. --- p2v/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Libguestfs] [PATCH v3 2/4] p2v: fix dependencies for SLES / openSUSE

2016-06-22 Thread Cédric Bosdonnat
Use the common denominator for SLES and openSUSE in the dependencies. For example most of NetworkManager pieces and metacity aren't provided on SLES. ifconfig is in the net-tools-deprecated package in openSUSE Factory, which means after openSUSE Leap 42.2. Older versions have it in the net-tools

[Libguestfs] [PATCH v2 3/4] p2v: add virt-p2v-make-kiwi to generate kiwi config

2016-06-22 Thread Cédric Bosdonnat
tion to the C folder. If not specified, the default is +F in the current directory. + +=item B<-V> + +=item B<--version> + +Display version number and exit. + +=back + +=head1 FILES + +=over 4 + +=item F<$libexecdir/virt-p2v> + +The L<virt-p2v(1)> binary which is c

[Libguestfs] [PATCH v2 4/4] p2v: add -x option to nm-online

2016-06-22 Thread Cédric Bosdonnat
On distros not running NetworkManager, use the nm-online -x parameter to exit quickly. The network connection will be checked just after anyway when attempting to connect to the conversion server using ssh. --- p2v/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Libguestfs] [PATCH v2 2/4] p2v: fix dependencies for SLES / openSUSE

2016-06-22 Thread Cédric Bosdonnat
Use the common denominator for SLES and openSUSE in the dependencies. For example most of NetworkManager pieces and metacity aren't provided on SLES. ifconfig is in the net-tools-deprecated package in openSUSE Factory, which means after openSUSE Leap 42.2. Older versions have it in the net-tools

[Libguestfs] [PATCH v2 0/4] virt-p2v support for openSUSE / SLES

2016-06-22 Thread Cédric Bosdonnat
Diff to v1: * Use access rather than stat in gui.c * Remove now uneeded and missplaced include for stat.h Cédric Bosdonnat (4): p2v: use yast2 lan on SUSE distros rather than NM p2v: fix dependencies for SLES / openSUSE p2v: add virt-p2v-make-kiwi to generate kiwi config p2v: add -x

[Libguestfs] [PATCH v2 1/4] p2v: use yast2 lan on SUSE distros rather than NM

2016-06-22 Thread Cédric Bosdonnat
NetworkManager isn't provided on SLES. As yast2 lan is available on all openSUSE / SLE distro, use it instead. --- p2v/gui.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/p2v/gui.c b/p2v/gui.c index e720002..58a68ec 100644 --- a/p2v/gui.c +++ b/p2v/gui.c @@ -654,7

[Libguestfs] [PATCH] p2v: kiwi: make sure launch-virt-p2v is executable

2016-06-23 Thread Cédric Bosdonnat
virt-p2v-make-kiwi now forces the launch-virt-p2v mode to 0755 to ensure the executable bit it set for user. --- p2v/virt-p2v-make-kiwi.in | 1 + 1 file changed, 1 insertion(+) diff --git a/p2v/virt-p2v-make-kiwi.in b/p2v/virt-p2v-make-kiwi.in index e493bd4..3506e9b 100644 ---

[Libguestfs] [PATCH v2 1/3] configure: handle older version of ncurses

2016-03-08 Thread Cédric Bosdonnat
ncurses didn't have pkg-config files in not-that-old versions. If those couldn't be found, then try the ncurses6-config tool. --- m4/guestfs_libraries.m4 | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/m4/guestfs_libraries.m4 b/m4/guestfs_libraries.m4 index

[Libguestfs] [PATCH v2 3/3] fish: fix btrfs subvolumes display in error case

2016-03-08 Thread Cédric Bosdonnat
The list of filesystems that is printed when there was an error prints the internal mountable string even for the btrfs subvolumes. Let's printing a valid -m option value instead. --- fish/options.c | 28 +++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git

[Libguestfs] [PATCH v2 2/3] api: add mountable_device and mountable_subvolume

2016-03-08 Thread Cédric Bosdonnat
These two functions allow the user to split the mountable strings into a device and a subvolume if any. See this thread on the mailing list for the rationale: https://www.redhat.com/archives/libguestfs/2016-February/msg00247.html --- generator/actions.ml | 26 ++

[Libguestfs] [PATCH v2 0/3] btrfs subvolumes display fix

2016-03-08 Thread Cédric Bosdonnat
Hi all, Here is version 2 of the patch series, including the changes for Pino's remarks. Cédric Bosdonnat (3): configure: handle older version of ncurses api: add mountable_device and mountable_subvolume fish: fix btrfs subvolumes display in error case fish/options.c | 28

[Libguestfs] [PATCH v3] configure: handle older version of ncurses

2016-03-08 Thread Cédric Bosdonnat
ncurses didn't have pkg-config files in not-that-old versions. If those couldn't be found, then try the ncurses6-config tool. --- m4/guestfs_libraries.m4 | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/m4/guestfs_libraries.m4 b/m4/guestfs_libraries.m4 index

[Libguestfs] [PATCH v3 3/3] fish: fix btrfs subvolumes display in error case

2016-03-08 Thread Cédric Bosdonnat
The list of filesystems that is printed when there was an error prints the internal mountable string even for the btrfs subvolumes. Let's printing a valid -m option value instead. --- fish/options.c | 28 +++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git

[Libguestfs] [PATCH v3 2/3] api: add mountable_device and mountable_subvolume

2016-03-08 Thread Cédric Bosdonnat
These two functions allow the user to split the mountable strings into a device and a subvolume if any. See this thread on the mailing list for the rationale: https://www.redhat.com/archives/libguestfs/2016-February/msg00247.html --- generator/actions.ml | 26 ++

[Libguestfs] [PATCH v3 1/3] configure: handle older version of ncurses

2016-03-08 Thread Cédric Bosdonnat
ncurses didn't have pkg-config files in not-that-old versions. If those couldn't be found, then try the ncurses6-config and ncurses5-config tools. --- m4/guestfs_libraries.m4 | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/m4/guestfs_libraries.m4

[Libguestfs] [PATCH v3 0/3] btrfs subvolumes display fix

2016-03-08 Thread Cédric Bosdonnat
Hi there, Latest and greatest version including all new remarks from both Pino and Rich. Cédric Bosdonnat (3): configure: handle older version of ncurses api: add mountable_device and mountable_subvolume fish: fix btrfs subvolumes display in error case fish/options.c | 28

[Libguestfs] [PATCH 0/3] btrfs subvolumes display fix

2016-03-01 Thread Cédric Bosdonnat
Hey there! Here are a few patches to fix unrelated things: one fixes the configure for older ncurses releases having no pkg-config files. The other two are fixing what Richard mentioned about guestfs subvolumes display Cédric Bosdonnat (3): configure: handle older version of ncurses api

[Libguestfs] [PATCH 2/3] api: add mountable_device and mountable_subvolume

2016-03-01 Thread Cédric Bosdonnat
These two functions allow the user to split the mountable strings into a device and a subvolume if any. See this thread on the mailing list for the rationale: https://www.redhat.com/archives/libguestfs/2016-February/msg00247.html --- generator/actions.ml | 25 +

[Libguestfs] [PATCH 1/3] configure: handle older version of ncurses

2016-03-01 Thread Cédric Bosdonnat
ncurses didn't have pkg-config files in not-that-old versions. If those couldn't be found, then try the ncurses6-config tool. --- m4/guestfs_libraries.m4 | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/m4/guestfs_libraries.m4 b/m4/guestfs_libraries.m4 index

[Libguestfs] [PATCH 3/3] fish: fix btrfs subvolumes display in error case

2016-03-01 Thread Cédric Bosdonnat
The list of filesystems that is printed when there was an error prints the internal mountable string even for the btrfs subvolumes. Let's printing a valid -m option value instead. --- fish/options.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/fish/options.c

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

2016-04-05 Thread Cédric Bosdonnat
To add this support, the existing code searches for either the viostor or the VMDP (Virtual Machine Driver Pack) files and updates the registry accordingly. Note that VMDP's block driver pvvxblk depends on the ballooning driver pvvxbn. --- v2v/convert_windows.ml | 59 --

[Libguestfs] [PATCH 4/7] v2v: extract reusable parts of viostor regedits

2016-04-05 Thread Cédric Bosdonnat
There are registry entries that are needed to add some other drivers. Extracting them into a function will help adding SUSE VMDP support. --- v2v/windows_virtio.ml | 311 -- 1 file changed, 176 insertions(+), 135 deletions(-) diff --git

[Libguestfs] [PATCH 1/7] v2v: check next free oem%d.inf in /Windows/Inf

2016-04-05 Thread Cédric Bosdonnat
It seems that checking for oem%d.inf in the DeviceIds registry entry doesn't always list all oemXX.inf files. For example we may have oem1.inf free in the registry key, but used in another one. Also extract this into a separate function for later use to setup another driver. ---

[Libguestfs] [PATCH 6/7] v2v: quiet virtio net and balloon devices wizards

2016-04-05 Thread Cédric Bosdonnat
Setting the ConfigFlags to 0x40 for those will make windows quiet at the first boot about those new devices. The wizard must not be presented to the user since the needed drivers will automatically be installed at firstboot... or worse, the wizard can even block the installer. ---

[Libguestfs] [PATCH 0/7] Add support for SUSE virtio windows drivers

2016-04-05 Thread Cédric Bosdonnat
Hi there, SUSE ships Virtual Machine Driver Pack for the virtio windows drivers. Get v2v and customize to discover them and use them if available. Cédric Bosdonnat (7): v2v: check next free oem%d.inf in /Windows/Inf v2v: extract controller offset discovery as a function customize: add

[Libguestfs] [PATCH 3/7] customize: add support for pvvxsvc

2016-04-05 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 | 13 +++- customize/firstboot.ml | 169 +++ customize/virt-customize.pod | 6 ++

[Libguestfs] [PATCH 5/7] v2v: adapt the subkey in Enum registry to windows version

2016-04-05 Thread Cédric Bosdonnat
We need to adapt the Services\viostor\Enum\PCI\VEN_1AF4_1001_00021AF4_00 subkey to what windows actually uses. --- v2v/windows_virtio.ml | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/v2v/windows_virtio.ml b/v2v/windows_virtio.ml index 8a0b529..dfb7b71 100644 ---

[Libguestfs] [PATCH 2/7] v2v: extract controller offset discovery as a function

2016-04-05 Thread Cédric Bosdonnat
This function is needed for other drivers, move the code in order to help sharing it later. --- v2v/windows_virtio.ml | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/v2v/windows_virtio.ml b/v2v/windows_virtio.ml index b0d9d08..14ffc51 100644 ---

[Libguestfs] [PATCH] v2v: handle subfolders in ova files

2016-05-19 Thread Cédric Bosdonnat
Some ova files have their ovf and other files inside a folder rather than at the root of the tarball. Consider the paths relative to the ovf file to cover this case too. --- v2v/Makefile.am | 1 + v2v/input_ova.ml | 3 +- v2v/test-v2v-i-ova-subfolders.sh | 88

[Libguestfs] [PATCH v3 3/3] v2v: handle subfolders in ova files

2016-05-23 Thread Cédric Bosdonnat
Some ova files hke those produced by SUSE Studio ave their ovf, mf and other files inside a folder rather than at the root of the tarball. Consider the paths relative to the ovf and mf files to cover this case too. --- v2v/Makefile.am| 1 + v2v/input_ova.ml

[Libguestfs] [PATCH v3 0/3] SUSE VMDP support

2016-05-23 Thread Cédric Bosdonnat
Hi there, Here is v3 of the remaining patches. Diff to v2: * Removed the patch related to QXL * Fixed the firstboot script with Roman's comments * Fixed ova with subfolders test * Handle MF-relative path in ova files * Fixed now unneeded match case as per Richard's comment Cédric Bosdonnat

[Libguestfs] [PATCH v3 1/3] customize: fix windows firstboot script

2016-05-23 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 | 10 +- 1 file changed, 5

[Libguestfs] [PATCH v3 2/3] v2v: add support for SUSE VMDP drivers

2016-05-23 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

[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

[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

[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 ---

[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

[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

[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 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 ++

[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

[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

[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

[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

[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. ---

[Libguestfs] [PATCH v2 02/11] Update packagelist for SLES and openSUSE

2016-05-18 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. openSUSE needs ntfs-3g and ntfsprogs packages. --- appliance/packagelist.in | 4 1 file changed, 4 insertions(+) diff --git

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

2016-05-18 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 | 10

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

2016-05-18 Thread Cédric Bosdonnat
Hi all, v2 includes all comments from Pino and Richard. I also removed the mkdir /run/lvm in the init since it only failed in one case and couldn't reproduce it anymore. Cédric Bosdonnat (11): v2v: also search for windows virtio drivers in symlinks Update packagelist for SLES and openSUSE

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

2016-05-18 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 ---

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

2016-05-18 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

[Libguestfs] [PATCH v2 09/11] appliance: skip /etc/mtab creation is already existing

2016-05-18 Thread Cédric Bosdonnat
At least on openSUSE and SLES, the /etc/mtab file is already existing. Skipping the symlink creation in init removes one error message during the appliance boot. --- appliance/init | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/appliance/init b/appliance/init index

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

2016-05-18 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 +- v2v/test-v2v-in-place.sh | 2 +- v2v/test-v2v-virtio-win-iso.sh | 2 +-

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

2016-05-18 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

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

2016-05-18 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

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

2016-05-18 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

[Libguestfs] [PATCH v2 5/7] builder: add Index.write_entry function

2017-02-07 Thread Cédric Bosdonnat
Add a function to properly write virt-builder source index entries. Note that this function is very similar to Index.print_entry that is meant for debugging purposes. --- builder/index.mli| 3 +++ builder/index_parser.ml | 52

[Libguestfs] [PATCH v2 4/7] builder: rename docs test script

2017-02-07 Thread Cédric Bosdonnat
Rename test-virt-builder-docs.sh into test-docs.sh to include test for another tool's documentation. --- builder/Makefile.am | 4 ++-- builder/{test-virt-builder-docs.sh => test-docs.sh} | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename

[Libguestfs] [PATCH v2 1/7] mllib: factorize code to add Checksum.get_checksum function

2017-02-07 Thread Cédric Bosdonnat
Getting checksum involves the same code than verifying them. Create a get_checksum function and use it in verify_checksum. --- mllib/checksums.ml | 25 - mllib/checksums.mli | 9 + 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/mllib/checksums.ml

[Libguestfs] [PATCH v2 3/7] mllib: expose libosinfo DB reading functions in mllib

2017-02-07 Thread Cédric Bosdonnat
src/osinfo.c has generic code to read the libosinfo DB. Add a wrapper around it to expose it in mllib for use in ocaml code. --- lib/Makefile.am | 2 + lib/osinfo-iso.c | 464 lib/osinfo.c | 477

[Libguestfs] [PATCH v2 7/7] Add a virt-builder-repository tool

2017-02-07 Thread Cédric Bosdonnat
y --gpg "gpg --passphrase-file /tmp/pass --batch" [...] + +=item B<-K> KEYID + +=item B<--gpg-key> KEYID + +Specify the GPG key to be used to sign the repository index file. +If not provided, the index will left unsigned. C is used to +identify the GPG key to use. This val

[Libguestfs] [PATCH v2 0/7] Introducing virt-builder-repository

2017-02-07 Thread Cédric Bosdonnat
Hi all, Here is a new version of the virt-builder-repository series taking care of Pino's comments. It has also been rebased on recent master. Cédric Bosdonnat (7): mllib: factorize code to add Checksum.get_checksum function Move xml and xpath_helpers OCAML code to mllib mllib: expose

[Libguestfs] [PATCH v2 6/7] builder: add a template parameter to get_index

2017-02-07 Thread Cédric Bosdonnat
get_index now gets a new template parameter. Setting it to true will make the index parsing less picky about missing important data. This can be used to parse a partial index file. --- builder/builder.ml | 2 +- builder/index_parser.ml | 20 ++-- builder/index_parser.mli |

[Libguestfs] [PATCH v3 06/10] mllib: ocaml wrapper for lib/osinfo

2017-02-10 Thread Cédric Bosdonnat
Provide osinfo database parsing API in OCAML. --- mllib/Makefile.am | 11 -- mllib/osinfo-c.c | 100 ++ mllib/osinfo.ml | 26 ++ mllib/osinfo.mli | 31 + 4 files changed, 166 insertions(+), 2 deletions(-)

[Libguestfs] [PATCH v3 00/10] Introducing virt-builder-repository

2017-02-10 Thread Cédric Bosdonnat
Hi guys, Here is a v3 of the series, including changes to answer Richard's comments. Cédric Bosdonnat (10): mllib: factorize code to add Checksum.get_checksum function Move xml and xpath_helpers OCAML code to mllib mllib: add Xml.parse_file helper lib/osinfo.c: Extract xml processing

[Libguestfs] [PATCH v3 03/10] mllib: add Xml.parse_file helper

2017-02-10 Thread Cédric Bosdonnat
Provide a helper function rather than having callers read the file and then parse the string. --- mllib/xml.ml | 4 mllib/xml.mli | 3 +++ 2 files changed, 7 insertions(+) diff --git a/mllib/xml.ml b/mllib/xml.ml index e67245188..78e75b8f2 100644 --- a/mllib/xml.ml +++ b/mllib/xml.ml @@

[Libguestfs] [PATCH v3 10/10] Add a virt-builder-repository tool

2017-02-10 Thread Cédric Bosdonnat
uot;gpg --passphrase-file /tmp/pass --batch" [...] + +=item B<-K> KEYID + +=item B<--gpg-key> KEYID + +Specify the GPG key to be used to sign the repository index file. +If not provided, the index will left unsigned. C is used to +identify the GPG key to use. This value is passed to gpg's +C<--default-key> option and can can thus be an email address or a +fingerprint. + +B: by default, virt-builder-repository searches for the key +in the user's GPG key ring. + +=item B<--keep-index> + +When using a GPG key, don't remove the unsigned index. + +=item B<-i> + +=item B<--interactive> + +Prompt for missing data. + +=item B<--colors> + +=item B<--colours> + +Use ANSI colour sequences to colourize messages. This is the default +when the output is a tty. If the output of the program is redirected +to a file, ANSI colour sequences are disabled unless you use this +option. + +=item B<-q> + +=item B<--quiet> + +Don't print ordinary progress messages. + +=item B<-v> + +=item B<--verbose> + +Enable debug messages and/or produce verbose output. + +When reporting bugs, use this option and attach the complete output to +your bug report. + +=item B<-V> + +=item B<--version> + +Display version number and exit. + +=item B<-x> + +Enable tracing of libguestfs API calls. + + +=back + +=head1 EXIT STATUS + +This program returns 0 if successful, or non-zero if there was an +error. + +=head1 SEE ALSO + +L<virt-builder(1)> +L<http://libguestfs.org/>. + +=head1 AUTHOR + +Cédric Bosdonnat L<mailto:cbosdon...@suse.com> + +=head1 COPYRIGHT + +Copyright (C) 2016 SUSE Inc. -- 2.11.0 ___ Libguestfs mailing list Libguestfs@redhat.com https://www.redhat.com/mailman/listinfo/libguestfs

[Libguestfs] [PATCH v3 09/10] builder: add a template parameter to get_index

2017-02-10 Thread Cédric Bosdonnat
get_index now gets a new template parameter. Setting it to true will make the index parsing less picky about missing important data. This can be used to parse a partial index file. --- builder/builder.ml | 2 +- builder/index_parser.ml | 20 ++-- builder/index_parser.mli |

[Libguestfs] [PATCH v3 05/10] lib: extract osinfo DB traversing API

2017-02-10 Thread Cédric Bosdonnat
Split lib/osinfo.c to provide an API for other pieces of code (namely mllib) to reuse it. The ISO-related processing is thus moved into a lib/osinfo-iso.c file. --- lib/Makefile.am | 2 + lib/osinfo-iso.c | 464 +++ lib/osinfo.c | 424

[Libguestfs] [PATCH v3 02/10] Move xml and xpath_helpers OCAML code to mllib

2017-02-10 Thread Cédric Bosdonnat
To allow other pieces of code to process XML files easily, move the xml.ml* and xpath_helpers.ml* from v2v to mllib. --- docs/C_SOURCE_FILES | 2 +- mllib/Makefile.am| 9 ++-- {v2v => mllib}/xml-c.c | 47 {v2v

[Libguestfs] [PATCH v3 08/10] builder: add Index.write_entry function

2017-02-10 Thread Cédric Bosdonnat
Add a function to properly write virt-builder source index entries. Note that this function is very similar to Index.print_entry that is meant for debugging purposes. --- builder/index.mli| 3 +++ builder/index_parser.ml | 52

[Libguestfs] [PATCH v3 01/10] mllib: factorize code to add Checksum.get_checksum function

2017-02-10 Thread Cédric Bosdonnat
Getting checksum involves the same code than verifying them. Create a get_checksum function and use it in verify_checksum. --- mllib/checksums.ml | 25 +++-- mllib/checksums.mli | 9 + 2 files changed, 24 insertions(+), 10 deletions(-) diff --git

[Libguestfs] [PATCH v3 04/10] lib/osinfo.c: Extract xml processing into a callback

2017-02-10 Thread Cédric Bosdonnat
In order to further reuse the osinfo database parsing in OCAML, this commit extracts the XML processing for the distro ISOs and places it into a newly created callback. This will later help other code to traverse the osinfo DB files and let them extract what they need from them. --- lib/osinfo.c

[Libguestfs] [PATCH v3 07/10] builder: rename docs test script

2017-02-10 Thread Cédric Bosdonnat
Rename test-virt-builder-docs.sh into test-docs.sh to include test for another tool's documentation. --- builder/Makefile.am | 4 ++-- builder/{test-virt-builder-docs.sh => test-docs.sh} | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename

[Libguestfs] [PATCH] packagelist: add initviocons package on SUSE

2016-11-30 Thread Cédric Bosdonnat
initviocons package provides tools to resize the terminal. Having it in the appliance will allow SUSE users to have proper line wrapping in their terminal when using virt-rescue. --- appliance/packagelist.in | 1 + 1 file changed, 1 insertion(+) diff --git a/appliance/packagelist.in

[Libguestfs] [PATCH 5/5] Add a virt-builder-repository tool

2017-01-03 Thread Cédric Bosdonnat
remove an image from the repository, just remove the corresponding +compressed image file before running virt-builder-repository. + +Then running the following command will complete and update the index +file: + + virt-builder-repository --gpg-key "j...@hacker.org" -i /path/to/folder +

[Libguestfs] [PATCH 4/5] mllib: add libosinfo DB reading helpers

2017-01-03 Thread Cédric Bosdonnat
There is already a libosinfo reading function located in src folder to get the iso informations. Provide a similar but more generic function to be used in ocaml tools. --- mllib/Makefile.am | 12 -- mllib/osinfo.ml | 64 +

[Libguestfs] [PATCH 1/5] builder: extract Yajl helper functions to yajl.ml

2017-01-03 Thread Cédric Bosdonnat
Extract the yajl object_get_* helpers in the Yajl module since this could be useful for any Yajl user code. --- builder/simplestreams_parser.ml | 52 -- builder/yajl.ml | 55 + builder/yajl.mli

[Libguestfs] [PATCH 3/5] Move xml and xpath_helpers OCAML code to mllib

2017-01-03 Thread Cédric Bosdonnat
To allow other pieces of code to process XML files easily, move the xml.ml* and xpath_helpers.ml* from v2v to mllib. --- docs/C_SOURCE_FILES | 2 +- mllib/Makefile.am| 9 +++-- {v2v => mllib}/xml-c.c | 0 {v2v => mllib}/xml.ml| 0 {v2v =>

  1   2   3   >