Re: [Libguestfs] [PATCH] sysprep: handle distro specific sysv scripts

2013-12-12 Thread Olaf Hering
On Thu, Dec 12, Pino Toscano wrote: > What do you think? I think that your Should-Start handling is broken. Required means the given file can not properly work without the listed servers, insserv will error out. Should means it can very well work without them if they are not present or enabled. O

Re: [Libguestfs] [PATCH] sysprep: handle distro specific sysv scripts

2013-12-12 Thread Olaf Hering
On Thu, Dec 12, Pino Toscano wrote: > On Thursday 12 December 2013 14:49:36 Olaf Hering wrote: > > On Thu, Dec 12, Pino Toscano wrote: > > > What do you think? > > > > I think that your Should-Start handling is broken. Required means the > > given file can

Re: [Libguestfs] [PATCH] sysprep: handle distro specific sysv scripts

2013-12-12 Thread Olaf Hering
On Thu, Dec 12, Pino Toscano wrote: > Sure, but as a Should-Start means it is a weak dependency, and can be > skipped, which is what I don't want. Are you saying in Debian the Should-Start is not handled properly? Even if Should-Start is weak it still has to be taken into account. Olaf ___

Re: [Libguestfs] [PATCH] sysprep: handle distro specific sysv scripts

2013-12-12 Thread Olaf Hering
On Thu, Dec 12, Pino Toscano wrote: > No, I'm saying a weak dependency is no guarantee the provided firstboot > commands can run successfully, and running them after $all should > provide a better safety. Pino, the weakness is really just about the order of what will be ordered. It will not pu

[Libguestfs] mke2fs fails due to wipefs --force

2014-01-19 Thread Olaf Hering
My wipefs has no --force option, as a result mke2fs command in guestfish fails. Looks like 72dd398679cd0bb803daf306d12558369615ba70 needs an adjustment to make use of do_wipefs? Also str_wipefs is not used in that file. Olaf ___ Libguestfs mailing list

[Libguestfs] [PATCH] daemon: add missing GUESTFSD_EXT_CMD usage

2014-01-19 Thread Olaf Hering
Signed-off-by: Olaf Hering --- Not even compile tested, against 1.24 branch. daemon/btrfs.c | 2 +- daemon/command.c | 3 ++- daemon/debug.c | 3 ++- daemon/ldm.c | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index 0b877f8

Re: [Libguestfs] mke2fs fails due to wipefs --force

2014-01-20 Thread Olaf Hering
On Sun, Jan 19, Richard W.M. Jones wrote: > How about the attached patch (only compile-tested)? This patch works for me. Thanks. Olaf ___ Libguestfs mailing list Libguestfs@redhat.com https://www.redhat.com/mailman/listinfo/libguestfs

[Libguestfs] guestfish and luks-format

2014-01-20 Thread Olaf Hering
Is "luks-format" supposed to work with guestfish? Like guestfish

Re: [Libguestfs] guestfish and luks-format

2014-01-20 Thread Olaf Hering
On Mon, Jan 20, Richard W.M. Jones wrote: > For example: > > $ echo 123456 | guestfish -x --keys-from-stdin -N part luks-format /dev/sda1 0 thanks, I changed my code like this: ( echo "123456" echo "123456" ) | \ guestfish \ -x \ --keys-from-stdin \ \ luks-format $part 0

[Libguestfs] newlines with write-append

2014-01-20 Thread Olaf Hering
Silly bash scripts have stuff like below to get things done, but equally silly guestfish scripts fail to add the required newline. Why is that? echo "$dev1 $mnt1 $fs $opts 1 2" >> /etc/fstab echo "$dev2 $mnt2 $fs $opts 1 2" >> /etc/fstab write-append /etc/fstab "$dev1 $mnt1 $fs $opts 1 2" : \ wri

Re: [Libguestfs] newlines with write-append

2014-01-20 Thread Olaf Hering
On Mon, Jan 20, Richard W.M. Jones wrote: > Have you considered using a real programming language, like Perl + > Sys::Guestfs, Python + guestfs etc.? Whenever I bump into the limits > of guestfish, I usually turn to Perl. For my hackery I will use guestfish because I'm used to it. Olaf ___

[Libguestfs] [PATCH] appliance: Disable ipv6 in the appliance because qemu usernet is ipv4 only

2014-01-23 Thread Olaf Hering
Signed-off-by: Olaf Hering --- Untested in this environment. appliance/init | 4 1 file changed, 4 insertions(+) diff --git a/appliance/init b/appliance/init index b25ea26..cc8c978 100755 --- a/appliance/init +++ b/appliance/init @@ -71,6 +71,10 @@ for f in /sys/block/{h,s,ub,v}d*/queue

Re: [Libguestfs] [PATCH] appliance: Disable ipv6 in the appliance because qemu usernet is ipv4 only

2014-01-23 Thread Olaf Hering
On Thu, Jan 23, Olaf Hering wrote: > +++ b/appliance/init > # Update the system clock. > hwclock -u -s Why is that needed? Just wondering... Olaf ___ Libguestfs mailing list Libguestfs@redhat.com https://www.redhat.com/mailman/listinfo/libguestfs

Re: [Libguestfs] [PATCH] appliance: Disable ipv6 in the appliance because qemu usernet is ipv4 only

