Re: [Libguestfs] [PATCH 1/2] Preallocate output file

2013-10-22 Thread Richard W.M. Jones
On Wed, Oct 23, 2013 at 03:38:30AM +0100, Pádraig Brady wrote: [...] By the way, Eric Sandeen solved the problem. It's a genuine misfeature in ext4 called auto_da_alloc which causes a flush on close if the file has been truncated (ftruncate or O_TRUNC) and the file size is zero bytes. I added th

Re: [Libguestfs] [PATCH] * supermin support for FrugalWare (pacman-g2)

2013-10-23 Thread Richard W.M. Jones
On Tue, Oct 22, 2013 at 08:42:12PM +0200, Daniel Exner wrote: > -dnl For ArchLinux handler. > -AC_CHECK_PROG(PACMAN,[pacman],[pacman],[no]) > +dnl For FrugalWare handler. > +AC_CHECK_PROG(PACMAN_G2,[pacman-g2],[pacman-g2],[no]) > + > +dnl if test "x$pacman_g2" = "xno"; then > +dnl dnl For ArchLinu

[Libguestfs] Notes on compiling libguestfs 1.24 on RHEL 6.4

2013-10-23 Thread Richard W.M. Jones
(Actually, libguestfs from git, but 1.24 and git are pretty close now) First install augeas 1.0.0 from here: http://oirase.annexia.org/tmp/libguestfs-RHEL-6.5/ Check out libguestfs from git. You'll need to create two files in the libguestfs source directory: "localconfigure" containing: -

Re: [Libguestfs] Notes on compiling libguestfs 1.24 on RHEL 6.4

2013-10-23 Thread Richard W.M. Jones
On Wed, Oct 23, 2013 at 10:35:45AM +0100, Richard W.M. Jones wrote: > First install augeas 1.0.0 from here: > http://oirase.annexia.org/tmp/libguestfs-RHEL-6.5/ I think you need to install febootstrap from here too. Those are previews of packages that will be in RHEL 6.5. Rich. -- R

Re: [Libguestfs] virt-builder looks AWESOME!

2013-10-25 Thread Richard W.M. Jones
On Fri, Oct 25, 2013 at 01:14:04PM -0700, Scott Baker wrote: > On 10/25/2013 12:56 PM, Richard W.M. Jones wrote: > > F20 - it's in the beta now (as of yesterday). > > > > Rich. > > Wow this has a lot of dependencies :) Two questions... Let's put this on the m

Re: [Libguestfs] virt-builder looks AWESOME!

