Re: [Libguestfs] guestmount error
On Fri, Nov 04, 2011 at 08:57:27PM +0200, Evaggelos Balaskas wrote:
sorry for bothering you, but if you gimme some pointers it would be great
# file /vm/images/archlinux/archlinux.qcow2 /vm/images/archlinux/archlinux.qcow2: QEMU QCOW Image (v2), 5368709120 bytes
# ls -la /mnt/ total 8 drwxr-xr-x 2 root root 4096 Oct 26 15:31 . drwxr-xr-x 24 root root 4096 Oct 14 13:27 ..
# guestmount -a /vm/images/archlinux/archlinux.qcow2 -i /mnt/
warning: Unable to get device geometry for /var/tmp/guestfs.jmCrFb/root libguestfs: error: aug_init: do_aug_init: function not available
What version of libguestfs and what host are you running it on? You could try a couple of things: (1) Use: virt-filesystems -a /vm/images/archlinux/archlinux.qcow2 --all --long -h to list out the filesystems in the image, then try mounting them manually, as in this example, note the -m options which you will need to adjust according to the output of virt-filesystems: guestmount -a /vm/images/archlinux/archlinux.qcow2 \ -m /dev/vg/lv:/ -m /dev/sda1:/boot \ /mnt (The error message indicates you are lacking Augeas, which we use to examine the disk image for the right mountpoints, so you'd have to do that by hand.) (2) Set the following envionment variables and run the original guestmount command again: export LIBGUESTFS_DEBUG=1 export LIBGUESTFS_TRACE=1 Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
First of all, thank you for your immediate answer. Truly impressed! Latest stable version febootstrap-3.12 hivex-1.3.2 libguestfs-1.14.1 archlinux.qcow2 has only 2 partitions /dev/sda1 ---> / (ext4) /dev/sda2 ---> swap This command worked perfectly: # guestmount -a /vm/images/archlinux/archlinux.qcow2 -m /dev/sda1 --ro /mnt/ I am going to check about libaugeas. Thanks for the debug/trace env variables. Plz keep up with the extraordinary work of yours. -- Evaggelos Balaskas Unix System Engineer - http://ebalaskas.gr.
On Fri, Nov 04, 2011 at 09:41:00PM +0200, Evaggelos Balaskas wrote:
I am going to check about libaugeas. Thanks for the debug/trace env variables.
The error certainly indicated that libguestfs might have been built without augeas. Augeas is optional. But because we use augeas to examine Linux guest configuration files, a lot of the inspection code is disabled or operates in "degraded mode" when augeas isn't around, and that's why the -i/--inspector option didn't work. Code reference: http://git.annexia.org/?p=libguestfs.git;a=blob;f=src/inspect_fs_unix.c;h=6b... http://git.annexia.org/?p=libguestfs.git;a=blob;f=src/inspect_fs_unix.c;h=6b... 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 F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
That WAS the problem. Thanks again. Case Closed -- Evaggelos Balaskas Unix System Engineer - http://ebalaskas.gr.
participants (2)
-
Evaggelos Balaskas -
Richard W.M. Jones