2014-01-24 Thread Olaf Hering
On Fri, Jan 24, Richard W.M. Jones wrote: > However I don't understand why disabling IPv6 should be necessary. If > sites resolve to +A records, then presumably it's going to choose > the A (IPv4) route since no IPv6 route exists. If a site resolves to > only an record, then it's not re

[Libguestfs] progress output during guestfish sh commands

2014-02-04 Thread Olaf Hering
Is there any way to flush the output of a long running 'guestfish sh cmd.sh' call? It seems to me that output is only shown once cmd.sh has finished. I already split cmd.sh into smaller pieces to see overall progress. But output from a verbose, long running single command within cmd.sh is not shown

Re: [Libguestfs] progress output during guestfish sh commands

2014-02-04 Thread Olaf Hering
On Tue, Feb 04, Richard W.M. Jones wrote: > > It seems to me that output is only shown once cmd.sh has finished. I > > already split cmd.sh into smaller pieces to see overall progress. But > > output from a verbose, long running single command within cmd.sh is not > > shown. > > Verbose output is

Re: [Libguestfs] enable build for ocaml bytecode

2014-02-26 Thread Olaf Hering
On Thu, Jan 17, Richard W.M. Jones wrote: > On Wed, Jan 16, 2013 at 05:51:53PM +0100, Olaf Hering wrote: > > On Mon, Jan 14, Olaf Hering wrote: > > > This is a first attempt to build libguestfs with just a ocaml bytecode > > > compiler. The three tools written in ocaml

Re: [Libguestfs] enable build for ocaml bytecode

2014-02-28 Thread Olaf Hering
On Fri, Feb 28, Richard W.M. Jones wrote: > I believe this patch has now been superseded by Hilko's commit here: I'm backporting it right now, will send my version once it actually builds. Olaf ___ Libguestfs mailing list Libguestfs@redhat.com https:

Re: [Libguestfs] [PATCH] Fix building on architectures where ocamlopt is not available

2014-02-28 Thread Olaf Hering
On Fri, Feb 28, Hilko Bengen wrote: > --- > builder/Makefile.am| 18 +- > configure.ac | 2 ++ > mllib/Makefile.am | 60 > +++--- > ocaml/Makefile.am | 28 +++--- Something like this is r

Re: [Libguestfs] enable build for ocaml bytecode

2014-02-28 Thread Olaf Hering
On Fri, Feb 28, Olaf Hering wrote: > On Fri, Feb 28, Richard W.M. Jones wrote: > > > I believe this patch has now been superseded by Hilko's commit here: > > I'm backporting it right now, will send my version once it actually > build

Re: [Libguestfs] FYI: [PATCH supermin] rpm: Add support for OpenSUSE.

2014-03-03 Thread Olaf Hering
On Thu, Feb 27, Richard W.M. Jones wrote: > I added this patch to supermin 5, which enables support for OpenSUSE / > zypper, and allowed me to rebuild libguestfs on 13.1. Thanks for porting the zypper patches. Right now I dont have time to continue with zypper support for supermin. Olaf _

Re: [Libguestfs] [PATCH] Fix building on architectures where ocamlopt is not available

2014-03-11 Thread Olaf Hering
On Fri, Feb 28, Richard W.M. Jones wrote: > I can't test if it will specifically break this because I don't have > access to any machines that don't have ocamlopt, but it's something to > watch out for. > > In any case, I have pushed this since it works fine for me. Any chance this can be backpo

Re: [Libguestfs] [PATCH] Fix building on architectures where ocamlopt is not available

2014-03-11 Thread Olaf Hering
On Tue, Mar 11, Richard W.M. Jones wrote: > Actually I looked at the patch when I was doing the 1.24.8 release but > IIRC it was not a clean cherry pick. Thats why I sent out my backport to 1.24.x, too. > How about carrying it as a downstream patch (just for 1.24)? It requires changes to Makefi

Re: [Libguestfs] [PATCH supermin v4] Supermin 5 rewrite.

2014-03-27 Thread Olaf Hering
On Tue, Feb 25, Richard W.M. Jones wrote: > configure.ac | 27 +- Commit breaks expectations during pkg build. Before commit 29eb7d6a0 ("configure: Use AC_PATH_PROG for package manager binaries.") it was possible to pass an executable via environment like "env ZYPPER=zypper

Re: [Libguestfs] [PATCH supermin v4] Supermin 5 rewrite.

2014-03-28 Thread Olaf Hering
On Fri, Mar 28, Richard W.M. Jones wrote: > I guess the question from me is why the user would want to use zypper > from $PATH, instead of zypper which supermin had been configured and > tested against? Is it common that SUSE users want to try different > versions of zypper? It might be a corner

Re: [Libguestfs] ANNOUNCE: libguestfs 1.26 released

2014-03-28 Thread Olaf Hering
On Thu, Mar 27, Richard W.M. Jones wrote: > I'm pleased to announce libguestfs 1.26, a library and set of tools This fails to link at least in sles11sp3, 1.25.37 was still ok: ... [ 288s] virt_index_validate-index-validate.o: In function `main': [ 288s] index-validate.c:(.text+0x94): undefined

Re: [Libguestfs] ANNOUNCE: libguestfs 1.26 released

