guestfs-examples
by Khan Ferdous Wahid
Hi,
I tried to run the guestfs-examples from
http://libguestfs.org/guestfs-examples.3.html, but they gave the following
warnings and errors-
#warning: Unable to get device geometry for /var/tmp/guestfs.JVxEUn/root
#libguestfs: error: guestfs_launch failed, see earlier error messages
What I did from the beginning- I boot my debian linux (2.6.32-5-686) inside
VirtualBox and then install following packages there-
#apt-get install qemu libguestfs-dev libguestfs-tools
Then I created an image and install debian using qemu (inside my linux in
VirtualBox, i.e. host)-
#qemu-img create -f qcow2 deb.img 4G
#qemu -m 256 -hda deb.img -cdrom debian-6.0.7-i386-netinst.iso -boot d
Then I ran the vm using qemu in one terminal (inside my linux in
VirtualBox, i.e. host)-
#qemu -m 256 -hda deb.img -boot d
In another terminal, I did-
#gcc -Wall inspect_vm.c -o prog -lguestfs (without any warnings)
#./prog deb.img
Then the above warnings and errors were generated.
Also I shutdown the vm, and tried to inspect the offline VM image (./prog
deb.img), but it gaves the error-
#libguestfs: error: guestfs_launch failed, see earlier error messages
I tried to run the "EXAMPLE: DISPLAY THE OPERATING SYSTEM ICON OF A GUEST",
but it gaves the same error-
#libguestfs: error: guestfs_launch failed, see earlier error messages
What is the problem here?
Thank you.
Best regards,
Wahid
11 years, 8 months
Fwd: [Bug 916990] inspect_os: mount_ro: /dev/sda on / (options: 'ro'): mount: /dev/sda is already mounted or /sysroot busy
by Richard W.M. Jones
More evidence this is a real bug affecting users. I still have no
idea why this bug happens.
Rich.
----- Forwarded message from bugzilla(a)redhat.com -----
Date: Tue, 05 Mar 2013 20:29:23 +0000
Subject: [Bug 916990] inspect_os: mount_ro: /dev/sda on / (options: 'ro'):
mount: /dev/sda is already mounted or /sysroot busy
Product: Virtualization Tools
https://bugzilla.redhat.com/show_bug.cgi?id=916990
Joe Ryner changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jryner(a)cait.org
--- Comment #1 from Joe Ryner <jryner(a)cait.org> ---
I had the same error and am providing the trace below. Fedora 18 latest update
as of 3/5/13
stone-v4: 100% [=====================================================]D
0h54m39s
libguestfs: trace: set_attach_method "appliance"
libguestfs: trace: set_attach_method = 0
libguestfs: trace: add_drive "/var/lib/libvirt/images/stone-v4" "format:raw"
"iface:ide" "name:xvda"
libguestfs: trace: add_drive = 0
libguestfs: trace: add_drive "/tmp/PKKXoKFY2u" "readonly:true" "format:raw"
"iface:ide"
libguestfs: trace: add_drive = 0
libguestfs: trace: set_network true
libguestfs: trace: set_network = 0
libguestfs: trace: launch
libguestfs: trace: get_tmpdir
libguestfs: trace: get_tmpdir = "/tmp"
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
libguestfs: trace: launch = 0
libguestfs: trace: list_devices
libguestfs: trace: list_devices = ["/dev/sda", "/dev/sdb"]
libguestfs: trace: inspect_os
libguestfs: trace: umount_all
libguestfs: trace: umount_all = 0
libguestfs: trace: list_devices
libguestfs: trace: list_devices = ["/dev/sda", "/dev/sdb"]
libguestfs: trace: vfs_type "/dev/sda"
libguestfs: trace: vfs_type = ""
libguestfs: trace: isoinfo_device "/dev/sda"
libguestfs: trace: isoinfo_device = NULL (error)
libguestfs: trace: mount_ro "/dev/sda" "/"
libguestfs: trace: mount_ro = -1 (error)
libguestfs: trace: vfs_type "/dev/sdb"
libguestfs: trace: vfs_type = "iso9660"
libguestfs: trace: isoinfo_device "/dev/sdb"
libguestfs: trace: isoinfo_device = <struct guestfs_isoinfo *>
libguestfs: trace: inspect_os = NULL (error)
libguestfs: trace: close
libguestfs: trace: internal_autosync
libguestfs: trace: internal_autosync = 0
inspect_os: mount_ro: /dev/sda on / (options: 'ro'): mount: /dev/sda is already
mounted or /sysroot busy at
/usr/share/perl5/vendor_perl/Sys/VirtConvert/GuestfsHandle.pm line 194.
at /usr/bin/virt-v2v line 672.
--
You are receiving this mail because:
You reported the bug.
----- End forwarded message -----
--
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#)
11 years, 8 months
Some fixes for building the Debian package for 1.20.2
by Hilko Bengen
I needed to add a few patches to be able to build libguestfs 1.20.2
out of tree. Mostly srcdir/builddir issues -- I think that I had
posted something for building the daemon before.
As mentioned on IRC, I found that compiling (Ruby bindings) caused
config.h file shipped with the Ruby headers to be included rather than
${builddir}/config.h. This can be fixed because the relevant checks
can be performed in the extconf.rb script as well.
Cheers,
-Hilko
11 years, 8 months
[PATCH] fuse: Add guestmount-cleanup program to handle unmounting (RHBZ#916780).
by Richard W.M. Jones
* PATCH FOR DISCUSSION ONLY - NOT TO BE APPLIED *
Colin suggested something which seems eminently sensible:
https://bugzilla.redhat.com/show_bug.cgi?id=916780
I've been through a couple of rounds of trying to implement this.
I started with adding the option as suggested to the guestmount
program, but it tended to make the guestmount program more complex.
More importantly, adding the option only to guestmount means that it
cannot be used outside guestmount, specifically by programs that use
the mount-local API[1] directly. (For various reasons
'guestfs_umount_local' isn't a usable API in most situations).
My second implementation is the patch attached. It adds a new program
called guestmount-cleanup which can be used two ways:
guestmount-cleanup --fd=<FD> mountpoint
where it will monitor the pipe file descriptor <FD>. (I should note
that I've never actually tested this code path).
Or:
guestmount-cleanup mountpoint
where it immediately unmounts the mountpoint. In both cases it deals
with fusermount retries.
The patch is still large and clunky and it doesn't make FUSE that much
easier to cope with.
I suspect the way to go from here is to reimplement fusermount itself.
It would, for example, be much better if we could get some information
from fusermount about why it failed. That seems like a good idea
until I tell you that fusermount is a setuid program and needs those
privs even when dealing with a regular non-root FUSE mount. So we
pretty much have to use it, so I'll have to send patches for it.
It may also be that we're going about this all wrong and we should use
CLONE_NS (which also requires root -- currently) to stop these
systemwide daemons from interfering.
Rich.
[1] http://libguestfs.org/guestfs.3.html#mount-local
11 years, 8 months
Guestconv library and python worker process
by Crag Wolfe
Per conversation last week with Rich and Matt, while we want to have a
Guestconv C API which is relatively easy to bind to across different
languages, for the sake of expediency we want to the do the actual work
in Python.
The idea is that the C API will spawn a python process when
guestconv_create is called and ultimately be responsible for terminating
the process. Communication between the two process happens over pipe(2).
From the Python perspective, we will simply listen on stdin for
"commands" (there will be a command per API call: guestconv_add_drive,
guestconv_root, and guestconv_convert) and write the results to stdout.
Does that sound good to the list? Of course, we'll need to define what
exactly what the stdin/stdout interface looks like, but that will be
straightforward given the C API.
Thanks,
--Crag
Ref: https://www.redhat.com/archives/libguestfs/2013-February/msg00107.html
11 years, 8 months
virt-v2v F18 guest on F18 failure
by Ryan Barry
Run with LIBGUESTFS_ATTACH_METHOD=appliance
Fails with:
inspect_os: mount_ro: /dev/sda on / (options: 'ro'): mount: /dev/sda is already mounted or /sysroot busy at
/usr/share/perl5/vendor_perl/Sys/VirtConvert/GuestfsHandle.pm line 194.
virt-inspector works as expected
libguestfs-test-tool.log: http://pastebin.ca/2317900
virt-v2v.log: http://iaindb.pastebin.ca/2317938
Any suggestions?
--
while (!asleep) {sheep++;}
11 years, 9 months