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) guestfsd: main_loop: proc 1 (mount) took 0.45 seconds libguestfs: recv_from_daemon: 40 bytes: 20 00 f5 f5 | 00 00 00 04 | 00 00 00 01 | 00 00 00 01 | 00 12 34 08 | ... Fill free space in /dev/vda1 with zero ... libguestfs: send_to_daemon: 52 bytes: 00 00 00 30 | 20 00 f5 f5 | 00 00 00 04 | 00 00 01 37 | 00 00 00 00 | ... guestfsd: main_loop: new request, len 0x30 random filename: /sysroot//ubhvwzh2.xu8 fsync /dev/vda guestfsd: main_loop: proc 311 (zero_free_space) took 1.46 seconds libguestfs: recv_from_daemon: 40 bytes: 20 00 f5 f5 | 00 00 00 04 | 00 00 01 37 | 00 00 00 01 | 00 12 34 09 | ... libguestfs: send_to_daemon: 44 bytes: 00 00 00 28 | 20 00 f5 f5 | 00 00 00 04 | 00 00 00 2f | 00 00 00 00 | ... guestfsd: main_loop: new request, len 0x28 umount /sysroot guestfsd: main_loop: proc 47 (umount_all) took 0.01 seconds libguestfs: recv_from_daemon: 40 bytes: 20 00 f5 f5 | 00 00 00 04 | 00 00 00 2f | 00 00 00 01 | 00 12 34 0a | ... libguestfs: send_to_daemon: 44 bytes: 00 00 00 28 | 20 00 f5 f5 | 00 00 00 04 | 00 00 00 0a | 00 00 00 00 | ... guestfsd: main_loop: new request, len 0x28 lvm vgs -o vg_name --noheadings No volume groups found guestfsd: main_loop: proc 10 (vgs) took 0.01 seconds libguestfs: recv_from_daemon: 44 bytes: 20 00 f5 f5 | 00 00 00 04 | 00 00 00 0a | 00 00 00 01 | 00 12 34 0b | ... libguestfs: send_to_daemon: 44 bytes: 00 00 00 28 | 20 00 f5 f5 | 00 00 00 04 | 00 00 01 1a | 00 00 00 00 | ... guestfsd: main_loop: new request, len 0x28 fsync /dev/vda guestfsd: main_loop: proc 282 (internal_autosync) took 0.02 seconds libguestfs: recv_from_daemon: 40 bytes: 20 00 f5 f5 | 00 00 00 04 | 00 00 01 1a | 00 00 00 01 | 00 12 34 0c | ... libguestfs: sending SIGTERM to process 26256 libguestfs: closing guestfs handle 0x1e66470 (state 0) Fatal error: exception Guestfs.Handle_closed("disk_format") ... #!/bin/bash set -x img=disk.img sprs=disk.sparse.img kname=vda test -f ${img} && exit 1 test -f ${sprs} && exit 1 find /usr/share/ -type f -print0 | xargs -0 cat | dd bs=$(( 1024 * 1024 )) count=$(( 42 )) iflag=fullblock of=${img} ls -lhsS ${img} time guestfish -v <<_EOF_ add ${img} run part-disk /dev/${kname} mbr blockdev-rereadpt /dev/${kname} mkfs ext2 /dev/${kname}1 blockdev-rereadpt /dev/${kname} mount /dev/${kname}1 / mkdir /y ls / ls /y umount / sync _EOF_ time virt-sparsify -v ${img} ${sprs} ls -lhsS ${img} ${sprs}
On Tue, Sep 04, 2012 at 08:59:35PM +0200, Olaf Hering wrote:
On Tue, Sep 04, Olaf Hering wrote:
time virt-sparsify -v ${img} ${sprs}
It works with '--format raw' in this example.
I'm a bit surprised you say it was broken in 1.19.39. It should be fixed. As far as I know, this is the situation: 1.19.37 - works 1.19.38 - fails if the input path is relative AND the format is not specified, because of a bug in commit 20902e7ce0 1.19.39 - works, fixed by commit 1030e8aba0 But maybe there is something else going on? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones New in Fedora 11: Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 70 libraries supprt'd http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw
On Tue, Sep 04, 2012 at 10:11:47PM +0100, Richard W.M. Jones wrote:
On Tue, Sep 04, 2012 at 08:59:35PM +0200, Olaf Hering wrote:
On Tue, Sep 04, Olaf Hering wrote:
time virt-sparsify -v ${img} ${sprs}
It works with '--format raw' in this example.
I'm a bit surprised you say it was broken in 1.19.39. It should be fixed.
As far as I know, this is the situation:
1.19.37 - works 1.19.38 - fails if the input path is relative AND the format is not specified, because of a bug in commit 20902e7ce0 1.19.39 - works, fixed by commit 1030e8aba0
But maybe there is something else going on?
Ah, I tried the program and now I see the problem. I'll take a look. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/
Yes, stupid error: using the libguestfs handle after it was closed. I'll push a fix upstream very shortly. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top
participants (2)
-
Olaf Hering -
Richard W.M. Jones