Re: [Libguestfs] Errors Running on Ubuntu 13.10

2014-01-28 Thread Tim Fall
I think I may have gotten slightly further. Log attached. Here were the pertinent env variables: LIBGUESTFS_TRACE=1 LIBGUESTFS_QEMU=/home/ubuntu/qemu/qemu.wrapper SUPERMIN_KERNEL=/boot/vmlinuz-3.4.0-030400-generic -Tim On Jan 27, 2014, at 2:23 AM, Richard W.M. Jones wrote: > > This fails in

Re: [Libguestfs] Errors Running on Ubuntu 13.10

2014-01-28 Thread Tim Fall
Richard, I’ve tried with a few kernels now (3.11.0-12, 3.4) and get the same results. Could this because I’m using a relatively new kernel on Ubuntu to work with a CentOS image (that wouldn’t make sense to me, but I thought I’d ask). -Tim On Jan 27, 2014, at 2:23 AM, Richard W.M. Jones

Re: [Libguestfs] [PATCH 05/10] examples: Update various examples to use new disk-create API.

2014-01-28 Thread Richard W.M. Jones
On Tue, Jan 28, 2014 at 05:53:51PM +0100, Pino Toscano wrote: > On Tuesday 28 January 2014 16:24:52 Richard W.M. Jones wrote: > > --- a/ocaml/examples/create_disk.ml > > +++ b/ocaml/examples/create_disk.ml > > @@ -9,9 +9,7 @@ let () = > >let g = new Guestfs.guestfs () in > > > >(* Create a

[Libguestfs] [PATCH 02/10] New API: disk-create for creating blank disks.

2014-01-28 Thread Richard W.M. Jones
This is a wrapper around either 'qemu-img create' or calls to open, truncate and posix_fallocate which litter and complicate existing code. --- Makefile.am | 1 + configure.ac | 1 + generator/actions.ml | 52 ++- gobject/Makefile.inc

[Libguestfs] [PATCH 10/10] virt-make-fs: Use disk-create API instead of calling qemu-img create.

2014-01-28 Thread Richard W.M. Jones
Strictly speaking this reduces the number of formats that virt-make-fs can output to, but it's likely that no one cares and if they do we can add new formats in future. --- tools/virt-make-fs | 44 ++-- 1 file changed, 6 insertions(+), 38 deletions(-) diff

[Libguestfs] [PATCH 04/10] fish: Use disk-create API to implement guestfish 'alloc' and 'sparse' commands.

2014-01-28 Thread Richard W.M. Jones
--- fish/Makefile.am | 1 + fish/alloc.c | 60 -- fish/test-alloc.sh | 47 ++ 3 files changed, 52 insertions(+), 56 deletions(-) create mode 100755 fish/test-alloc.sh diff --git a/fish/Makefile.a

[Libguestfs] [PATCH 09/10] sparsify: Use new disk-create API instead of calling qemu-img.

2014-01-28 Thread Richard W.M. Jones
disk-create doesn't support the lazy_refcounts option. --- sparsify/sparsify.ml | 71 ++-- 1 file changed, 7 insertions(+), 64 deletions(-) diff --git a/sparsify/sparsify.ml b/sparsify/sparsify.ml index 3e544db..212a23f 100644 --- a/sparsify/sparsif

[Libguestfs] [PATCH 08/10] rescue: Note that we're not using add-drive-scratch here, and maybe we should be.

2014-01-28 Thread Richard W.M. Jones
--- rescue/rescue.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rescue/rescue.c b/rescue/rescue.c index 0442711..b46dad6 100644 --- a/rescue/rescue.c +++ b/rescue/rescue.c @@ -533,6 +533,8 @@ add_scratch_disk (struct drv **drvs) struct scratch_disk *sd; struct drv *drv; + /* XXX

[Libguestfs] [PATCH 07/10] tests: Update miscellaneous tests to use disk-create API.

2014-01-28 Thread Richard W.M. Jones
Instead of calling out to qemu-img / truncate. --- diff/test-virt-diff.sh| 4 +++- edit/test-virt-edit.sh| 4 +++- fish/test-a.sh| 2 +- fish/test-add-domain.sh | 2 +- fish/test-d.sh

Re: [Libguestfs] [PATCH 05/10] examples: Update various examples to use new disk-create API.

2014-01-28 Thread Pino Toscano
On Tuesday 28 January 2014 16:24:52 Richard W.M. Jones wrote: > --- a/ocaml/examples/create_disk.ml > +++ b/ocaml/examples/create_disk.ml > @@ -9,9 +9,7 @@ let () = >let g = new Guestfs.guestfs () in > >(* Create a raw-format sparse disk image, 512 MB in size. *) > - let fd = openfile out

[Libguestfs] [PATCH 06/10] builder: Use disk-create API instead of calling qemu-img create.

2014-01-28 Thread Richard W.M. Jones
--- builder/builder.ml | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/builder/builder.ml b/builder/builder.ml index 3c45fa5..b01f4eb 100644 --- a/builder/builder.ml +++ b/builder/builder.ml @@ -513,14 +513,8 @@ let main () = let { Index_parser.expand = expand

Re: [Libguestfs] [PATCH 1/2] daemon: If /selinux exists in the guest, bind-mount /sys/fs/selinux to there.

2014-01-28 Thread Pino Toscano
On Tuesday 28 January 2014 16:21:09 Richard W.M. Jones wrote: > Commit 72afcf450a78b7e58f65b4a7aaf94d71cd25fca5 was partially > incorrect. If the guest userspace is expecting /selinux to exist, > then we should bind-mount /sys/fs/selinux from the appliance kernel > there. > --- > daemon/command.c

Re: [Libguestfs] [PATCH] run: Actually use timeout --foreground option (RHBZ#1025269).

2014-01-28 Thread Pino Toscano
On Tuesday 28 January 2014 16:21:38 Richard W.M. Jones wrote: > The following commit managed to not actually add the --foreground > option to the timeout command, just test for it. Add it this time. > > commit 681488877456b83f039dc518861f29ab4e1857f0 > Author: Richard W.M. Jones > Date:

Re: [Libguestfs] [PATCH 1/2] daemon: If /selinux exists in the guest, bind-mount /sys/fs/selinux to there.

2014-01-28 Thread Richard W.M. Jones
On Tue, Jan 28, 2014 at 05:29:16PM +0100, Pino Toscano wrote: > Possibly I'm missing something, but... given that later /sys/fs/selinux > of the appliance is bind-mounted as /sys/fs/selinux into the sysroot, > couldn't /selinux be created just as a /syslinux -> sys/fs/selinux > symlink, to have a b

[Libguestfs] [PATCH 01/10] src/Makefile.am: Reorder SOURCES into alphabetical order.

2014-01-28 Thread Richard W.M. Jones
--- src/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile.am b/src/Makefile.am index f5c8d2d..ba02061 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -87,8 +87,8 @@ libguestfs_la_SOURCES = \ alloc.c \ appliance.c \ bindtests.

[Libguestfs] [PATCH 05/10] examples: Update various examples to use new disk-create API.

2014-01-28 Thread Richard W.M. Jones
--- examples/create-disk.c | 20 +--- examples/mount-local.c | 22 +- golang/examples/create-disk.go | 12 ++-- ocaml/examples/create_disk.ml | 4 +--- perl/examples/create_disk.pl | 4 +--- python/examples/create_disk.py | 5 +

[Libguestfs] [PATCH 1/2] daemon: If /selinux exists in the guest, bind-mount /sys/fs/selinux to there.

2014-01-28 Thread Richard W.M. Jones
Commit 72afcf450a78b7e58f65b4a7aaf94d71cd25fca5 was partially incorrect. If the guest userspace is expecting /selinux to exist, then we should bind-mount /sys/fs/selinux from the appliance kernel there. --- daemon/command.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-)

[Libguestfs] [PATCH 03/10] lib: Use disk-create API instead of qemu-img/truncate inside the library.

2014-01-28 Thread Richard W.M. Jones
--- src/drives.c | 35 --- src/launch-direct.c | 37 - src/launch-libvirt.c | 38 +++--- 3 files changed, 27 insertions(+), 83 deletions(-) diff --git a/src/drives.c b/src/drives.c index d

[Libguestfs] [PATCH 00/10] New API: disk-create for creating blank disks.

2014-01-28 Thread Richard W.M. Jones
A lot of code runs 'qemu-img create' or 'truncate' to create blank disk images. In the past I resisted adding an API to do this, since it essentially duplicates what you can already do using other tools (ie. qemu-img). However this does simplify calling code quite a lot since qemu-img is somewhat

[Libguestfs] [PATCH] run: Actually use timeout --foreground option (RHBZ#1025269).

2014-01-28 Thread Richard W.M. Jones
The following commit managed to not actually add the --foreground option to the timeout command, just test for it. Add it this time. commit 681488877456b83f039dc518861f29ab4e1857f0 Author: Richard W.M. Jones Date: Thu Dec 19 08:21:53 2013 + run: Use timeout --foreground option.

[Libguestfs] [PATCH 2/2] daemon: Add a note about how 'mount --rbind' doesn't work.

2014-01-28 Thread Richard W.M. Jones
--- daemon/command.c | 4 1 file changed, 4 insertions(+) diff --git a/daemon/command.c b/daemon/command.c index 939bf87..1593de9 100644 --- a/daemon/command.c +++ b/daemon/command.c @@ -94,6 +94,10 @@ bind_mount (struct bind_state *bs) return -1; } + /* Note it is tempting to use

Re: [Libguestfs] [PATCH] builder, sysprep: initialise the random generator

2014-01-28 Thread Richard W.M. Jones
On Tue, Jan 28, 2014 at 03:10:29PM +0100, Pino Toscano wrote: > virt-builder and virt-sysprep may make use of > Common_utils.string_random8 (which uses Random.int) for constructing > temporary paths; not initialising the random generator means that every > invocation will reuse the same name used p

Re: [Libguestfs] Returning list of backends through the API

2014-01-28 Thread Pino Toscano
On Tuesday 28 January 2014 09:02:19 Richard W.M. Jones wrote: > Pino, you asked on IRC about an API to return a list of backends > through the API. Yes -- basically it came out of my mind when, after the (then reverted) bump of the libvirt requirements, the libvirt backend was not working for me

[Libguestfs] [PATCH] builder, sysprep: initialise the random generator

2014-01-28 Thread Pino Toscano
virt-builder and virt-sysprep may make use of Common_utils.string_random8 (which uses Random.int) for constructing temporary paths; not initialising the random generator means that every invocation will reuse the same name used previously (!). Thus just call Random.self_init, just like virt-sparsif

Re: [Libguestfs] Returning list of backends through the API

2014-01-28 Thread Richard W.M. Jones
Pino, you asked on IRC about an API to return a list of backends through the API. If this is for testing, you could add a debug-* API to do it. These are not part of the specified API and so we can change or remove them at any time. A canonical example of this is "debug-drives" which is used in