[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] guestmount issues with --live, but guestfish works just fine



On Sat, Oct 08, 2011 at 03:01:02AM -0500, Adam Miller wrote:
> Hello all,
>     I am having an issue with guestmount in respect to live instances
> and I was hoping someone might have an idea where I've gone wrong. The
> following output is from my shell session, if there's any more
> information needed please let me know and I'll happily provide it.
> 
> [root longitude ~]# virt-filesystems -d F16-rawhide
> /dev/sda2
> /dev/sda3
> [root longitude ~]# guestmount --live -d F16-rawhide -m /dev/sda3:/
> /mnt/guestfs/
> libguestfs: error: mount_options: /dev/vda3 on /: mount: /dev/vda3
> already mounted or / busy
> mount: according to mtab, /dev/vda3 is already mounted on /
> libguestfs: error: part_to_dev: part_to_dev_stub: /dev/vda3: device not
> found
> libguestfs: error: check_for_daemon_cancellation_or_eof: read 0x34 from
> daemon, expected 0xffffeeee
> 
> guestmount: '/dev/sda3' could not be mounted.  Did you mean one of
> these?
>         /dev/vda1 (unknown)
>         /dev/vda2 (unknown)
>         /dev/vda3 (unknown)
>         /dev/vda4 (unknown)
> libguestfs: error: check_for_daemon_cancellation_or_eof: read 0x0 from
> daemon, expected 0xffffeeee

Yeah, I can sort of see what's going on here.  I think it reflects the
fact that --live support is not very well integrated with guestmount
at the moment.  Because this is a live connection, filesystems are
already mounted (inside the running guest) so you don't need the -m
option at all.  Unfortunately a bug in guestmount prevents you from
not using the -m option:

  $ guestmount --live -d FedoraRawhidex64 /tmp/mnt
  guestmount: must have at least one -a/-d and at least one -m/-i option

So at the moment without fixing that bug, it's not possible.

I'd be careful with using live support right now.  There are a few
corner cases where it doesn't behave very well.  In particular there
are two API calls that try to edit /etc files (OK in the appliance,
not so great for live guests):

  $ git grep /etc daemon
  daemon/findfs.c:  unlink ("/etc/blkid/blkid.tab");
  daemon/lvm-filter.c:/* Rewrite the 'filter = [ ... ]' line in /etc/lvm/lvm.conf.
  daemon/lvm-filter.c:  FILE *ifp = fopen ("/etc/lvm/lvm.conf", "r");
  daemon/lvm-filter.c:    reply_with_perror ("open: /etc/lvm/lvm.conf");
  daemon/lvm-filter.c:  FILE *ofp = fopen ("/etc/lvm/lvm.conf.new", "w");
  daemon/lvm-filter.c:    reply_with_perror ("open: /etc/lvm/lvm.conf.new");
  daemon/lvm-filter.c:      reply_with_error ("/etc/lvm/lvm.conf.new: write failed
  daemon/lvm-filter.c:      unlink ("/etc/lvm/lvm.conf.new");
  daemon/lvm-filter.c:    reply_with_perror ("/etc/lvm/lvm.conf.new");
  daemon/lvm-filter.c:    unlink ("/etc/lvm/lvm.conf.new");
  daemon/lvm-filter.c:    reply_with_perror ("/etc/lvm/lvm.conf.new");
  daemon/lvm-filter.c:    unlink ("/etc/lvm/lvm.conf.new");
  daemon/lvm-filter.c:  if (rename ("/etc/lvm/lvm.conf.new", "/etc/lvm/lvm.conf") 
  daemon/lvm-filter.c:    reply_with_perror ("rename: /etc/lvm/lvm.conf");
  daemon/lvm-filter.c:    unlink ("/etc/lvm/lvm.conf.new");
  daemon/lvm-filter.c:  unlink ("/etc/lvm/cache/.cache");
  daemon/mount.c:/* Again, use the external /bin/umount program, so that /etc/mt

You need to be cautious with live support and know what you're doing.

> [root longitude ~]# guestmount --live -d F16-rawhide -m /dev/vda3:/
> /mnt/guestfs/
> libguestfs: error: mount_options: mount_options_stub: /dev/vda3: device
> not found
> libguestfs: error: unexpected procedure number (74/7)
> libguestfs: error: unexpected procedure number (7/282)

This error is because there is some sort of incompatibility in the
protocol between the two versions of libguestfs being used.  Again,
since live support is still being developed, we haven't (yet) made the
protocol stable and compatible between versions.

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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]