2014-03-28 Thread Olaf Hering
On Fri, Mar 28, Richard W.M. Jones wrote: > I'd say this is a gnulib problem, although why gnulib has decided to > use replacement functions is a mystery. My understanding is that > getopt_long is part of glibc, so gnulib shouldn't need to replace it. > Did ./configure output mention getopt*? If

Re: [Libguestfs] ANNOUNCE: libguestfs 1.26 released

2014-03-28 Thread Olaf Hering
On Fri, Mar 28, Richard W.M. Jones wrote: > On Fri, Mar 28, 2014 at 10:00:49AM +0100, Olaf Hering wrote: > > Does your build have "working GNU getopt function... yes"? > > Seems so: > > $ rm config.cache > $ ./configure |& grep getopt > checking geto

[Libguestfs] new warnings in hivex-1.3.10

2014-05-13 Thread Olaf Hering
hivex-1.3.10 does not pass the sles11sp3 post-build-checks anymore, 1.3.8 was still ok. The relevant output is: ... [ 57s] Hivex.xs: In function 'XS_Win__Hivex_node_name': [ 57s] Hivex.xs:236: warning: implicit declaration of function 'newSVpvn_utf8' [ 57s] Hivex.xs:236: warning: assignment

Re: [Libguestfs] Xen drivers for virt-builder images

2014-06-12 Thread Olaf Hering
On Thu, Jun 12, Richard W.M. Jones wrote: > dracut --add-drivers "some list of xen kmods ..." Whatever you do: please use modaliases like 'xen:vbd xen:vif' or whatever the actual name is. Olaf ___ Libguestfs mailing list Libguestfs@redhat.com https://

Re: [Libguestfs] [PATCH v2 1/4] appliance: Use dhclient instead of hard-coding IP address of appliance.

2014-10-02 Thread Olaf Hering
On Thu, Oct 02, Richard W.M. Jones wrote: > +if grep -sq guestfs_network=1 /proc/cmdline; then > +dhclient > +fi dhclient will be missing at least in openSUSE. Not an issue now, does the script fail if the command fails to execute due to ENOENT? Olaf

Re: [Libguestfs] [PATCH v2 1/4] appliance: Use dhclient instead of hard-coding IP address of appliance.

2014-10-02 Thread Olaf Hering
On Thu, Oct 02, Richard W.M. Jones wrote: > The script won't fail, but the network won't work. What's the > alternative on SuSE? I think that would be dhcpcd, which is also used by NetworkManager. Olaf ___ Libguestfs mailing list Libguestfs@redhat.co

Re: [Libguestfs] [PATCH v2 1/4] appliance: Use dhclient instead of hard-coding IP address of appliance.

2014-10-02 Thread Olaf Hering
On Thu, Oct 02, Richard W.M. Jones wrote: > It seems as if it would, from reading the dhcpcd man page .. Looks like the syntax is 'dhcpcd '. Olaf ___ Libguestfs mailing list Libguestfs@redhat.com https://www.redhat.com/mailman/listinfo/libguestfs

Re: [Libguestfs] [PATCH v2 1/4] appliance: Use dhclient instead of hard-coding IP address of appliance.

2014-10-02 Thread Olaf Hering
On Thu, Oct 02, Richard W.M. Jones wrote: > I'm mainly worried that we won't know how interfaces are named, > although the old code assumed eth0 and appeared to work until now. Yes. And if the appliance is booted with net.ifnames=0, or whatever keeps systemd out of the picture, the name will be p

Re: [Libguestfs] [PATCH v2 1/4] appliance: Use dhclient instead of hard-coding IP address of appliance.

2014-10-02 Thread Olaf Hering
On Thu, Oct 02, Olaf Hering wrote: > On Thu, Oct 02, Richard W.M. Jones wrote: > > > The script won't fail, but the network won't work. What's the > > alternative on SuSE? > I think that would be dhcpcd, which is also used by NetworkManager. Scratch that. At

Re: [Libguestfs] Plan for libguestfs 1.28

2014-10-09 Thread Olaf Hering
On Tue, Oct 07, Richard W.M. Jones wrote: > It has been an amazing 6½ months since the last stable release of > libguestfs. > > I'd like to plan a new 1.28 release soon. > > Please follow-up if there are features / blockers / bugs that need to > be addressed for 1.28. I see master failing in my

Re: [Libguestfs] Plan for libguestfs 1.28

2014-10-09 Thread Olaf Hering
On Thu, Oct 09, Olaf Hering wrote: > I see master failing in my SLE11 builds since some time. Currently it > fails with a syntax error. Are bison-2.3 of flex-2.5.35 too old? The last successful build was 1.27.9, next commit was 1.27.46.

Re: [Libguestfs] Plan for libguestfs 1.28

2014-10-09 Thread Olaf Hering
On Thu, Oct 09, Richard W.M. Jones wrote: > Is there a chance of using a newer version of bison? The alternative > might be to see if reverting that patch still works, and carrying the > revert as a downstream patch. I will try to build a copy of bison before starting libguestfs, that should cur

[Libguestfs] missing btrfs subvol support