2013-10-25 Thread Richard W.M. Jones
On Fri, Oct 25, 2013 at 09:20:50PM +0100, Richard W.M. Jones wrote: > Then clone the libguestfs upstream git from github, and follow the > `Building' section in the README file (all non-root). Actually it's more accurate to say: follow the building instructions here: https:

Re: [Libguestfs] [PATCH] sysprep: add feature of removing specified paths

2013-10-29 Thread Richard W.M. Jones
16:17:25 +0800 Subject: [PATCH] sysprep: add feature of deleting specified paths Signed-off-by: Wanlong Gao Signed-off-by: Richard W.M. Jones --- po/POTFILES-ml | 1 + sysprep/Makefile.am | 1 + sysprep/sysprep_operation_delete.ml | 51 +

Re: [Libguestfs] [PATCH] * supermin support for FrugalWare (pacman-g2)

2013-10-29 Thread Richard W.M. Jones
On Tue, Oct 22, 2013 at 08:42:12PM +0200, Daniel Exner wrote: > Hi, > > (added myself as CC as I'm not subscribed to this MailingList curently) > > I already sent a pull request via github, but was told that review via ML > is preferred. > > Another patch for libguestfs will follow in a seperate

Re: [Libguestfs] [PATCH] * initial FrugalWare support

2013-10-29 Thread Richard W.M. Jones
On Tue, Oct 22, 2013 at 08:44:43PM +0200, Daniel Exner wrote: > this patch enables building of the guestfs appliance with most of the > correct packages. > The missing ones will follow as soon as they are available. Hi Daniel, Sorry for the delay caused by us being at the KVM Forum last week. I

[Libguestfs] virt-resize for shrinking

2013-10-29 Thread Richard W.M. Jones
[Continuing a discussion from IRC so we have a permanent record] We want to shrink a disk image using virt-resize. Shrinking is harder and not really documented. It requires some manual calculations too. Here is the original: $ virt-df -a 209e6911-fe48-4321-900f-928b3400df88 Filesystem

Re: [Libguestfs] [PATCH stable-1.24] Fix fstab block device resolution for FreeBSD

2013-11-04 Thread Richard W.M. Jones
On Sun, Nov 03, 2013 at 11:16:23PM +0200, Nikos Skalkotos wrote: > +char type_c = (strcmp (type, "vtbd") == 0) ? 'v' : 's'; > int disk_i = guestfs___parse_unsigned_int (g, disk); > int slice_i = guestfs___parse_unsigned_int (g, slice); > int part_i = part[0] - 'a' /* counting fro

Re: [Libguestfs] [libguestfs] Problem using virt-sysprep with RBD images

2013-11-05 Thread Richard W.M. Jones
On Mon, Nov 04, 2013 at 06:35:42PM -0700, Jon wrote: > Hello, > > I'm having a problem when trying to use virt-sysprep against vms that have > rbd disk images. When I run virt-sysprep I get the following error: > > >> root@kitt:~/libguestfs-1.22.4# virt-sysprep -d server-clone-test > --firstboot

Re: [Libguestfs] [PATCH stable-1.24] Fix fstab block device resolution for FreeBSD

2013-11-05 Thread Richard W.M. Jones
/~rjones Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW From 1a4fb80232fe50952e5fcd12f6f823490a624658 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 5 Nov 2013

Re: [Libguestfs] [PATCH stable-1.24] Fix fstab block device resolution for FreeBSD

2013-11-05 Thread Richard W.M. Jones
On Tue, Nov 05, 2013 at 01:59:04PM +0200, Nikos Skalkotos wrote: > Hello Richard, > > I think my patch is sufficient. I don't thing you need this patch at > all. The regular expression /dev/(ada{0,1}|vtbd) > will match both: /dev/ada and /dev/ad. This is why I use "{0,1}" > (=zero or one occurr

Re: [Libguestfs] Request to relicense hash gnulib module to LGPLv2+

2013-11-05 Thread Richard W.M. Jones
On Wed, Aug 28, 2013 at 06:51:11PM +0100, Richard W.M. Jones wrote: > libguestfs (an LGPLv2+ library) uses the 'hash' module, which turns > out to be "GPL". > > Actually this happened because we started to use it in a separate > GPL'd utility program, but

Re: [Libguestfs] Request to relicense hash gnulib module to LGPLv2+

2013-11-05 Thread Richard W.M. Jones
On Tue, Nov 05, 2013 at 08:29:15AM -0800, Jim Meyering wrote: > On Tue, Nov 5, 2013 at 7:51 AM, Richard W.M. Jones wrote: > > On Wed, Aug 28, 2013 at 06:51:11PM +0100, Richard W.M. Jones wrote: > >> libguestfs (an LGPLv2+ library) uses the 'hash' module, whi

Re: [Libguestfs] virt-resize problem for Windows 2003

2013-11-06 Thread Richard W.M. Jones
On Wed, Nov 06, 2013 at 10:58:06AM +0800, Xinglong Wu wrote: > Hi, > > I'm using virt-resize to expand the primary partition (C:) in a > Windows 2003 image. The command works fine but after expanding, when I boot > into Windows 2003, all the other partitions (D:, E:, and F:) are lost. I can

Re: [Libguestfs] Add Scientific Linux support

2013-11-06 Thread Richard W.M. Jones
On Wed, Nov 06, 2013 at 12:42:13PM +, Adam Huffman wrote: > Patch with name and URL changes from CentOS script attached. Thanks, I have added this. I renamed it to scientificlinux.sh as discussed on IRC. I'll do some SL build(s) later. - - - - FYI: Virt-builder 1.24 can only ha

Re: [Libguestfs] [libguestfs] Problem using virt-sysprep with RBD images

2013-11-06 Thread Richard W.M. Jones
.iteri. 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://people.redhat.com/~rjones/virt-top >From a2ef259c3

Re: [Libguestfs] [libguestfs] Problem using virt-sysprep with RBD images

2013-11-06 Thread Richard W.M. Jones
On Wed, Nov 06, 2013 at 02:25:54PM -0700, Jon wrote: > Hello Richard, > > Haha, ok, here's a good one: I commented that if statement out at line 300, > applied your patch (I see you updated the github of this code, perhaps > that's the best place to grab the code from), and when I run virt-sysprep

Re: [Libguestfs] [libguestfs] Problem using virt-sysprep with RBD images

2013-11-06 Thread Richard W.M. Jones
On Wed, Nov 06, 2013 at 09:37:01PM +, Richard W.M. Jones wrote: > when you use the URL on the guestfish command line, the URL is > something like "rbd://example.com/foo/bar" and the path part of this > has to start with a "/" character. There is simply no way to

Re: [Libguestfs] [libguestfs] Problem using virt-sysprep with RBD images

2013-11-06 Thread Richard W.M. Jones
On Wed, Nov 06, 2013 at 02:52:06PM -0700, Jon wrote: > Hello Rich, > > Interesting. Thanks for the explanation. > > When you specify an rbd on the command line for virt-sysprep, do you expect > the path to include the monitor address? > > e.g.: > >> virt-sysprep -a rbd://host-name/pool-name/dev

Re: [Libguestfs] Kernel panic with virt-builder etc.

2013-11-07 Thread Richard W.M. Jones
On Thu, Nov 07, 2013 at 08:15:53AM +0100, Oliver Frommel wrote: > Hi there, > > I am trying to write an article on virt-builder and managed to compile > version 1.24.1 of libguestfs on Ubuntu 13.10 (I had mixed success with > the git version and 1.25.x). When I am running virt-builder I am getting

Re: [Libguestfs] [libguestfs] reserved identifier violation (#6)

2013-11-07 Thread Richard W.M. Jones
[This github thread is annoying to follow. I've switched over to the mailing list] On Thu, Nov 07, 2013 at 02:47:04AM -0800, Markus Elfring wrote: > Would you like to avoid that this software will be built on > [undefined > behaviour](https://www.securecoding.cert.org/confluence/display/seccode/C

Re: [Libguestfs] Kernel panic with virt-builder etc.

2013-11-07 Thread Richard W.M. Jones
I've just built libguestfs (from git) on Ubuntu 13.10 and it worked for me. Here's what I did: * Clone libguestfs from git: git clone https://github.com/libguestfs/libguestfs.git cd libguestfs * Create a file called 'localconfigure' containing: -

Re: [Libguestfs] Kernel panic with virt-builder etc.

2013-11-07 Thread Richard W.M. Jones
On Thu, Nov 07, 2013 at 01:58:22PM +0100, Oliver Frommel wrote: > Dammit, you are fast! I just tried to figure out what's missing from > running "init" on the host and installing the missing packages, among > them "mdadm" and others. Also I noticed that "appliance/packagelist" > includes a lot of p

Re: [Libguestfs] Kernel panic with virt-builder etc.

2013-11-07 Thread Richard W.M. Jones
On Thu, Nov 07, 2013 at 01:17:23PM +, Richard W.M. Jones wrote: > ./run ./builder/virt-builder debian-6 We're actually performing surprisingly well, even in a VM: $ ./run ./builder/virt-builder debian-6 [ 0.0] Downloading: http://libguestfs.org/download/builder/debian-6.xz

Re: [Libguestfs] [libguestfs] Add ability to set a command for firstboot and not only a script (#7)

2013-11-07 Thread Richard W.M. Jones
Attaching the patch to this email. Note we don't do github pull requests: http://libguestfs.org/guestfs-faq.1.html#where-do-i-send-patches Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many power

Re: [Libguestfs] [libguestfs] Add ability to set a command for firstboot and not only a script (#7)

2013-11-07 Thread Richard W.M. Jones
> Subject: [PATCH] Add ability to set a command for firstboot and not only a > script In principle yes, in practice this patch isn't right: > --- > sysprep/sysprep_operation_firstboot.ml | 21 - > 1 file changed, 12 insertions(+), 9 deletions(-) > > diff --git a/sysprep/sysp

[Libguestfs] Fwd: [libguestfs] debian-7 virt-builder image contains proxy configuration in apt.conf (#8)

2013-11-11 Thread Richard W.M. Jones
I've just realized that these github "notifications" are not going to the mailing list. Please don't send messages via github. Rich. -- From: Daniel Miranda I just created a debian-7 image with virt-builder and the generated

Re: [Libguestfs] [libguestfs] reserved identifier violation (#6)

2013-11-11 Thread Richard W.M. Jones
[I'm continuing this on the mailing list only] On Mon, Nov 11, 2013 at 06:14:18AM -0800, Markus Elfring wrote: > How do you think about to replace the prefix "guestfs__" by "guestfs_i"? No, we can't do that because such a symbol could be mistaken for public API (although on platforms which suppor

Re: [Libguestfs] [libguestfs] make_random_password(): avoid modulo bias, and do not deplete system entropy (#9)

2013-11-14 Thread Richard W.M. Jones
On Thu, Nov 14, 2013 at 01:48:17AM -0800, edwintorok wrote: > Following the link to builder.ml from your blogpost I noticed the > make_random_password () function, and I have some suggestions, well nitpicks > really. See the 2 commits from this pull request. > > 1. Using Ocaml's buffered I/O mea

Re: [Libguestfs] [libguestfs] make_random_password(): avoid modulo bias, and do not deplete system entropy (#9)

2013-11-14 Thread Richard W.M. Jones
On Thu, Nov 14, 2013 at 01:48:17AM -0800, edwintorok wrote: > Following the link to builder.ml from your blogpost I noticed the > make_random_password () function, and I have some suggestions, well > nitpicks really. See the 2 commits from this pull request. > > 1. Using Ocaml's buffered I/O means

Re: [Libguestfs] RHSrvAny: Fix failure on Windows 2003

2013-11-18 Thread Richard W.M. Jones
On Mon, Nov 18, 2013 at 02:17:44PM +, Matthew Booth wrote: > The newly rebuilt RHSrvAny worked on Windows XP, Windows 2003 R2, and Windows > Vista+, but segfaulted on Windows 2003. After much investigation, the issue > seems to have been with inconsistent use of Unicode. > > This series fixes

Re: [Libguestfs] libguestfs for RHEL 6.5 preview repository

2013-11-20 Thread Richard W.M. Jones
On Thu, May 30, 2013 at 08:52:02PM +0100, Richard W.M. Jones wrote: > In RHEL 6.5 we are probably going to rebase libguestfs, febootstrap > and virt-v2v. > > As usual when this happens, I've put up a preview repository: > > http://oirase.annexia.org/tmp/libguestfs-RHEL-

[Libguestfs] libguestfs for RHEL 7.0 preview repository

2013-11-20 Thread Richard W.M. Jones
RHEL 7.0 will ship libguestfs 1.22, supermin (replacing febootstrap) and hivex. Although the RHEL 7 alphas and betas are not public, to help people understand what the libguestfs package will look like I have put up a preview repository: http://oirase.annexia.org/tmp/libguestfs-RHEL-7.0/ This

Re: [Libguestfs] Accessing iSCSI disc images from the RHEV Manager using libguestfs

2013-11-21 Thread Richard W.M. Jones
[Adding Itamar: Any suggestions on where Vitaly could get help on this RHEV-M API problem?] On Thu, Nov 21, 2013 at 02:27:08PM +, Исаев Виталий Анатольевич wrote: > Dear libguestfs developers, > > We are developing the protected enterprise system based on several > Red Hat technologies (Red Ha

Re: [Libguestfs] HA: Accessing iSCSI disc images from the RHEV Manager using libguestfs

2013-11-22 Thread Richard W.M. Jones
[CC to Fabian - can you comment on the ovirt-node problem below] On Thu, Nov 21, 2013 at 10:02:46PM +, Исаев Виталий Анатольевич wrote: > On 11/21/2013 05:56 PM, Richard W.M. Jones wrote: > > When you say "cannot access them" do you get an error message? Could > >

Re: [Libguestfs] HA: Accessing iSCSI disc images from the RHEV Manager using libguestfs

2013-11-22 Thread Richard W.M. Jones
On Fri, Nov 22, 2013 at 11:11:32AM +0200, Itamar Heim wrote: > My I ask for the bigger picture of what you are trying to do? See: https://www.redhat.com/archives/libguestfs/2013-November/msg00059.html Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Fedora

Re: [Libguestfs] HA: Accessing iSCSI disc images from the RHEV Manager using libguestfs

2013-11-22 Thread Richard W.M. Jones
On Fri, Nov 22, 2013 at 09:42:28AM +, Исаев Виталий Анатольевич wrote: > Rich, you are right; the hypervisor is RHEV-H. As Itamar has just > explained me, hooks are executed on the hypervisor’s side (not on > the RHEV-M, as I used to think), so properly working libguestfs on > the RHEV-H will r

Re: [Libguestfs] Accessing iSCSI disc images from the RHEV Manager using libguestfs

2013-11-22 Thread Richard W.M. Jones
On Thu, Nov 21, 2013 at 06:09:57PM +0200, Itamar Heim wrote: > i may be missing something, but wouldn't vdsm hooks be a better fit: > http://www.ovirt.org/VDSM-Hooks > > for example, I think the "checkimages" one would cover what you are > trying to do already? > http://gerrit.ovirt.org/gitweb?p=v

Re: [Libguestfs] HA: Accessing iSCSI disc images from the RHEV Manager using libguestfs

2013-11-22 Thread Richard W.M. Jones
On Fri, Nov 22, 2013 at 10:29:08AM +, Исаев Виталий Анатольевич wrote: > Thanks a lot. Yes, we have a Support and we will ask them to help > with this bug. > > How do you think, maybe we can hack this issue quickly just putting > the kernel file (desired by libguestfs) manually to some director

Re: [Libguestfs] HA: Accessing iSCSI disc images from the RHEV Manager using libguestfs

2013-11-22 Thread Richard W.M. Jones
On Fri, Nov 22, 2013 at 12:14:24PM +0100, Fabian Deutsch wrote: > Am Freitag, den 22.11.2013, 10:29 + schrieb Исаев Виталий > Анатольевич: > > Thanks a lot. Yes, we have a Support and we will ask them to help with this > > bug. > > > > How do you think, maybe we can hack this issue quickly j

Re: [Libguestfs] HA: Accessing iSCSI disc images from the RHEV Manager using libguestfs

2013-11-22 Thread Richard W.M. Jones
On Fri, Nov 22, 2013 at 11:40:45AM +, Исаев Виталий Анатольевич wrote: > Unfortunately, placing the link into the /boot does not work. > libguestfs-test-tool failes with the same message: [...] > libguestfs: [0ms] febootstrap-supermin-helper --verbose -f checksum > '/usr/lib64/guestfs/sup

Re: [Libguestfs] HA: Accessing iSCSI disc images from the RHEV Manager using libguestfs

2013-11-22 Thread Richard W.M. Jones
On Fri, Nov 22, 2013 at 11:51:51AM +, Исаев Виталий Анатольевич wrote: > Oh, you are right. Wrong filename - it's my fault. Now: > == TEST FINISHED OK == OK, you should be all working now. I'll note that 1033508 is still a bug, either in ovirt-node or in libguestfs, but we have got to

Re: [Libguestfs] HA: Accessing iSCSI disc images from the RHEV Manager using libguestfs

2013-11-22 Thread Richard W.M. Jones
On Fri, Nov 22, 2013 at 12:04:51PM +, Исаев Виталий Анатольевич wrote: > Thanks to all. Symbolic link to vmlinuz image is a solution to my problem: Actually we came up with another possible way. Not tested, but if it works, then it has the advantage of not needing root or any permanent change

Re: [Libguestfs] HA: Accessing iSCSI disc images from the RHEV Manager using libguestfs

2013-11-22 Thread Richard W.M. Jones
On Fri, Nov 22, 2013 at 02:02:17PM +, Исаев Виталий Анатольевич wrote: > select kernel /dev/.initramfs/live/vmlinuz0 > febootstrap-supermin-helper: cannot guess module path. Thanks, I can see why that doesn't work. It's another bug unfortunately: https://bugzilla.redhat.com/show_bug.cgi?id=1

Re: [Libguestfs] [PATCH 1/3] Document ntreg_nk_record.flags

2013-11-22 Thread Richard W.M. Jones
On Fri, Nov 22, 2013 at 02:08:33PM +0100, Hilko Bengen wrote: > --- > lib/hivex-internal.h | 14 +- > 1 file changed, 13 insertions(+), 1 deletion(-) > > diff --git a/lib/hivex-internal.h b/lib/hivex-internal.h > index f391b98..d7ce339 100644 > --- a/lib/hivex-internal.h > +++ b/lib/h

Re: [Libguestfs] [PATCH 3/3] Correctly handle latin1-encoded key/value names

2013-11-22 Thread Richard W.M. Jones
I tested 2 & 3 against the hivex-test-data repository and indeed your patches found (and fixed) some registry encoding issues: http://git.annexia.org/?p=hivex-test-data.git;a=commitdiff_plain;h=d1b6c9d294287642d035f3a7fb20081865962086 Thanks, I have pushed all three patches to hivex. Rich. --

Re: [Libguestfs] Read MBR and store in a file?

2013-11-22 Thread Richard W.M. Jones
On Fri, Nov 22, 2013 at 01:58:24PM +, adrelanos wrote: > Hi! > > Is it possible to read the MBR of an image and to store it inside a file? Yes, easily :-) guestfish --ro -a disk.img run : pread-device /dev/sda 512 0 > mbr This will work for any format of disk. Of course for a raw format

Re: [Libguestfs] Read MBR and store in a file?

2013-11-22 Thread Richard W.M. Jones
On Fri, Nov 22, 2013 at 11:34:34AM -0500, Jason A. Kates wrote: > what about just using dd? > dd if=disk.img of=mbr bs=512b count=1 Correct, that's what I alluded to here: > > This will work for any format of disk. Of course for a raw format > > disk this is just a slower way of reading the firs

Re: [Libguestfs] Auditing a vm image - virt-diff - was: Read MBR and store in a file?

2013-11-22 Thread Richard W.M. Jones
On Fri, Nov 22, 2013 at 01:24:35PM -0500, Alex Nelson wrote: > Actually, I don't suppose qemu-img has a FUSE-like wrapper that exposes the > underlying image as a raw file? qemu-nbd is the closest, AFAIK. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones lib

Re: [Libguestfs] Auditing a vm image - virt-diff - was: Read MBR and store in a file?

2013-11-22 Thread Richard W.M. Jones
On Fri, Nov 22, 2013 at 05:56:00PM +, adrelanos wrote: > Thank you all for your suggestions! > > Richard W.M. Jones: > > I keep meaning to write a comprehensive "virt-diff" tool. I needed it > > myself just yesterday. > > Most interesting. I guess ther

Re: [Libguestfs] [PATCH 1/3] lib: Further generalize iconv wrapper function.

2013-11-25 Thread Richard W.M. Jones
On Sun, Nov 24, 2013 at 11:25:51PM +0100, Hilko Bengen wrote: > --- > lib/hivex-internal.h | 8 +--- > lib/utf16.c | 11 +++ > 2 files changed, 12 insertions(+), 7 deletions(-) > > diff --git a/lib/hivex-internal.h b/lib/hivex-internal.h > index 4135f58..64fd49a 100644 > ---

Re: [Libguestfs] [PATCH 3/3] lib: Add support for creating nodes (keys) and values with UTF-16LE-encoded names

2013-11-25 Thread Richard W.M. Jones
On Sun, Nov 24, 2013 at 11:25:53PM +0100, Hilko Bengen wrote: > --- > lib/write.c | 49 ++--- > 1 file changed, 34 insertions(+), 15 deletions(-) > > diff --git a/lib/write.c b/lib/write.c > index dbb8292..72b1f8a 100644 > --- a/lib/write.c > +++ b/lib/

Re: [Libguestfs] supermin-helper: ext2: parent directory not found: /mnt/bigdata/var: File not found by ext2_lookup

2013-11-25 Thread Richard W.M. Jones
On Mon, Nov 25, 2013 at 05:32:23PM +0100, Gonzalo Aguilar Delgado wrote: > Hello, > > I've found a problem running libguestfs on my system. > > The system has /var mounted with a symbolic link to /mnt/bigdata/var > > > > root@red1:/var/log/nova# ls -ld /mnt/bigdata/var > drwxrwxr-x 15 root use

Re: [Libguestfs] [libguestfs] Problem Connecting to RBD images using Sys::Guestfs Perl Module

2013-11-25 Thread Richard W.M. Jones
On Mon, Nov 25, 2013 at 12:52:21PM -0700, Jon wrote: > Hello, > > I'm having trouble connecting to rbd images. It seems like somewhere the > name is getting chewed up. I wonder if this is related to my previous > troubles [1] [2] with rbd images. > > I'm trying to add an rbd image, but when I la

Re: [Libguestfs] [PATCH 3/3, take 2] lib: Add support for creating nodes (keys) and values with UTF-16LE-encoded names

2013-11-25 Thread Richard W.M. Jones
On Mon, Nov 25, 2013 at 10:56:07PM +0100, Hilko Bengen wrote: > --- > lib/write.c | 50 +++--- > 1 file changed, 35 insertions(+), 15 deletions(-) > > diff --git a/lib/write.c b/lib/write.c > index dbb8292..8c4dd8e 100644 > --- a/lib/write.c > +++ b/lib

Re: [Libguestfs] [PATCH 3/3] lib: Add support for creating nodes (keys) and values with UTF-16LE-encoded names

2013-11-25 Thread Richard W.M. Jones
On Mon, Nov 25, 2013 at 10:52:30PM +0100, Hilko Bengen wrote: > * Richard W.M. Jones: > > >> - nk->name_len = htole16 (strlen (name)); > >> - strcpy (nk->name, name); > >> + nk->name_len = htole16 (recoded_name_len); > >> + memcpy (nk-&

Re: [Libguestfs] [libguestfs] Problem Connecting to RBD images using Sys::Guestfs Perl Module

2013-11-25 Thread Richard W.M. Jones
On Mon, Nov 25, 2013 at 09:58:50PM +, Richard W.M. Jones wrote: > On Mon, Nov 25, 2013 at 12:52:21PM -0700, Jon wrote: > > Hello, > > > > I'm having trouble connecting to rbd images. It seems like somewhere the > > name is getting chewed up. I wonder i

Re: [Libguestfs] [libguestfs] Problem Connecting to RBD images using Sys::Guestfs Perl Module

2013-11-25 Thread Richard W.M. Jones
On Mon, Nov 25, 2013 at 04:12:40PM -0700, Jon wrote: > Hello Richard, > > I'm using: > > >> virt-sysprep 1.25.6 > > I honestly don't remember if the currently installed version is from the > tarball or pulled from the github source... Now that you mention it, I > think it could even be the vers

Re: [Libguestfs] [libguestfs] Problem Connecting to RBD images using Sys::Guestfs Perl Module

2013-11-26 Thread Richard W.M. Jones
On Tue, Nov 26, 2013 at 03:59:49AM -0700, Jon wrote: > How do you normally deal with that warning? The warning is just that, so it doesn't really matter at the moment. However you can configure libguestfs like this if you want to use a particular binary: ./configure --with-qemu="qemu-system-x86

Re: [Libguestfs] supermin-helper: ext2: parent directory not found: /mnt/bigdata/var: File not found by ext2_lookup

2013-11-26 Thread Richard W.M. Jones
On Tue, Nov 26, 2013 at 01:06:58PM +0100, Gonzalo Aguilar Delgado wrote: > Starting /init script ... > initctl: Unable to connect to Upstart: Failed to connect to socket > /com/ubuntu/upstart: Connection refused > /etc/init.d/udev: 290: /etc/init.d/udev: > /lib/udev/create_static_nodes: not found >

Re: [Libguestfs] supermin-helper: ext2: parent directory not found: /mnt/bigdata/var: File not found by ext2_lookup

2013-11-27 Thread Richard W.M. Jones
On Wed, Nov 27, 2013 at 12:14:49PM +0100, Gonzalo Aguilar Delgado wrote: > Is this on Ubuntu? You probably need to add this patch: > https://github.com/libguestfs/libguestfs/commit/ec6f9ee542e0e9ad0109a7522e83ea07b2f8a002 > Rich. > > Hi, > Yes it is. > I'm trying to find where to put this, but I'

Re: [Libguestfs] libguestfs >= 1.24 EL6 RPM?

2013-11-28 Thread Richard W.M. Jones
On Wed, Nov 27, 2013 at 11:59:41AM -0800, Keith Chambers wrote: > Before I start trying to build my own over the holiday I figured I asked ... > > Anyone have a >= 1.24 RPM/SRPM/SPEC+Patches for EL6? I don't. However a couple of observations: * Libguestfs from git does compile and run on RHEL 6

Re: [Libguestfs] [PATCH 3/3] inspect: improve detection of FreeBSD install discs

2013-11-28 Thread Richard W.M. Jones
On Thu, Nov 28, 2013 at 02:48:38PM +0100, Pino Toscano wrote: > Check for /boot/loader.rc as "install disc" detection, using it to mark > FreeBSD install discs. > Also, check for /mfsroot.gz to see whether such disc is also a live one. > > See also RHBZ#1033207. > --- > src/inspect-fs-cd.c | 19 +

Re: [Libguestfs] [PATCH 3/3, v2] inspect: improve detection of FreeBSD install discs

2013-11-28 Thread Richard W.M. Jones
On Thu, Nov 28, 2013 at 03:49:14PM +0100, Pino Toscano wrote: > Check for /boot/loader.rc as "install disc" detection, using it to mark > FreeBSD install discs. > Also, check for /mfsroot.gz to see whether such disc is also a live one. As this fixes RHBZ#1033207, I changed the summary line to incl

[Libguestfs] Use of qemu-kvm command line arguments in libguestfs (was: Re: Fwd: ...)

2013-12-02 Thread Richard W.M. Jones
[Moving this thread over to the public mailing list] On Mon, Dec 02, 2013 at 01:17:09AM +0100, Pino Toscano wrote: > On Friday 29 November 2013 18:53:38 you wrote: > > > > I'm marking options with NONE (not used at all), or M (used in > > > > master) and/or RH7 (used in rhel-7.0). > > > > > > > >

[Libguestfs] Regression testing inspection code

2013-12-02 Thread Richard W.M. Jones
[Continuing a discussion we had on IRC last week ...] How to create meaningful regression tests for the inspection code? We'd like developers to be able to test that changes to the inspection code don't break inspection of existing guests. We might not be able to run these tests routinely, and we

Re: [Libguestfs] Regression testing inspection code

2013-12-02 Thread Richard W.M. Jones
On Mon, Dec 02, 2013 at 01:33:53PM +, Matthew Booth wrote: > On Mon, 2013-12-02 at 13:23 +0000, Richard W.M. Jones wrote: > > [Continuing a discussion we had on IRC last week ...] > > > > How to create meaningful regression tests for the inspection code? > > We'

Re: [Libguestfs] Using guestfs to debug kernel

2013-12-03 Thread Richard W.M. Jones
On Tue, Dec 03, 2013 at 06:05:24PM +0100, Teto wrote: > Hi, > > I would like to use libguestfs to help me setup a VM that I run later > with qemu to debug my linux kernel (via qemu -kernel > -append ...). > One problem I face for instance is that my VM lacks the modules > matching my kernel versi

Re: [Libguestfs] [PATCH] builder: translate more user-visible strings

2013-12-04 Thread Richard W.M. Jones
On Wed, Dec 04, 2013 at 03:34:46PM +0100, Pino Toscano wrote: > Translate also the "OS version" and "Notes" strings that appear in the > --long output. > --- > builder/list_entries.ml | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/builder/list_entries.ml b/builder/li

Re: [Libguestfs] dump VBR of a VM image's partition

2013-12-04 Thread Richard W.M. Jones
On Wed, Dec 04, 2013 at 06:33:12PM +, adrelanos wrote: > Hi, > > can you tell me please, how to dump the volume boot record of a VM > image's partition? So it's similar to my answer here: https://www.redhat.com/archives/libguestfs/2013-November/msg00092.html what you would do is change /d

Re: [Libguestfs] [PATCH 2/3] po: fix dependencies for libguestfs.pot extraction

2013-12-05 Thread Richard W.M. Jones
On Thu, Dec 05, 2013 at 04:30:05PM +0100, Pino Toscano wrote: > Fix the dependencies of the libguestfs.pot target: other than using the > right make variables holding the contents of the POTFILES, depend also > on the POTFILES themselves. > --- > po/Makefile.am | 2 +- > 1 file changed, 1 insertio

Re: [Libguestfs] [PATCH 3/3] fish: improve the command error messages

2013-12-05 Thread Richard W.M. Jones
On Thu, Dec 05, 2013 at 04:30:06PM +0100, Pino Toscano wrote: > - when a command needs no parameters, tell that explicitly instead of > "command should have 0 parameters" > - use gettext's plural form when printing the number of required > arguments > - improve the error message for a variable

Re: [Libguestfs] [PATCH 1/3] po: fix broken message extraction

2013-12-05 Thread Richard W.M. Jones
On Thu, Dec 05, 2013 at 04:30:04PM +0100, Pino Toscano wrote: > Extracting separately the pot for the various languages and then > creating manually the global pot (by manually joining the above ones > after having stripped their headers) is wrong, since other than being > an hack it can create an

Re: [Libguestfs] [PATCH 2/3] po: fix dependencies for libguestfs.pot extraction

2013-12-05 Thread Richard W.M. Jones
On Thu, Dec 05, 2013 at 07:02:28PM +0100, Pino Toscano wrote: > On Thursday 05 December 2013 15:53:58 Richard W.M. Jones wrote: > > On Thu, Dec 05, 2013 at 04:30:05PM +0100, Pino Toscano wrote: > > > Fix the dependencies of the libguestfs.pot target: other than using > > &g

[Libguestfs] [PATCH] launch: direct: Pass -enable-fips option if qemu supports it.

2013-12-05 Thread Richard W.M. Jones
From: "Richard W.M. Jones" --- src/launch-direct.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/launch-direct.c b/src/launch-direct.c index f06bb23..58e4b1a 100644 --- a/src/launch-direct.c +++ b/src/launch-direct.c @@ -328,6 +328,13 @@ launch_direct (guestfs_h *g, v

Re: [Libguestfs] [PATCH] builder: adapt test-virt-builder-list.sh output expectation

2013-12-06 Thread Richard W.M. Jones
On Fri, Dec 06, 2013 at 03:00:41PM +0100, Pino Toscano wrote: > ee0e56f43e55307fefa1d04505ed6477d604d220 slightly changes the output of > --list but test-virt-builder-list.sh has not been updated accordingly. > > Adapting the expected output makes test-virt-builder-list.sh pass again. > -os-versi

Re: [Libguestfs] [PATCH] builder: translate more user-visible strings

2013-12-06 Thread Richard W.M. Jones
On Fri, Dec 06, 2013 at 02:58:27PM +0100, Pino Toscano wrote: > On Wednesday 04 December 2013 15:34:46 Pino Toscano wrote: > > Translate also the "OS version" and "Notes" strings that appear in the > > --long output. > > --- > > builder/list_entries.ml | 4 ++-- > > 1 file changed, 2 insertions(+)

Re: [Libguestfs] Use of qemu-kvm command line arguments in libguestfs (was: Re: Fwd: ...)

2013-12-06 Thread Richard W.M. Jones
On Fri, Dec 06, 2013 at 05:26:58PM +0100, Pino Toscano wrote: > On Monday 02 December 2013 09:09:44 Richard W.M. Jones wrote: > > On Mon, Dec 02, 2013 at 01:17:09AM +0100, Pino Toscano wrote: > > > On Friday 29 November 2013 18:53:38 you wrote: > > > > > > I&#

Re: [Libguestfs] [PATCH 2/2] Fix virt-builder tests for out-of-tree build

2013-12-07 Thread Richard W.M. Jones
On Sat, Dec 07, 2013 at 07:33:46PM +0100, Hilko Bengen wrote: > --- > builder/test-virt-builder-list.sh | 4 ++-- > builder/test-virt-builder.sh | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/builder/test-virt-builder-list.sh > b/builder/test-virt-builder-list

Re: [Libguestfs] [PATCH] sysprep: remove more anaconda and tuned logs (RHBZ#1039540).

2013-12-09 Thread Richard W.M. Jones
On Mon, Dec 09, 2013 at 04:19:10PM +0100, Pino Toscano wrote: > --- > sysprep/sysprep_operation_logfiles.ml | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/sysprep/sysprep_operation_logfiles.ml > b/sysprep/sysprep_operation_logfiles.ml > index 8994af9..3055ca4 100644 > --- a/sysprep/

Re: [Libguestfs] [PATCH] launch: switch from -nographic to -display none

2013-12-09 Thread Richard W.M. Jones
On Mon, Dec 09, 2013 at 04:19:11PM +0100, Pino Toscano wrote: > The latter is a better way to disable the qemu display output as we > need to, without enabling extra devices (which are disabled already, > anyway). > > Also, related to the change above, ban the -display parameter from the > ones th

Re: [Libguestfs] [PATCH] sysprep: allow to specify globbing for --delete

2013-12-09 Thread Richard W.M. Jones
On Mon, Dec 09, 2013 at 04:19:12PM +0100, Pino Toscano wrote: > Adapt the globbing part from the old --remote-path work previously > proposed for sysprep [1], allowing --delete to perform globbing when > deleting paths. > > [1] https://www.redhat.com/archives/libguestfs/2013-October/msg00045.html

Re: [Libguestfs] [PATCH] sysprep: mention globbing in help for --delete

2013-12-09 Thread Richard W.M. Jones
On Mon, Dec 09, 2013 at 06:17:00PM +0100, Pino Toscano wrote: > Followup of ed4bcb119cb908e98ecc1107dcd8b740ee2f484f. > --- > sysprep/sysprep_operation_delete.ml | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/sysprep/sysprep_operation_delete.ml > b/sysprep/sysprep_o

Re: [Libguestfs] [PATCH] sysprep: mention globbing in help for --delete

2013-12-09 Thread Richard W.M. Jones
On Mon, Dec 09, 2013 at 07:40:44PM +0100, Pino Toscano wrote: > Followup of ed4bcb119cb908e98ecc1107dcd8b740ee2f484f. > --- > sysprep/sysprep_operation_delete.ml | 7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/sysprep/sysprep_operation_delete.ml > b/sysprep/sysprep

Re: [Libguestfs] [PATCH] lib: fix newline in error output

2013-12-09 Thread Richard W.M. Jones
On Mon, Dec 09, 2013 at 08:13:19PM +0100, Pino Toscano wrote: > See also RHBZ#923355. > --- > src/actions-support.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/actions-support.c b/src/actions-support.c > index d0e3e67..00d8cdc 100644 > --- a/src/actions-support.c

Re: [Libguestfs] Error in chunked encoding

2013-12-10 Thread Richard W.M. Jones
On Mon, Dec 09, 2013 at 09:17:28PM -0500, Chris Lalancette wrote: > Hello, > Oz is a program that does automated installation of virtual > machines. It is written in python and uses libguestfs pretty heavily > to manipulate ISOs and disks. > Someone reported an error against Oz here: >

[Libguestfs] [PATCH 2/2] proto: Remove another error message which hides earlier error.

2013-12-10 Thread Richard W.M. Jones
From: "Richard W.M. Jones" When receive_file_data calls guestfs___recv_from_daemon, and that function returns -1, it adds the following error to the handle: receive_file_data: parse error in reply callback However this hides a more specific error message which was alread

[Libguestfs] [PATCH 0/2] proto: Remove a couple of errors which hide earlier errors.

2013-12-10 Thread Richard W.M. Jones
The handle can only store one error, so if an error path has more than one call to error/perrorf, then the earlier error will be lost and overwritten by the later one. Fix two (more) cases of this. Rich. ___ Libguestfs mailing list Libguestfs@redhat.co

[Libguestfs] [PATCH 1/2] proto: Remove error message which hides earlier error.

2013-12-10 Thread Richard W.M. Jones
From: "Richard W.M. Jones" When chunked encoding fails, the following error is added to the handle: [filename]: error in chunked encoding However all paths returning -1 from receive_file_data already set a more specific error, which this error hides. --- src/proto.c | 1 - 1 file

Re: [Libguestfs] [PATCH 3/3] Create empty files to be edited by xgettext

2013-12-10 Thread Richard W.M. Jones
On Mon, Dec 09, 2013 at 08:52:35PM +0100, Hilko Bengen wrote: > This avoids: > > xgettext: error while opening "libguestfs.pot-t" for reading: No such > file or directory > > which I observed with xgettext (GNU gettext-tools) 0.18.3 > --- > po/Makefile.am | 1 + > 1 file changed, 1 insertio

[Libguestfs] [PATCH] daemon: mkfs: Use -I option to force mkfs.fat to write a filesystem over a whole device (RHBZ#1039995).

2013-12-10 Thread Richard W.M. Jones
From: "Richard W.M. Jones" If you use virt-make-fs to create a partitionless FAT-formatted disk image then currently you will get an error: $ virt-make-fs --type=fat . /tmp/test.img 'mkfs' (create filesystem) operation failed. Instead of 'fat', try 'vfat&

Re: [Libguestfs] [PATCH] fuse: provide a stub "flush" implementation (RHBZ#660687).

2013-12-12 Thread Richard W.M. Jones
On Thu, Dec 12, 2013 at 04:28:31PM +0100, Pino Toscano wrote: > It seems that FUSE can invoke flush to make sure the pending changes > (e.g. to the attributes) of a file are set. Since a missing flush > implementation is handled as if it were returning ENOSYS, this can cause > issues later. > > To

Re: [Libguestfs] [PATCH 1/2] golang: Fix for out-of-tree builds

2013-12-13 Thread Richard W.M. Jones
On Fri, Dec 13, 2013 at 12:00:12AM +0100, Hilko Bengen wrote: > --- > configure.ac | 2 +- > golang/Makefile.am | 2 ++ > 2 files changed, 3 insertions(+), 1 deletion(-) > > diff --git a/configure.ac b/configure.ac > index 4e2bc65..9abec95 100644 > --- a/configure.ac > +++ b/configure.ac >

Re: [Libguestfs] [PATCH 2/2] golang: Don't run launch test if appliance has not been built.

2013-12-13 Thread Richard W.M. Jones
On Fri, Dec 13, 2013 at 12:00:13AM +0100, Hilko Bengen wrote: > --- > golang/Makefile.am | 7 ++- > golang/src/libguestfs.org/guestfs/guestfs_100_launch_test.go | 2 ++ > 2 files changed, 8 insertions(+), 1 deletion(-) > > diff --git a/golang/Makefile

Re: [Libguestfs] [PATCH] sysprep: remove some Pegasus files, like certs (RHBZ#1041552).

2013-12-13 Thread Richard W.M. Jones
On Fri, Dec 13, 2013 at 11:06:10AM +0100, Pino Toscano wrote: > --- > sysprep/sysprep_operation_logfiles.ml | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/sysprep/sysprep_operation_logfiles.ml > b/sysprep/sysprep_operation_logfiles.ml > index 3055ca4..2558af1 100644 > --- a/sysp

Re: [Libguestfs] [PATCH] drives: add CD-ROM disk images as read-only drives (RHBZ#563450).

2013-12-14 Thread Richard W.M. Jones
On Fri, Dec 13, 2013 at 04:32:49PM +0100, Pino Toscano wrote: > The current add_cdrom way basically appends a new raw "-cdrom /path" > parameter to the qemu invocation (even when using libvirt as backend), > hence such images are seen as "CD-ROM drives" inside the appliance. > However, there is no

Re: [Libguestfs] Convert bootable raw hdd image to bootable iso?

2013-12-14 Thread Richard W.M. Jones
On Sat, Dec 14, 2013 at 10:57:16PM +, adrelanos wrote: > Hi, > > is it possible to convert a bootable raw hdd image including grub > (originally created with grml-debootstrap) to a bootable iso somehow? Creating a bootable ISO is tricky. You'll probably want to use 'genisoimage'. That's out

  1   2   3   4   5   6   7   8   9   10   >