As with Rich, I was thinking of using rsync entirely within the guestfs appliance, ie
syncing between two internally mounted filesystem.
Though, syncing with an external system is an interesting use case...
Thanks for the pointers on submitting patches. I hope to have some time in the next couple
of weeks to try adding rysnc.
-Chris
________________________________
From: Richard W.M. Jones <rjones(a)redhat.com>
To: Tim Potter <tpot(a)hp.com>
Cc: Chris Willmore <chris.willmore(a)yahoo.com>; "libguestfs(a)redhat.com"
<libguestfs(a)redhat.com>
Sent: Thursday, May 26, 2011 10:41 AM
Subject: Re: [Libguestfs] rsync support
On Thu, May 26, 2011 at 10:48:19AM +1000, Tim Potter wrote:
On Tue, 2011-05-24 at 22:12 +0100, Richard W.M. Jones wrote:
> On Tue, May 24, 2011 at 12:59:50PM -0700, Chris Willmore wrote:
> > Has an rsync addition to libguestfs been considered? It would be
> > great to have when copying the contents of a filesystem to a disk of
> > a different filesystem. It could also be used to keep portions of
> > cloned machines in sync. For example, I'm porting VirtualBox images
> > to Xen. I sometimes make change to the source image that I would
> > like to easily propagate to the Xen copy. DD is sometimes a bit too
> > low-level.
>
> I think this makes sense. As a matter of getting changes in
> libguestfs it's better to propose patches and APIs. You could test
> this out by adding rsync to appliance/packagelist.in, and then adding
> some APIs to libguestfs (see [0] and example [1]). Post the patches
> here and we can review them.
Can I put in a vote for rsync as well? I think it would be a very
useful addition to guestfs.
I'm not sure how a streaming network protocol like rsync is going to fit
in to guestfs's command/response protocol though. A generic method for
forwarding TCP to qemu (host? guest? what's it called?) might be good,
and also allow other commands that are implemented over a TCP/IP
transport to be added as well.
I was thinking of rsync as a useful replacement for guestfs_dd or
guestfs_cp_a.
If you need to stream to and from the host over TCP then you're going
to have additional problems because QEMU's user network support is not
very high performance and has lots of other configuration problems.
See guestfs_set_network.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v