2014-10-10 Thread Olaf Hering
Is btrfs subvol support failing just for me? Looks like nothing adds the required '@/' string. virt-ls uses the first variant of the command: > mount -vo subvol=var/spool,ro /dev/sda2 /sysroot/ [ 113.852047] BTRFS info (device sda2): disk space caching is enabled [ 113.852869] BTRFS: has skinny

Re: [Libguestfs] missing btrfs subvol support

2014-10-10 Thread Olaf Hering
On Fri, Oct 10, Richard W.M. Jones wrote: > My guess is that the last one (opt/value) will be different for you. Thanks for the pointers. I will poke around. At least augtool on the host seems to behave correctly: olaf@bax:~ $ cd /dev/shm/$$ bash: cd: /dev/shm/3570: Datei oder Verzeichnis nicht

Re: [Libguestfs] missing btrfs subvol support

2014-10-13 Thread Olaf Hering
On Fri, Oct 10, Richard W.M. Jones wrote: > We use Augeas to parse the /etc/fstab btrfs entries, see > src/inspect-fs-unix.c: check_fstab: > > https://github.com/libguestfs/libguestfs/blob/master/src/inspect-fs-unix.c#L1089 > > And we then pass the subvol back to the mount command in > daemon/mo

[Libguestfs] make install of ocaml libs fails

