Re: [Libguestfs] New tool proposal

2012-06-01 Thread Richard W.M. Jones
On Fri, Jun 01, 2012 at 05:11:37PM +0800, Wanlong Gao wrote: On 05/28/2012 03:48 PM, Richard W.M. Jones wrote: On Sun, May 27, 2012 at 02:52:59PM +0800, Wanlong Gao wrote: I looked into this, now Rich, I have a more question, if we doing like virt-diff --seed Guest0 -d Guest1 -d Guest2

Re: [Libguestfs] Ocaml and pthread_atfork()

2012-06-02 Thread Richard W.M. Jones
I just hit this bug too. Seems to be a problem (or weirdness) in glibc. See: http://ryanarn.blogspot.co.uk/2011/07/curious-case-of-pthreadatfork-on.html https://lists.fedoraproject.org/pipermail/ppc/2012-June/001655.html Rich. -- Richard Jones, Virtualization Group, Red Hat

Re: [Libguestfs] guestfish1.7.17 does not support qemu-kvm1.0.93?

2012-06-05 Thread Richard W.M. Jones
libguestfs 1.7.17 was what we supplied in RHEL 6.1 / 6.2 and CentOS derivatives, but it's rather old and cannot cope with anything except the qemu which is also supplied in RHEL. I'd suggest first of all trying the RHEL 6.3 packages here:

Re: [Libguestfs] [PATCH 4/4] Fix out-of-tree build (install target) for translations

2012-06-06 Thread Richard W.M. Jones
On Thu, May 24, 2012 at 01:21:06AM +0200, Hilko Bengen wrote: --- po/Makefile.am |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/po/Makefile.am b/po/Makefile.am index 90b23c1..c620d57 100644 --- a/po/Makefile.am +++ b/po/Makefile.am @@ -96,7 +96,7 @@

Re: [Libguestfs] [virt-tools-list] virt-make-fs: Partition 1 has different physical/logical beginnings and endings

2012-06-07 Thread Richard W.M. Jones
On Thu, Jun 07, 2012 at 02:49:14PM +0200, Sebastien Douche wrote: On Ubuntu 12.04, I'm trying to create a second disk for a VM. The disk seems work well (and mounted) but I don't like the cfdisk / fdisk message. # virt-make-fs --partition --size=+300M --type=ext3 --format=qcow2

Re: [Libguestfs] Error mounting ubuntu cirros image?

2012-06-08 Thread Richard W.M. Jones
On Fri, Jun 08, 2012 at 11:11:28AM +0100, Pádraig Brady wrote: # wget https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img # mkdir mnt # guestmount --rw -a cirros-0.3.0-x86_64-disk.img -i mnt libguestfs: error: mount_options: mount_options_stub: /dev/root: No such

Re: [Libguestfs] guestmount -i and xattrs

2012-06-08 Thread Richard W.M. Jones
On Fri, Jun 08, 2012 at 11:17:09AM +0100, Pádraig Brady wrote: I tried to run chcon to set SELinux labels on a guestmounted dir and got: chcon: failed to change context of `authorized_keys' to `system_u:object_r:ssh_home_t:s0': Operation not supported I'm guessing that you need to pass

Re: [Libguestfs] guestmount -i and xattrs

