qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] nbd-server / monitor to copy files/directory in to runn


From: Daniel P. Berrange
Subject: Re: [Qemu-devel] nbd-server / monitor to copy files/directory in to running VM.
Date: Wed, 29 Oct 2014 15:35:44 +0000
User-agent: Mutt/1.5.23 (2014-03-12)

On Wed, Oct 29, 2014 at 03:20:28PM +0000, Stefan Hajnoczi wrote:
> On Tue, Oct 28, 2014 at 10:02:21AM -0700, Jd wrote:
> >   qemu monitor seems to have command to open, write, close commands. I tried
> > them and I could create a file (after going through encoding). How can I
> > create a directory using this ?
> 
> Do you mean the code in qga/?  That is the QEMU guest agent.  It does
> not have a command to create directories.
> 
> >   I read little bit about live-guestfs, but it needs another agent in to the
> > VM. Also, is this ready for prime time ? Any plans to have this in the qemu
> > guest agent. This way we dont have to have multiple agents required in the
> > guest.
> 
> live-guestfs?  Never heard of it.
> 
> Do you mean libguestfs?  That's a tool for disk image manipulation.
> Very powerful but works on offline guest disk images.  It does not work
> while the guest is running.

Regular libguestsfs will run against an live guest, but it restricts
itself to readonly mode in that case since you can't modify disks behind
the back of the guest OS, or QEMU itself.

libguestfs does have a mode where it *can* run against a live guest. You
need to install the libguestfs daemon in the guest and setup a virtio-serial
channel in your guest so it can safely access the guest that way:

  http://rwmj.wordpress.com/2011/07/06/libguestfs-live/

The QEMU NBD server won't be much help with this though. The NBD server
in QEMU is still running behind the back of the guest OS, so it must
only export the disks in read-only mode.  If the QEMU NDB server were
to export in read-write mode, any writes would corrupt the disks from
the POV of the guest OS.  Also the libguestfs daemon always *wants* to
be inside a guest, because it relies on Linux kernel to access the
various filesystems. So even in read-only mode QMEU NBD server doesn't
really do anything immediately useful for libguestfs vs current state
of its code.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|



reply via email to

[Prev in Thread] Current Thread [Next in Thread]