2014-10-16 Thread Olaf Hering
Today I did it, for the very first time: Did not build a package. Just ran "make install". Twice! ... ocamlfind install \ -ldconf ignore -destdir /usr/lib64/ocaml \ guestfs \ META *.so *.a *.cma *.cmi ./*.mli *.cmx *.cmxa ocamlfind: Package guestfs is already installed - (file /usr/lib64/o

Re: [Libguestfs] missing btrfs subvol support

2014-10-16 Thread Olaf Hering
On Fri, Oct 10, Mike Latimer wrote: > On Friday, October 10, 2014 03:07:51 PM Olaf Hering wrote: > > Thanks for the pointers. I will poke around. At least augtool on the > > host seems to behave correctly: > > I don't think this is related to Augeas. Instea

[Libguestfs] [PATCH] btrfs: list only subvolumes below path

2014-10-16 Thread Olaf Hering
b2/i386-pc mount -osubvol=boot/grub2/i386-pc $dev /sysroot will fail, while mount -osubvol=@/boot/grub2/i386-pc $dev /sysroot will succeed. Signed-off-by: Olaf Hering --- daemon/btrfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c ind

Re: [Libguestfs] missing btrfs subvol support

2014-10-17 Thread Olaf Hering
On Thu, Oct 16, Olaf Hering wrote: > I can probably add a check somewhere to catch the whatever=="@". A > better fix would be to check if a given subvolume is for the entire > partition. So after talking to David Sterba there is no way to tell if a given subvolume is for t

Re: [Libguestfs] missing btrfs subvol support

2014-10-17 Thread Olaf Hering
On Fri, Oct 17, Pino Toscano wrote: > On Friday 17 October 2014 11:25:03 Olaf Hering wrote: > > On Thu, Oct 16, Olaf Hering wrote: > > > I can probably add a check somewhere to catch the whatever=="@". A > > > better fix would be to check if a given subvol

Re: [Libguestfs] make install of ocaml libs fails

2014-10-21 Thread Olaf Hering
On Mon, Oct 20, Richard W.M. Jones wrote: > I can understand why this happens: ocamlfind install will see that > /usr/lib64/ocaml/guestfs already contains the installed package, and > refuse to install it on top. One day I will try to understand what the ocaml folks think when they do installatio

[Libguestfs] [PATCH] remove ulockmgr from fuse LDFLAGS

2012-08-29 Thread Olaf Hering
. Signed-off-by: Olaf Hering diff --git a/examples/Makefile.am b/examples/Makefile.am index 35bf765..4bfa85d 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -86,7 +86,7 @@ mount_local_CFLAGS = \ $(FUSE_CFLAGS) \ $(WARN_CFLAGS) $(WERROR_CFLAGS) mount_local_LDADD

Re: [Libguestfs] [PATCH] remove ulockmgr from fuse LDFLAGS

2012-08-29 Thread Olaf Hering
On Wed, Aug 29, Richard W.M. Jones wrote: > On Wed, Aug 29, 2012 at 03:15:12PM +0200, Olaf Hering wrote: > > libguestfs fails to build with --enable-fuse on openSuSE 11.4 and > > earlier because the included fuse version does not include > > libulockmgr.so. configure alre

Re: [Libguestfs] [PATCH] collect list of called external commands

2012-08-30 Thread Olaf Hering
On Thu, Aug 30, Olaf Hering wrote: > -extern int e2prog (char *name); /* Massive hack for RHEL 5. */ > +extern int e2prog (const char *name); /* Massive hack for RHEL 5. */ > +++ b/daemon/ext2.c > -e2prog (char *name) > +e2prog (const char *name) > { >char *p = strstr

Re: [Libguestfs] [PATCH] collect list of called external commands

2012-08-30 Thread Olaf Hering
On Thu, Aug 30, Richard W.M. Jones wrote: > On Thu, Aug 30, 2012 at 05:53:06PM +0200, Olaf Hering wrote: > > On Thu, Aug 30, Olaf Hering wrote: > > > > > -extern int e2prog (char *name); /* Massive hack for RHEL 5. */ > > > +extern int e2prog (const char *

Re: [Libguestfs] [PATCH] collect list of called external commands

2012-08-30 Thread Olaf Hering
On Thu, Aug 30, Richard W.M. Jones wrote: > If I apply the attached patch upstream, and the reverse of the > attached patch to the 'oldlinux' branch, you can rebase your patch on > top of this one and it won't require any e2prog hacks. Thanks, I will use this as a base. Olaf ___

Re: [Libguestfs] [PATCH v2] daemon: collect list of called external commands

2012-08-30 Thread Olaf Hering
On Thu, Aug 30, Olaf Hering wrote: > +++ b/daemon/lvm-filter.c > @@ -31,6 +31,11 @@ > #include "daemon.h" > #include "actions.h" > > +GUESTFSD_EXT_CMD(str_lvm, lvm); > +GUESTFSD_EXT_CMD(str_vgchange, vgchange); > @@ -189,7 +194,7 @@ stati

Re: [Libguestfs] [PATCH] collect list of called external commands

2012-08-31 Thread Olaf Hering
On Thu, Aug 30, Richard W.M. Jones wrote: > But since we're maintaining a separate branch for RHEL 5 now[1], we > might just push this peculiarity entirely into that branch. What about the call to udevsettle in daemon/guestfsd.c? Maybe it can be removed as well. For example, udev 128 in SLES11 SP

Re: [Libguestfs] [PATCH] collect list of called external commands

2012-08-31 Thread Olaf Hering
On Fri, Aug 31, Richard W.M. Jones wrote: > In answer to your question, yes, we could keep a patch for this in the > 'oldlinux' branch. Thanks, will post a patch for consideration next week. Olaf ___ Libguestfs mailing list Libguestfs@redhat.com https

[Libguestfs] [PATCH] daemon: remove call to obsolete udevsettle

2012-09-03 Thread Olaf Hering
udevadm is included in all reasonable recent distributions. This avoids 'command not found' errors in verbose mode. Signed-off-by: Olaf Hering diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c index e6d5fde..0db56e4 100644 --- a/daemon/guestfsd.c +++ b/daemon/guestfsd.c @@ -

[Libguestfs] fallback to virtio_blk if guest kernel lacks virtio_scsi support

2012-09-03 Thread Olaf Hering
Currently virtio_scsi is forced if qemu in the host supports this feature. This test does however not take the capabilities of the started guest into account. As a result no disks will be found if the guest kernel is older than 3.4. I forced qemu_supports_virtio_scsi to return always 0, which see

Re: [Libguestfs] fallback to virtio_blk if guest kernel lacks virtio_scsi support

2012-09-03 Thread Olaf Hering
On Mon, Sep 03, Richard W.M. Jones wrote: > I don't know if I want to add extra complexity for this, given what I > said above about virtio-scsi being clearly a better option for the > future. Can you maintain a small out-of-tree patch for this until > OpenSuSE updates its kernel? I agree that t

[Libguestfs] [PATCH] daemon: provide list of checksum commands

2012-09-03 Thread Olaf Hering
While adding the list of external commands I missed the various checksum tools. Signed-off-by: Olaf Hering --- WARNING: not compile tested ... diff --git a/daemon/checksum.c b/daemon/checksum.c index f2e040d..f16a7c0 100644 --- a/daemon/checksum.c +++ b/daemon/checksum.c @@ -31,24 +31,31

[Libguestfs] [PATCH] fix fuse_opt_add_opt_escaped return type

2012-09-04 Thread Olaf Hering
I: Program returns random data in a function E: libguestfs no-return-in-nonvoid-function guestmount.c:75 The function fuse_opt_add_opt_escaped has only one caller and a return code is not checked. Signed-off-by: Olaf Hering --- diff --git a/fuse/guestmount.c b/fuse/guestmount.c index 17e94ba

[Libguestfs] virt-sparsify broken after recent changes

2012-09-04 Thread Olaf Hering
With 1.9.37 the following script worked fine, with 1.9.39 it fails. Any idea what the issue is? Olaf ... mount -o /dev/vda1 /sysroot/ [1.396411] EXT4-fs (vda1): mounting ext2 file system using the ext4 subsystem [1.533090] EXT4-fs (vda1): mounted filesystem without journal. Opts: (null

Re: [Libguestfs] virt-sparsify broken after recent changes

2012-09-04 Thread Olaf Hering
On Tue, Sep 04, Olaf Hering wrote: > time virt-sparsify -v ${img} ${sprs} It works with '--format raw' in this example. Olaf ___ Libguestfs mailing list Libguestfs@redhat.com https://www.redhat.com/mailman/listinfo/libguestfs

Re: [Libguestfs] compile guestfsd

2012-09-12 Thread Olaf Hering
On Wed, Sep 12, Richard Huang wrote: > yes, this is what i was asking for.. > > but I got the below message while compiling guestfsd daemon: > >   configure: error: qemu must be installed > > Since I am compiling on a virtual machine (CentOS 6.3), there is no qemu in > it. > How can I compile

Re: [Libguestfs] guestfsd process dead while quitting guestfish

2012-09-13 Thread Olaf Hering
On Thu, Sep 13, Richard W.M. Jones wrote: > Assuming we stick with virtio-serial for the libguestfs-live case and > don't use something more normal like TCP/IP. So that's why this is > also a bug. Using TCP/IP would simplify porting to Xen, because there is currently no virtio-serial replacement

[Libguestfs] guestfish(1) references non-existant tar_out/tar_in option

2012-09-13 Thread Olaf Hering
While creating my first guestfish script I noticed an inconsistency in the guestfish(1) man page. The option tgz-out references "tar_out", which does not exist, instead its called "tar-out". The same is true for tgz-in/tar_in. After a quick grep in the code its not clear to me how to resolve this

[Libguestfs] virt-rescue --ro option has no effect

2012-09-13 Thread Olaf Hering
Should 'virt-rescue -a some.img --ro' tell qemu/kvm that some.img is supposed to be read-only in the guest? I have not looked at the code yet, perhaps --ro has a meaning only when attaching to a live guest. I was expecting that all write access to some.img is denied in the rescue shell. Olaf ___

[Libguestfs] virt-sysprep cron-spool, no at jobs

2012-09-19 Thread Olaf Hering
sysprep/sysprep_operation_cron_spool.ml claims to remove at jobs, but those are not stored in /var/spool/cron/ on my system. Is the description wrong, or do other distros store the spool data in the cron dir? For me it looks like this (000110156d537 is currently executed): root@probook:~ # find

[Libguestfs] [PATCH] sysprep: handle SuSE in hostname operation

2012-09-19 Thread Olaf Hering
SuSE based installations store the hostname in /etc/HOSTNAME. Add code to handle both opensuse and sles. Code to properly detect the latter will be added with another patch. Signed-off-by: Olaf Hering diff --git a/sysprep/sysprep_operation_hostname.ml b/sysprep/sysprep_operation_hostname.ml

Re: [Libguestfs] [PATCH] sysprep: handle SuSE in hostname operation

2012-09-19 Thread Olaf Hering
On Wed, Sep 19, Richard W.M. Jones wrote: > I should add here this would require us to detect "sles". I'm > not sure what SLES guests return right now, it could be "opensuse", > but I don't have a guest to test with. Right now its still opensuse because the code just matches /etc/SuSE-release O

[Libguestfs] [PATCH] sysprep: remove apache2, audit and ntp in logfile operation

2012-09-19 Thread Olaf Hering
Add more entries to the dump ground of logfile patterns. Signed-off-by: Olaf Hering diff --git a/sysprep/sysprep_operation_logfiles.ml b/sysprep/sysprep_operation_logfiles.ml index 5e6ce7f..a2b1585 100644 --- a/sysprep/sysprep_operation_logfiles.ml +++ b/sysprep/sysprep_operation_logfiles.ml

[Libguestfs] [PATCH] sysprep: add zypper to package-manager-cache operation

2012-09-19 Thread Olaf Hering
libzypp and zypper store their cache files in /var/cache/zypp/{packages,raw,solv}/ and /var/cache/zypper/RPMS/ Add a single pattern to match both cases. Signed-off-by: Olaf Hering diff --git a/sysprep/sysprep_operation_package_manager_cache.ml b/sysprep

[Libguestfs] [PATCH] sysprep: handle SuSE in random-seed operation

2012-09-19 Thread Olaf Hering
Signed-off-by: Olaf Hering diff --git a/sysprep/sysprep_operation_random_seed.ml b/sysprep/sysprep_operation_random_seed.ml index f124c02..1c6060e 100644 --- a/sysprep/sysprep_operation_random_seed.ml +++ b/sysprep/sysprep_operation_random_seed.ml @@ -27,6 +27,7 @@ let random_seed_perform g

Re: [Libguestfs] [PATCH] sysprep: handle SuSE in hostname operation

2012-09-19 Thread Olaf Hering
On Wed, Sep 19, Richard W.M. Jones wrote: > On Wed, Sep 19, 2012 at 07:26:21PM +0200, Olaf Hering wrote: > > On Wed, Sep 19, Richard W.M. Jones wrote: > > > > > I should add here this would require us to detect "sles". I'm > > > not sure what SLE

[Libguestfs] [PATCH] rename local variable to avoid clash with match macro

2012-09-20 Thread Olaf Hering
match will expand to guestfs___match, rename the local variable to avoid clash. Signed-off-by: Olaf Hering diff --git a/src/inspect-fs-unix.c b/src/inspect-fs-unix.c index 06ff96d..c30ad5a 100644 --- a/src/inspect-fs-unix.c +++ b/src/inspect-fs-unix.c @@ -1128,14 +1128,14 @@ map_md_devices

[Libguestfs] [PATCH] Update SuSE Linux detection.

2012-09-21 Thread Olaf Hering
USE Linux Enterprise Server 10 (x86_64) VERSION = 10 PATCHLEVEL = 4 ==> Dist/sles11/etc/SuSE-release <== SUSE Linux Enterprise Server 11 (x86_64) VERSION = 11 PATCHLEVEL = 0 ==> Dist/sles11sp1/etc/SuSE-release <== SUSE Linux Enterprise Server 11 (x86_64) VERSION = 11 PATCHLEVEL = 1 ==> Dis

[Libguestfs] [PATCH] sysprep: handle suse-based in hostname operation

2012-09-21 Thread Olaf Hering
Signed-off-by: Olaf Hering diff --git a/sysprep/sysprep_operation_hostname.ml b/sysprep/sysprep_operation_hostname.ml index 363069b..cbac46a 100644 --- a/sysprep/sysprep_operation_hostname.ml +++ b/sysprep/sysprep_operation_hostname.ml @@ -45,7 +45,7 @@ let hostname_perform g root = g

[Libguestfs] simplify debugging of guestfsd

2012-09-21 Thread Olaf Hering
Sometimes guestfsd fails to gather info, and the virt- -v output is usually not useful to figure out whats going on within the temporary guest. I see the /init script has support to run guestfsd with a debug tool, which is currently valgrind. Granted, valgrind support is a compile time thing. What

Re: [Libguestfs] [PATCH] sysprep: handle SuSE in hostname operation

2012-09-21 Thread Olaf Hering
On Wed, Sep 19, Richard W.M. Jones wrote: > For "sle" (ugly - better to just call it "sles"?), note there's a > subfield (guestfs_inspect_get_product_variant) that could be used to > differentiate between server/desktop/realtime variants. > It's a nice to have if you want to implement it, but not

[Libguestfs] distro support in sysprep/firstboot.ml

2012-09-21 Thread Olaf Hering
While hacking in sysprep/firstboot.ml, I wonder wether the current code will work in anything but redhat-based distros. Is /etc/rc.d/rc3.d/99something a script that would be executed in a Debian based system for example? Olaf ___ Libguestfs mailing list

Re: [Libguestfs] simplify debugging of guestfsd

2012-09-21 Thread Olaf Hering
On Fri, Sep 21, Richard W.M. Jones wrote: > The problem with collecting core dumps is how you get them out of the > appliance, given that it is short-lived and disappears on exit. We > looked at various methods including writing them to a block device or > squirting it down a virtio-serial connec

Re: [Libguestfs] simplify debugging of guestfsd

2012-09-21 Thread Olaf Hering
On Fri, Sep 21, Richard W.M. Jones wrote: > On Fri, Sep 21, 2012 at 03:40:35PM +0200, Olaf Hering wrote: > > gdb is certainly more advanced, something like 'var="gdb --readnow -ex r > > -ex bt -ex quit' ; $var guestfsd' would be good enough, or gdb > >

Re: [Libguestfs] distro support in sysprep/firstboot.ml

2012-09-21 Thread Olaf Hering
On Fri, Sep 21, Richard W.M. Jones wrote: > On Fri, Sep 21, 2012 at 03:24:48PM +0200, Olaf Hering wrote: > > While hacking in sysprep/firstboot.ml, I wonder wether the current code > > will work in anything but redhat-based distros. Is > > /etc/rc.d/rc3.d/99something a

[Libguestfs] [PATCH] sysprep: handle distro specific sysv scripts

2012-09-21 Thread Olaf Hering
called with "start" Update functions, pass only required options. Signed-off-by: Olaf Hering diff --git a/sysprep/firstboot.ml b/sysprep/firstboot.ml index 97cd8a9..719ab38 100644 --- a/sysprep/firstboot.ml +++ b/sysprep/firstboot.ml @@ -28,14 +28,35 @@ let firstboot_dir = "/usr/l

Re: [Libguestfs] [PATCH] sysprep: handle distro specific sysv scripts

2012-09-21 Thread Olaf Hering
On Fri, Sep 21, Olaf Hering wrote: > +and install_sysvinit_debian g = > + g#mkdir_p "/etc/init.d"; > + g#mkdir_p "/etc/rc.d/rc2.d"; > + g#mkdir_p "/etc/rc.d/rc3.d"; > + g#mkdir_p "/etc/rc.d/rc5.d"; This is a typo, rc.d has to be remov

[Libguestfs] [PATCH] sysprep: handle distro specific sysv scripts

2012-09-21 Thread Olaf Hering
called with "start" Update functions, pass only required options. Signed-off-by: Olaf Hering diff --git a/sysprep/firstboot.ml b/sysprep/firstboot.ml index 97cd8a9..c5296a1 100644 --- a/sysprep/firstboot.ml +++ b/sysprep/firstboot.ml @@ -28,14 +28,35 @@ let firstboot_dir = "/usr/l

[Libguestfs] [PATCH] sysprep: handle at jobs in cron-spool operation

2012-09-21 Thread Olaf Hering
cron-spool claims to remove at jobs, but it has no code to actually do that. Add patterns to remove files in known at spool locations. Signed-off-by: Olaf Hering --- This patch is only compile tested! sysprep/sysprep_operation_cron_spool.ml | 6 ++ 1 file changed, 6 insertions(+) diff

[Libguestfs] no man page for guestfsd

2012-09-28 Thread Olaf Hering
rpmlint complains that guestfsd has no man page. I think its a good idea to provide one also for guestfsd. Olaf ___ Libguestfs mailing list Libguestfs@redhat.com https://www.redhat.com/mailman/listinfo/libguestfs

Re: [Libguestfs] [PATCH 2/2] launch: Add add_drive 'label' option.

2012-10-05 Thread Olaf Hering
On Fri, Oct 05, Richard W.M. Jones wrote: > +=item C + +Give the disk a label. The label should be a unique, short +string using I ASCII characters C<[a-zA-Z]>. No support for digits etc.? Olaf ___ Libguestfs mailing list Libguestfs@redhat

Re: [Libguestfs] [PATCH 2/2] launch: Add add_drive 'label' option.

2012-10-05 Thread Olaf Hering
On Fri, Oct 05, Richard W.M. Jones wrote: > On Fri, Oct 05, 2012 at 12:32:58PM +0200, Olaf Hering wrote: > > No support for digits etc.? > The underlying serial field supports digits and more (in fact it's > really an arbitrary 20 byte buffer). However I excluded digits in

[Libguestfs] [PATCH][RFC] launch: appliance is optional

2012-10-08 Thread Olaf Hering
mfs.x86_64.img -rw-r--r-- 1 root root 3.7M Oct 6 09:25 /usr/lib64/guestfs/vmlinuz.x86_64 Signed-off-by: Olaf Hering --- perhaps the if (!appliance) check should be somewhere else? src/launch-libvirt.c | 4 1 file changed, 4 insertions(+) diff --git a/src/launch-libvirt.c b/src/launch-lib

Re: [Libguestfs] [PATCH][RFC] launch: appliance is optional

2012-10-08 Thread Olaf Hering
On Mon, Oct 08, Richard W.M. Jones wrote: > But out of interest, how are you creating this appliance? I thought > we'd ripped out support for old-style appliances from the rest of the > toolchain ... I use mkinitrd to pull in all tools and run guestfsd instead of /sysroot/sbin/init. This allows

Re: [Libguestfs] [PATCH][RFC] launch: appliance is optional

2012-10-08 Thread Olaf Hering
On Mon, Oct 08, Richard W.M. Jones wrote: > BTW, febootstrap (which is what we use) runs unprivileged and should > be able to process SuSE rpms. However it does require yum, not > zypper, but that's probably easy to fix if zypper has a way to take a > list of package names and resolve all the dep

[Libguestfs] [PATCH] launch: show hint to resolve authentication failure from libvirt

2012-10-10 Thread Olaf Hering
Signed-off-by: Olaf Hering --- Switching from attach-method "appliance" to "libvirt" has surprising side effects, so show a hint how to resolve the "authentication failed" error from libvirt. Patch is not compile tested. src/libvirtdomain.c | 2 ++ 1 file changed,

Re: [Libguestfs] [PATCH] launch: show hint to resolve authentication failure from libvirt

2012-10-10 Thread Olaf Hering
On Wed, Oct 10, Daniel P. Berrange wrote: > On Wed, Oct 10, 2012 at 05:06:37PM +0200, Olaf Hering wrote: > > +if (err->code == VIR_ERR_AUTH_FAILED) > > + error (g, _("Possible fix: 'polkit-auth --user --grant > > org.libvirt.unix.manage'&quo

Re: [Libguestfs] [PATCH] launch: show hint to resolve authentication failure from libvirt

2012-10-11 Thread Olaf Hering
On Wed, Oct 10, Daniel P. Berrange wrote: > It depends on what instance of libvirtd you are connecting to. > > - The system instance, runs as root and requirs non-root users >to auth with policykit > > - The session instance, runs as the same user id as the client >app and does not req

Re: [Libguestfs] [PATCH] launch: show hint to resolve authentication failure from libvirt

2012-10-11 Thread Olaf Hering
On Thu, Oct 11, Daniel P. Berrange wrote: > Hmm, on Fedora non-root is able to use KVM just fine. If you have a > new enough libvirt, you should have a 'virt-host-validate' command. > Can you run that as both root and non-root and provide the output > for each case. The issue is that a user is no

Re: [Libguestfs] [PATCH] launch: show hint to resolve authentication failure from libvirt

2012-10-11 Thread Olaf Hering
On Thu, Oct 11, Daniel P. Berrange wrote: > On Thu, Oct 11, 2012 at 01:10:16PM +0200, Olaf Hering wrote: > > However, adding 'olaf' into group 'kvm' does not help to run > > libguestfs-test-tool, its still a 'qemu' guest. > Did you login + logout

Re: [Libguestfs] [PATCH] launch: show hint to resolve authentication failure from libvirt

2012-10-11 Thread Olaf Hering
On Thu, Oct 11, Olaf Hering wrote: > On Thu, Oct 11, Daniel P. Berrange wrote: > > > On Thu, Oct 11, 2012 at 01:10:16PM +0200, Olaf Hering wrote: > > > However, adding 'olaf' into group 'kvm' does not help to run > > > libguestfs-test-tool, it

Re: [Libguestfs] [PATCH] launch: show hint to resolve authentication failure from libvirt

2012-10-11 Thread Olaf Hering
On Thu, Oct 11, Daniel P. Berrange wrote: > Ah interesting. So this machine only has the qemu-kvm binary installed, > none of the other non-KVM binaries. > > What is the version of libvirt that you have ? Until fairly recently > libvirt would not detect the fact that /usr/bin/qemu-kvm was able to

[Libguestfs] cdrom device handling

2012-10-12 Thread Olaf Hering
Is there a way for the tools to provide a configured cdrom as cdrom to the temporary guest? Right now both disk and cdrom retrived from libvirt will showup as disks in the temporary guest. This happens for bus ide and scsi. It seems on my test system the guest can not start from a scsi disk, but

  1   2   >