2012-06-08 Thread Richard W.M. Jones
On Fri, Jun 08, 2012 at 11:26:54AM +0100, Richard W.M. Jones wrote: On Fri, Jun 08, 2012 at 11:17:09AM +0100, Pádraig Brady wrote: I tried to run chcon to set SELinux labels on a guestmounted dir and got: chcon: failed to change context of `authorized_keys

Re: [Libguestfs] [hivex] OS X: Augment pkg-config search path

2012-06-11 Thread Richard W.M. Jones
On Fri, Jun 08, 2012 at 03:20:28PM -0700, Alex Nelson wrote: Hello all, I found OS X still has one remaining issue in the autotools. OS X does not include pkg-config by default, and whatever mechanism installs it places pkg.m4 in some location among: /opt/local/share/aclocal/pkg.m4

Re: [Libguestfs] [hivex][PATCH] OS X, bootstrap: Locate pkg.m4

2012-06-11 Thread Richard W.M. Jones
On Mon, Jun 11, 2012 at 11:53:43AM -0700, Alex Nelson wrote: On Jun 11, 2012, at 11:22 , Richard W.M. Jones wrote: On Mon, Jun 11, 2012 at 10:55:46AM -0700, Alex Nelson wrote: OS X does not include pkg-config by default. When installed, pkg.m4 tends to end up in some place

Re: [Libguestfs] [hivex][PATCH v2] OS X, bootstrap: Locate pkg.m4

2012-06-12 Thread Richard W.M. Jones
On Mon, Jun 11, 2012 at 11:54:14AM -0700, Alex Nelson wrote: OS X does not include pkg-config by default. This causes ./configure to fail when invoking PKG_CHECK_MODULES for libxml2. This change autodetects the path for aclocal, c/o RWMJ noting the real problem is a deficiency in aclocal on

[Libguestfs] [PATCH] Add virtio-scsi support to febootstrap.

2012-06-12 Thread Richard W.M. Jones
This patch is the minimum possible to add virtio-scsi support to febootstrap. Problem: SCSI devices are detected asynchronously after the Linux kernel module is loaded. The usual solutions to this involve scsi_wait_scan (deprecated apparently) or udev. However febootstrap doesn't use udev, and

[Libguestfs] [PATCH] init: Add 'root=...' parameter to specify the appliance.

2012-06-12 Thread Richard W.M. Jones
From: Richard W.M. Jones rjo...@redhat.com This is required when using virtio-scsi with libguestfs. --- helper/init.c | 78 - 1 file changed, 66 insertions(+), 12 deletions(-) diff --git a/helper/init.c b/helper/init.c index a1887a0

[Libguestfs] [PATCH 0/5] Assorted patches to add virtio-scsi support.

2012-06-12 Thread Richard W.M. Jones
These assorted patches end up with adding virtio-scsi support to libguestfs. It passes libguestfs-test-tool, but I haven't yet tried to run the full set of tests. In theory 26 devices can be added, but it's likely that certain parts of the daemon will break if you actually try this. This of

[Libguestfs] [PATCH 1/5] New API: fstrim - allow filesystem trim.

2012-06-12 Thread Richard W.M. Jones
From: Richard W.M. Jones rjo...@redhat.com --- daemon/Makefile.am |1 + daemon/fstrim.c| 97 generator/generator_actions.ml | 27 ++- gobject/Makefile.inc |6 ++- po/POTFILES

[Libguestfs] [PATCH 3/5] Require QEMU = 1.0.

2012-06-12 Thread Richard W.M. Jones
From: Richard W.M. Jones rjo...@redhat.com QEMU 1.0 was released at the end of 2011. Remove all the cruft about detecting broken -machine type which was only required for QEMU 0.15. This also reverts commit 30ecbf3ec2ada68f7e125a180553e31b069033b7. Even on ARM you can pass -machine accel

[Libguestfs] [PATCH v2 4/9] Record output of qemu -device '?'.

2012-06-12 Thread Richard W.M. Jones
From: Richard W.M. Jones rjo...@redhat.com This allows us to find out what qemu devices are supported at runtime. --- configure.ac |8 src/guestfs-internal.h |1 + src/guestfs.c |1 + src/launch.c |9 + 4 files changed, 19 insertions

[Libguestfs] [PATCH v2 1/9] New API: fstrim - allow filesystem trim.

2012-06-12 Thread Richard W.M. Jones
From: Richard W.M. Jones rjo...@redhat.com --- daemon/Makefile.am |1 + daemon/fstrim.c| 97 generator/generator_actions.ml | 27 ++- gobject/Makefile.inc |6 ++- po/POTFILES

[Libguestfs] [PATCH v2 9/9] tests/md: Don't hard code /dev/vda in expected output of tests.

2012-06-12 Thread Richard W.M. Jones
From: Richard W.M. Jones rjo...@redhat.com Use a small sed script to canonicalize the device names. --- tests/md/test-inspect-fstab.sh| 15 --- tests/md/test-list-filesystems.sh | 12 ++-- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/tests/md/test

[Libguestfs] [PATCH v2 5/9] appliance: Add support for virtio-scsi.

2012-06-12 Thread Richard W.M. Jones
From: Richard W.M. Jones rjo...@redhat.com This requires febootstrap = 3.15. --- README |3 +- src/guestfs-internal.h |3 ++ src/launch.c | 140 +++- 3 files changed, 121 insertions(+), 25 deletions(-) diff --git

[Libguestfs] FYI: CVE-2012-2690: virt-edit / guestfish edit didn't preserve permissions on edited files.

2012-06-14 Thread Richard W.M. Jones
Old versions of both virt-edit and the guestfish edit command created a new file containing the changes but did not set the permissions, etc of the new file to match the old one. The result of this was that if you edited a security sensitive file such as /etc/shadow then it would be left

Re: [Libguestfs] guestfish1.7.17 does not support qemu-kvm1.0.93?

2012-06-18 Thread Richard W.M. Jones
On Mon, Jun 18, 2012 at 08:30:17PM +0800, Xing.x.Gao wrote: qemu-kvm-1.1-rc4 does not support guestfish 1.16.19 too You need to run 'libguestfs-test-tool', otherwise no one can tell what's going on. Also specify where you got both of these programs from. Are they ones that Red Hat

Re: [Libguestfs] guestfish1.7.17 does not support qemu-kvm1.0.93?

2012-06-19 Thread Richard W.M. Jones
On Tue, Jun 19, 2012 at 09:21:59AM +0800, Xing.x.Gao wrote: This is definitely the qemu that you compiled yourself from upstream? yes,from upstream,i made a `ln -s qemu-system /usr/libexec/qemu-kvm` ,running a guest is ok. [root@server ~]# ll /usr/libexec/qemu-kvm lrwxrwxrwx 1 root root

Re: [Libguestfs] guestfish1.7.17 does not support qemu-kvm1.0.93?

2012-06-19 Thread Richard W.M. Jones
On Tue, Jun 19, 2012 at 03:45:06PM +0800, Xing.x.Gao wrote: In fact qemu-system-x86_64. I don't know -- I suggest using libguestfs from upstream. Rich. still thank you for your hard work on libguestfs. thanks.i'll test libguestfs from upstream ... :-) Not according to the

[Libguestfs] Notice: libguestfs 1.16 are now out of support

2012-06-21 Thread Richard W.M. Jones
As announced two months ago[1], and since RHEL 6.3 is about to be released, I have deprecated the older branches of libguestfs (1.8, 1.10, 1.12, 1.14). These old branches are archived and will no longer receive any bug fixes or security fixes. libguestfs 1.16 and 1.18 are now the only supported

Re: [Libguestfs] libguestfs and RHEV

2012-06-22 Thread Richard W.M. Jones
On Fri, Jun 22, 2012 at 12:57:40PM +, Davis, Richard wrote: I see that the libguestfs packages are included in the RHEV Hypervisor product. Are there any plans to further integrate the libguestfs toolset into the RHEV product ? In particular, the ability to mount and change raw volume

Re: [Libguestfs] virt-resize

2012-06-25 Thread Richard W.M. Jones
On Mon, Jun 25, 2012 at 06:28:42AM -0500, Dan The Man wrote: Tried resizing a standard UFS partition on a freebsd guest, booting from it resulted in missing boot loader. We can't currently resize BSD guests; patches welcome ... Rich. -- Richard Jones, Virtualization Group, Red Hat

Re: [Libguestfs] virt-resize

2012-06-25 Thread Richard W.M. Jones
On Mon, Jun 25, 2012 at 09:04:26AM -0500, Dan The Man wrote: On Mon, 25 Jun 2012, Nikita A Menkovich wrote: For now, UFS in Linux do not support resizing at all. There is only one way to resize: create new image, partition, attach to existing freebsd, install bootloader, sync files.

Re: [Libguestfs] virt-resize

2012-06-25 Thread Richard W.M. Jones
On Mon, Jun 25, 2012 at 12:55:11PM -0500, Dan The Man wrote: On Mon, 25 Jun 2012, Nikita A Menkovich wrote: You can write to UFS. It is rather safe. But you could not make a resize of ufs filesystem on Linux. There is not utilities for this. On 25 June 2012 18:53, Richard W.M. Jones

Re: [Libguestfs] shared library path

2012-06-26 Thread Richard W.M. Jones
On Tue, Jun 26, 2012 at 02:45:36PM +0800, Wanlong Gao wrote: Hi Rich, I meet below thing, [root@gaowanlong libguestfs]# virt-sysprep --help virt-sysprep: error while loading shared libraries: libguestfs.so.0: cannot open shared object file: No such file or directory [root@gaowanlong

Re: [Libguestfs] shared library path

2012-06-26 Thread Richard W.M. Jones
On Tue, Jun 26, 2012 at 04:19:03PM +0800, Wanlong Gao wrote: On 06/26/2012 03:48 PM, Richard W.M. Jones wrote: printenv | grep LD_ which virt-sysprep ldd `which virt-sysprep` eu-readelf -d `which virt-sysprep` chrpath `which virt-sysprep` I just did make install

Re: [Libguestfs] shared library path

2012-06-26 Thread Richard W.M. Jones
On Tue, Jun 26, 2012 at 04:50:09PM +0800, Wanlong Gao wrote: Our virt-filesystems can find out libguestfs.so.0, but virt-sysprep not. So, I think there must be some thing wrong here. It's probably a stray rpath. virt-sysprep is written in OCaml and gets its library paths from one of the files

Re: [Libguestfs] shared library path

2012-06-26 Thread Richard W.M. Jones
On Tue, Jun 26, 2012 at 04:50:09PM +0800, Wanlong Gao wrote: [root@gaowanlong libguestfs]# ldd `which virt-filesystems ` == libguestfs.so.0 = /usr/local/lib/libguestfs.so.0 (0x7f06b8839000) [root@gaowanlong libguestfs]# ldd `which virt-sysprep` libguestfs.so.0 = not found

[Libguestfs] [PATCH] helper: Fix -u and -g options when host uses LDAP or NIS (RHBZ#835130).

2012-06-26 Thread Richard W.M. Jones
From: Richard W.M. Jones rjo...@redhat.com The getpwnam/getgrnam interfaces are not very well specified in the case where we are looking up a name that does not exist. Previously the code assumed that if errno was set, that would distinguish an error from the not found case. However

[Libguestfs] ANNOUNCE: libguestfs 1.19 (development version) is available in EPEL 5

2012-06-28 Thread Richard W.M. Jones
EPEL (Extra Packages for Enterprise Linux) is an additional repository you can use to add packages to RHEL and derivatives. Modern libguestfs (1.19.xx) is now available in EPEL 5 updates-testing: http://koji.fedoraproject.org/koji/buildinfo?buildID=327975

Re: [Libguestfs] [hivex] OS X, Fedora 17: iconv autotool inconsistency

2012-06-28 Thread Richard W.M. Jones
On Mon, Jun 25, 2012 at 07:42:56PM -0400, Alexander Nelson wrote: Hello all, I've been testing hivexml in OS X, and came across an inconsistency in building. Some while back, I hit a snag with iconv in OS X, where basically this would happen when a hive of any sophistication (greater than

[Libguestfs] [PATCH libguestfs 2/3] ruby: Changing spacing in configure file.

2012-06-29 Thread Richard W.M. Jones
From: Richard W.M. Jones rjo...@redhat.com No functional change. --- configure.ac | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 439784a..d3a8698 100644 --- a/configure.ac +++ b/configure.ac @@ -973,12 +973,12 @@ AM_CONDITIONAL

[Libguestfs] [PATCH libguestfs 0/3] Fix configure script detection of Ruby.

2012-06-29 Thread Richard W.M. Jones
These three patches ought to fix configure script detection of Ruby, especially on Debian where the Ruby C extensions library can be something like '-lruby1.8'. Rich. ___ Libguestfs mailing list Libguestfs@redhat.com

[Libguestfs] [PATCH libguestfs 3/3] ruby: Fix detection of library (thanks Hilko Bengen).

2012-06-29 Thread Richard W.M. Jones
From: Richard W.M. Jones rjo...@redhat.com On Debian, the Ruby C extensions library isn't '-lruby', it's something like '-lruby1.8' or '-lruby-1.9.1' and these can even be parallel-installed. Fix detection so we use Ruby's own rbconfig.rb file to find the right library to use. --- configure.ac

Re: [Libguestfs] [RFC] virt-diff: add new virt-diff tool

2012-07-02 Thread Richard W.M. Jones
On Tue, Jun 19, 2012 at 05:24:26PM +0800, Wanlong Gao wrote: add new virt-diff tool Signed-off-by: Wanlong Gao gaowanl...@cn.fujitsu.com --- Hi Rich, This just a thought of virt-diff tool, I send it out ASAP to ask your opinions. Now, I just implement two guest, one SEED guest and

Re: [Libguestfs] [RFC] virt-diff: add new virt-diff tool

2012-07-02 Thread Richard W.M. Jones
On Mon, Jul 02, 2012 at 07:34:12PM +0800, Wanlong Gao wrote: On 07/02/2012 05:28 PM, Richard W.M. Jones wrote: The outline of the code seems to be: * create two handles * add both disks * inspect both disks * mount-local both disks on separate temporary directories * run

[Libguestfs] [PATCH POSSIBLE DATA CORRUPTOR] daemon: Run fsync on block devices after sync (RHBZ#836710).

2012-07-02 Thread Richard W.M. Jones
programs, test, and build Windows installers. Over 70 libraries supprt'd http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw From c0a3c9ce70b98171e737e49e6dccc4457963f2ec Mon Sep 17 00:00:00 2001 From: Richard W.M. Jones rjo...@redhat.com Date: Mon, 2 Jul 2012 16:38:19 +0100

[Libguestfs] [PATCH 0/7 v2] Fix and workaround for qcow2 issues in qemu causing data corruption.

2012-07-03 Thread Richard W.M. Jones
https://bugzilla.redhat.com/show_bug.cgi?id=836710 https://bugzilla.redhat.com/show_bug.cgi?id=836913 There are at least two related bugs going on: (1) Linux sync(2) system call doesn't send a write barrier to the disk, so in effect it doesn't force the hard disk to flush its cache. libguestfs

[Libguestfs] [PATCH 1/7] daemon: Run fsync on block devices after sync (RHBZ#836710).

2012-07-03 Thread Richard W.M. Jones
From: Richard W.M. Jones rjo...@redhat.com On Linux, sync(2) does not actually issue a write barrier, thus it doesn't force a flush of the underlying hardware write cache (or qemu's disk cache in the virtual case). This can be a problem, because libguestfs relies on running sync in the appliance

[Libguestfs] [PATCH 2/7] examples: In create_disk example, don't call set_autosync.

2012-07-03 Thread Richard W.M. Jones
From: Richard W.M. Jones rjo...@redhat.com This is now set by default in all supported versions of libguestfs. It's just confusing if the examples refer to it. --- erlang/examples/create_disk.erl |8 examples/create_disk.c |9 - java/examples/CreateDisk.java

[Libguestfs] [PATCH 6/7] New API: guestfs_shutdown: Cleanly shutdown the backend.

2012-07-03 Thread Richard W.M. Jones
From: Richard W.M. Jones rjo...@redhat.com The new API splits orderly close into a two-step process: if (guestfs_shutdown (g) == -1) { /* handle the error, eg. qemu error */ } guestfs_close (g); Note that the explicit shutdown step is only necessary in the case where you have made

[Libguestfs] [PATCH 5/7] close: Warn if qemu exits unsuccessfully.

2012-07-03 Thread Richard W.M. Jones
From: Richard W.M. Jones rjo...@redhat.com Currently guestfs_close has no method to return an error indication, so this commit simply prints the error on stderr. --- src/guestfs.c | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/guestfs.c b/src

[Libguestfs] [PATCH 7/7] resize: Add workaround for qcow2 disk cache bug in qemu (RHBZ#836710).

2012-07-03 Thread Richard W.M. Jones
From: Richard W.M. Jones rjo...@redhat.com Best to read the comment. --- resize/Makefile.am |2 +- resize/resize.ml | 33 - 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/resize/Makefile.am b/resize/Makefile.am index 70ace37..1234c96

[Libguestfs] [PATCH 4/7] close: Rearrange the order in which the handle is closed and freed.

2012-07-03 Thread Richard W.M. Jones
From: Richard W.M. Jones rjo...@redhat.com The order is now: - remove the handle from the list of handles - send close trace message - sync and shutdown qemu - run user close callback - free temporary directory - free memory This commit ought to be no functional change. --- src/guestfs.c

Re: [Libguestfs] [PATCH 0/7 v2] Fix and workaround for qcow2 issues in qemu causing data corruption.

2012-07-04 Thread Richard W.M. Jones
On Wed, Jul 04, 2012 at 02:38:50PM +0100, Pádraig Brady wrote: On 07/03/2012 07:03 PM, Richard W.M. Jones wrote: https://bugzilla.redhat.com/show_bug.cgi?id=836710 https://bugzilla.redhat.com/show_bug.cgi?id=836913 There are at least two related bugs going on: (1) Linux sync(2

[Libguestfs] NOTICE: Data corruption bug when writing to qcow2 files

2012-07-04 Thread Richard W.M. Jones
As you might have seen for the past 3 days I've been tackling a nasty data corruption bug[1][2]. The bug occurs when ALL of the following conditions are true: (a) You are using a qcow2 image file. (b) You are writing out data to the image file using libguestfs or a libguestfs-using tool

[Libguestfs] libguestfs 1.18.4 1.16.27 released (was: NOTICE: Data corruption bug)

2012-07-07 Thread Richard W.M. Jones
On Wed, Jul 04, 2012 at 05:28:05PM +0100, Richard W.M. Jones wrote: Versions of libguestfs which contain fixes will be announced separately. It is likely that these versions will *require* qemu = 1.1.0, so effectively our baseline version of qemu has just increased from 1.0 to 1.1.0

Re: [Libguestfs] [PATCH] NEW API: add new api xfs_info

2012-07-09 Thread Richard W.M. Jones
On Mon, Jul 09, 2012 at 05:15:47PM +0800, Wanlong Gao wrote: rescue xfs_info /dev/vda1 meta-data=/dev/vda1 isize=256agcount=4, agsize=655358 blks = sectsz=512 attr=2 data = bsize=4096 blocks=2621432,

[Libguestfs] [PATCH 0/4] Provide guestmount --pid-file and document possible race when unmounting FUSE filesystems.

2012-07-09 Thread Richard W.M. Jones
The full description of this bug is here: https://bugzilla.redhat.com/show_bug.cgi?id=838592 and the effect it has on OpenStack is described here: https://bugzilla.redhat.com/show_bug.cgi?id=835466#c9 Rich. ___ Libguestfs mailing list

[Libguestfs] [PATCH 1/4] fuse: Document race condition possible with fusermount.

2012-07-09 Thread Richard W.M. Jones
From: Richard W.M. Jones rjo...@redhat.com See also: https://bugzilla.redhat.com/show_bug.cgi?id=835466#c9 --- fuse/guestmount.pod | 16 1 file changed, 16 insertions(+) diff --git a/fuse/guestmount.pod b/fuse/guestmount.pod index a0bc6f1..c37301c 100644 --- a/fuse

[Libguestfs] [PATCH 2/4] fuse: Link to mount-local documentation in guestmount man page.

2012-07-09 Thread Richard W.M. Jones
From: Richard W.M. Jones rjo...@redhat.com --- fuse/guestmount.pod |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fuse/guestmount.pod b/fuse/guestmount.pod index c37301c..d459045 100644 --- a/fuse/guestmount.pod +++ b/fuse/guestmount.pod @@ -122,6 +122,10

Re: [Libguestfs] [PATCH] podwrapper.sh: Take date from ChangeLog or from the latest git commit.

2012-07-10 Thread Richard W.M. Jones
On Tue, Jul 10, 2012 at 10:15:57AM +0200, Hilko Bengen wrote: --- podwrapper.sh.in |8 1 file changed, 8 insertions(+) diff --git a/podwrapper.sh.in b/podwrapper.sh.in index ec750f1..9198f63 100755 --- a/podwrapper.sh.in +++ b/podwrapper.sh.in @@ -53,6 +53,13 @@ if [ -z

[Libguestfs] Generator functions format changed slightly

2012-07-11 Thread Richard W.M. Jones
https://github.com/libguestfs/libguestfs/commit/39d1a7dbc9c7d4ae8cbb492a39149d1f8e75ff70 [for some reason, github hides most of that commit] This commit changes the format of the generator functions slightly. The commit message contains an example, and it should be straightforward to convert

Re: [Libguestfs] [PATCH V2] NEW API: add new api xfs_info

2012-07-12 Thread Richard W.M. Jones
On Thu, Jul 12, 2012 at 11:15:57AM +0800, Wanlong Gao wrote: Add xfs_info to show the geometry of the xfs filesystem. Signed-off-by: Wanlong Gao gaowanl...@cn.fujitsu.com --- Hi Rich, This is the v2 version, please help reviewing. Formated the output, but seems that there's also

[Libguestfs] [PATCH 1/6] generator: Rearrange some C generator code into sub-functions.

2012-07-14 Thread Richard W.M. Jones
From: Richard W.M. Jones rjo...@redhat.com This is just code motion. I verified this by comparing the generator output before and after this commit. --- generator/generator_c.ml | 1156 +++--- 1 file changed, 585 insertions(+), 571 deletions(-) diff

[Libguestfs] [PATCH 3/6] generator: In non-C bindings, generate '*_opts' alias.

2012-07-14 Thread Richard W.M. Jones
From: Richard W.M. Jones rjo...@redhat.com In C, a function called 'func' which has once_had_no_optargs=true will (because of the previous commit) generate 'func_opts' and a backwards-compatibility function called 'func'. This commit changes some of the non-C bindings so that they also generate

Re: [Libguestfs] [PATCH] isoinfo: remove the useless goto

2012-07-16 Thread Richard W.M. Jones
On Mon, Jul 16, 2012 at 04:03:57PM +0800, Wanlong Gao wrote: Code cleanup. Signed-off-by: Wanlong Gao gaowanl...@cn.fujitsu.com --- daemon/isoinfo.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/daemon/isoinfo.c b/daemon/isoinfo.c index c0ee1c9..fd777bd 100644 ---

Re: [Libguestfs] [PATCH V5] NEW API: add new api xfs_info

2012-07-17 Thread Richard W.M. Jones
You must enable warnings (./configure --enable-gcc-warnings) and fix all the problems that gcc finds: xfs.c:33:1: error: no previous prototype for 'optgroup_xfs_available' [-Werror=missing-prototypes] xfs.c: In function 'parse_xfs_info': xfs.c:97:5: error: suggest parentheses around assignment

Re: [Libguestfs] [PATCH] augeas: make functions as noreturn

2012-07-18 Thread Richard W.M. Jones
On Wed, Jul 18, 2012 at 09:58:44AM +0800, Wanlong Gao wrote: Just make gcc happy. Thanks, pushed it. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE)

Re: [Libguestfs] [PATCH V6] NEW API: add new api xfs_info

2012-07-18 Thread Richard W.M. Jones
I pushed this with a few changes/fixes: https://github.com/libguestfs/libguestfs/commit/87206e4e9e3b0ca813a4ff7b5fac0eccc07a484a Thanks, Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many

Re: [Libguestfs] [PATCH] fuse:remove the unused macro when fuse is not available

2012-07-21 Thread Richard W.M. Jones
On Sat, Jul 21, 2012 at 09:11:57AM +0800, Wanlong Gao wrote: Just make gcc happy when fuse is not available. Signed-off-by: Wanlong Gao gaowanl...@cn.fujitsu.com --- src/fuse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fuse.c b/src/fuse.c index

Re: [Libguestfs] [PATCH 1/5] mount: add a macro to resolve path or device

2012-07-21 Thread Richard W.M. Jones
On Sat, Jul 21, 2012 at 03:27:13PM +0800, Wanlong Gao wrote: Add a macro DUP_RESOLVE_DEVICE_OR_PATH to resolve path or device. Signed-off-by: Wanlong Gao gaowanl...@cn.fujitsu.com --- daemon/daemon.h | 18 ++ daemon/mount.c | 13 ++--- po/POTFILES | 8

Re: [Libguestfs] [PATCH 2/5] xfs: use the added macro DUP_RESOLVE_DEVICE_OR_PATH

2012-07-21 Thread Richard W.M. Jones
On Sat, Jul 21, 2012 at 03:27:14PM +0800, Wanlong Gao wrote: Use this macro to simplify the code. -style = RStruct (info, xfsinfo), [Pathname path], []; +style = RStruct (info, xfsinfo), [String pathordevice], []; I think you should use Dev_or_Path here. See for example

Re: [Libguestfs] [PATCH 3/5] umount: add force umount and lazy umount

2012-07-21 Thread Richard W.M. Jones
On Sat, Jul 21, 2012 at 03:27:15PM +0800, Wanlong Gao wrote: diff --git a/generator/generator_actions.ml b/generator/generator_actions.ml index 1ce4026..67116b5 100644 --- a/generator/generator_actions.ml +++ b/generator/generator_actions.ml @@ -2742,7 +2742,7 @@ characters does Inot work,

Re: [Libguestfs] [PATCH 4/5] xfs_info: tidy up the log path message

2012-07-21 Thread Richard W.M. Jones
On Sat, Jul 21, 2012 at 03:27:16PM +0800, Wanlong Gao wrote: Before patch: fs xfs-info /badpath libguestfs: error: xfs_info: xfs_info: /sysroot/badpath is not a mounted XFS filesystem After patch: fs xfs-info /badpath libguestfs: error: xfs_info: xfs_info: /badpath is not a mounted XFS

Re: [Libguestfs] [PATCH 3/5] umount: add force umount and lazy umount

2012-07-21 Thread Richard W.M. Jones
On Sat, Jul 21, 2012 at 03:27:15PM +0800, Wanlong Gao wrote: Add the option force and lazy for force and lazy umount. What are these options used for? I think maybe they are useful for libguestfs live, but not for the libguestfs appliance case (mountpoints should never be busy in the

Re: [Libguestfs] [PATCH 3/5] umount: add force umount and lazy umount

2012-07-21 Thread Richard W.M. Jones
On Sat, Jul 21, 2012 at 10:58:26PM +0800, Wanlong Gao wrote: On 07/21/2012 08:26 PM, Richard W.M. Jones wrote: On Sat, Jul 21, 2012 at 03:27:15PM +0800, Wanlong Gao wrote: Add the option force and lazy for force and lazy umount. What are these options used for? I think maybe

[Libguestfs] [PATCH libguestfs 1/4] appliance: Push appliance building lock into guestfs___build_appliance.

2012-07-21 Thread Richard W.M. Jones
From: Richard W.M. Jones rjo...@redhat.com Since we will be calling guestfs___build_appliance from the libvirt code in future, there's no point having two places where we have to acquire the lock. Push the lock down into this function instead. Because glthread/lock.h includes errno.h we have

[Libguestfs] [PATCH libguestfs 3/4] Add attach-method libvirt or libvirt:URI.

2012-07-21 Thread Richard W.M. Jones
From: Richard W.M. Jones rjo...@redhat.com With this commit, you can set the attach method to libvirt, but calling launch will give an error. --- generator/generator_actions.ml |7 +++ src/guestfs-internal.h |6 +- src/guestfs.c | 17

[Libguestfs] [PATCH libguestfs 0/4] Add a libvirt backend to libguestfs.

2012-07-21 Thread Richard W.M. Jones
This preliminary patch series adds a libvirt backend to libguestfs. It's for review only because although it launches the guest OK, there are some missing features that need to be implemented. The meat of the patch is in part 4/4. To save you the trouble of interpreting libxml2 fragments, an

[Libguestfs] [PATCH libguestfs 4/4] launch: Add libvirt backend.

2012-07-21 Thread Richard W.M. Jones
From: Richard W.M. Jones rjo...@redhat.com Complete the attach-method libvirt backend. This backend uses libvirt to create a transient KVM domain to run the appliance. Note that this still will only work with local libvirt URIs since the kernel, initrd and appliance links in the libvirt XML

Re: [Libguestfs] [libvirt] [PATCH libguestfs 0/4] Add a libvirt backend to libguestfs.

2012-07-21 Thread Richard W.M. Jones
On Sat, Jul 21, 2012 at 08:20:45PM +0100, Richard W.M. Jones wrote: Some questions: Another question ... channel type=unix source mode=connect path=/home/rjones/d/libguestfs/libguestfsSSg3Kl/guestfsd.sock/ target type=virtio name=org.libguestfs.channel.0/ /channel

Re: [Libguestfs] [libvirt] [PATCH libguestfs 0/4] Add a libvirt backend to libguestfs.

2012-07-22 Thread Richard W.M. Jones
On Sat, Jul 21, 2012 at 08:20:45PM +0100, Richard W.M. Jones wrote: Some questions: How do you set the IP address for userspace networking? AFAICT from the code this is not possible. ie: the net= parameter: -netdev user,id=usernet,net=169.254.0.0/16 \ -device virtio-net-pci,netdev=usernet

Re: [Libguestfs] [PATCH V2 4/4] umount: use Dev_or_Path instead of untype

2012-07-23 Thread Richard W.M. Jones
On Mon, Jul 23, 2012 at 04:40:35PM +0800, Wanlong Gao wrote: On 07/23/2012 04:16 PM, Richard W.M. Jones wrote: On Mon, Jul 23, 2012 at 11:43:23AM +0800, Wanlong Gao wrote: Use Dev_or_Path type for device or path arguments. Signed-off-by: Wanlong Gao gaowanl...@cn.fujitsu.com

Re: [Libguestfs] [libvirt] [PATCH libguestfs 0/4] Add a libvirt backend to libguestfs.

2012-07-23 Thread Richard W.M. Jones
On Mon, Jul 23, 2012 at 11:21:37AM +0100, Daniel P. Berrange wrote: On Mon, Jul 23, 2012 at 11:02:41AM +0100, Richard W.M. Jones wrote: It's using NULL and expecting libvirt to choose the appropriate connection URI, which does appear to work. Apps should only rely on NULL, if they are able

Re: [Libguestfs] [PATCH V4 2/3] xfs_info: resolve device when doing xfs_info on a device

2012-07-24 Thread Richard W.M. Jones
On Tue, Jul 24, 2012 at 04:47:22PM +0800, Wanlong Gao wrote: Resolve device first, like do_umount. Use Dev_or_Path. Signed-off-by: Wanlong Gao gaowanl...@cn.fujitsu.com --- daemon/xfs.c | 21 - generator/generator_actions.ml | 2 +- 2 files changed,

Re: [Libguestfs] [PATCH 07/12] Mac OS X: don't check glibc-style extended printf formatters unless --enable-daemon

2012-07-24 Thread Richard W.M. Jones
On Tue, Jul 24, 2012 at 11:10:44PM +0900, Masami HIRATA wrote: Signed-off-by: Masami HIRATA msm...@gmail.com --- configure.ac | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/configure.ac b/configure.ac index 1d07b0e..af01e53 100644 ---

Re: [Libguestfs] [PATCH 12/12] Mac OS X: Use u_int64_t/uint64_t instead of unsigned hyper in .x file

2012-07-24 Thread Richard W.M. Jones
I adjusted the whitespace in this final patch. Thanks for this. I'm going to push them all when I've finished running the test suite, later this evening. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-p2v converts physical machines to virtual

Re: [Libguestfs] [PATCH] fish: Use minimal permissions when initially creating history file

2012-07-25 Thread Richard W.M. Jones
On Wed, Jul 25, 2012 at 02:19:30PM +0100, Matthew Booth wrote: --- fish/fish.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fish/fish.c b/fish/fish.c index ded80ec..9bb8c90 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -1455,7 +1455,7 @@ cleanup_readline (void)

Re: [Libguestfs] qemu:could not load kernel

2012-07-25 Thread Richard W.M. Jones
On Wed, Jul 25, 2012 at 10:39:26AM +0200, Giuseppe Calarco wrote: Hi, I have a problem when i run java examples of libguestfs. It needs root privileges. This is the output of libguestfs-test-tool: [...] qemu: could not load kernel '/var/tmp/.guestfs-1000/kernel.9392': Permission denied If

Re: [Libguestfs] [PATCH] xfs: add new api xfs-growfs

2012-07-31 Thread Richard W.M. Jones
On Tue, Jul 31, 2012 at 04:49:57PM +0800, Wanlong Gao wrote: New api xfs_growfs for expanding a XFS filesystem. Signed-off-by: Wanlong Gao gaowanl...@cn.fujitsu.com --- daemon/xfs.c | 119 + generator/generator_actions.ml | 15

[Libguestfs] NOTICE: New location of febootstrap source tarballs

2012-07-31 Thread Richard W.M. Jones
This has moved to: http://libguestfs.org/download/febootstrap/ The website for febootstrap remains: http://people.redhat.com/~rjones/febootstrap/ Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com

Re: [Libguestfs] libguestfs question - multiple partitions in the guest

2012-08-01 Thread Richard W.M. Jones
On Wed, Aug 01, 2012 at 11:47:14AM -0500, Shawn Kennedy wrote: Problem: When trying to inspect the guest using a command like 'virt-ls', we get back: ~]# virt-ls -d guest /path virt-ls: multi-boot operating systems are not supported by the -i option What does virt-inspector2 [this is RHEL

Re: [Libguestfs] libguestfs question - multiple partitions in the guest

2012-08-01 Thread Richard W.M. Jones
On Wed, Aug 01, 2012 at 01:19:45PM -0500, Shawn Kennedy wrote: Hi Richard, Because I have 2 filesystems (one in a mounted LV and one in a unmounted LV), I get 2 sets of mountpoints in virt-inspector2 mountpoints mountpoint dev=/dev/VG1/LV0001.root//mountpoint

Re: [Libguestfs] libguestfs question - multiple partitions in the guest

2012-08-01 Thread Richard W.M. Jones
On Wed, Aug 01, 2012 at 03:23:24PM -0500, Shawn Kennedy wrote: Hi Rich, Let's handle the easy one first: # rpm -qa | grep libguestfs-tools-c libguestfs-tools-c-1.7.17-26.el6.x86_64 # rpm -ql libguestfs-tools-c /usr/bin/virt-cat /usr/bin/virt-df /usr/bin/virt-filesystems

Re: [Libguestfs] libguestfs question - multiple partitions in the guest

2012-08-01 Thread Richard W.M. Jones
On Wed, Aug 01, 2012 at 03:31:19PM -0500, Shawn Kennedy wrote: I wonder - maybe an new tool (virt-grub) to dump out the grub content of the guest image (if linux)!! :-) :-) :-) It's actually pretty simple to script this. See attached (requires a grub1 guest). Rich. -- Richard Jones,

Re: [Libguestfs] libguestfs question - multiple partitions in the guest

2012-08-01 Thread Richard W.M. Jones
On Wed, Aug 01, 2012 at 04:02:27PM -0500, Shawn Kennedy wrote: -Original Message- From: libguestfs-boun...@redhat.com [mailto:libguestfs-boun...@redhat.com] On Behalf Of Shawn Kennedy From: Richard W.M. Jones [mailto:rjo...@redhat.com] (2) You could try doing what virt-v2v

Re: [Libguestfs] libguestfs question - multiple partitions in the guest

2012-08-01 Thread Richard W.M. Jones
On Wed, Aug 01, 2012 at 05:02:28PM -0500, Shawn Kennedy wrote: -Original Message- From: Richard W.M. Jones [mailto:rjo...@redhat.com] Sent: Wednesday, August 01, 2012 4:22 PM To: Shawn Kennedy Cc: libguestfs@redhat.com; 'Smudde, Mark Alan (Mark)'; 'Tockstein, James E (Jim

Re: [Libguestfs] virt-ls windows

2012-08-02 Thread Richard W.M. Jones
On Thu, Aug 02, 2012 at 02:12:38PM +0300, Evaggelos Balaskas wrote: On a windows 2003 VM, i have two LVM partitions attached I was wonder how can i use virt-ls on d: disk eg. # virt-ls -d win2003 / works fine for c: but i cant figured it out how i use this for d: virt-ls doesn't

Re: [Libguestfs] virt-ls windows

2012-08-02 Thread Richard W.M. Jones
On Thu, Aug 02, 2012 at 02:46:25PM +0300, Evaggelos Balaskas wrote: thanks for your reply and for the listdrive.pl I am guessing the same limitation apply on virt-copy-out too. virt-copy-out is just a wrapper around the guestfish copy-out command. You can use the guestfish command copy-out

Re: [Libguestfs] Can I use libguestfs with Java under windows os?

2012-08-03 Thread Richard W.M. Jones
On Fri, Aug 03, 2012 at 04:10:05PM +0800, 吕袭蒙 wrote: Hi rjones, I’m now developing something about virtualization using java. when I use the example code at site http://libguestfs.org/guestfs-java.3.html, It occurs an exception Exception in thread main

Re: [Libguestfs] virt-ls windows

2012-08-03 Thread Richard W.M. Jones
Thanks, I have filed a bug about this: https://bugzilla.redhat.com/show_bug.cgi?id=845488 Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to

Re: [Libguestfs] virt-ls windows

2012-08-03 Thread Richard W.M. Jones
On Fri, Aug 03, 2012 at 07:25:09PM +0300, Evaggelos Balaskas wrote: but with guestfish fs /usr/bin/rsync /boot.ini localdir/ /usr/bin/rsync: unknown command You can try it in virt-rescue first, because guestfish virt-rescue:

Re: [Libguestfs] virt-ls windows

2012-08-03 Thread Richard W.M. Jones
On Fri, Aug 03, 2012 at 05:52:27PM +0100, Richard W.M. Jones wrote: debug sh rsync /local server:/remote debug sh isn't interactive, so the rsync command had better work without requiring any user input, like passphrases etc. Rich. -- Richard Jones, Virtualization Group, Red Hat http

Re: [Libguestfs] virt-ls windows

2012-08-03 Thread Richard W.M. Jones
On Fri, Aug 03, 2012 at 09:54:59PM +0300, Evaggelos Balaskas wrote: I havent fully understand how the network-related-staff works ... but hopefully i'll get there. Enabling the network in libguestfs (before launch) adds a few flags to the qemu command line which in turn enables user networking

<    1   2   3   4   5   6   7   8   9   10   >