[libvirt] Sharing file between host and guest

Richard W.M. Jones rjones at redhat.com
Fri Sep 12 09:29:52 UTC 2008

On Thu, Sep 11, 2008 at 02:35:22PM -0700, Yushu Yao wrote:
>     Network based file sharing (NFS/Samba) are limited by the speed of the
> virtual network interfaces. Maybe one can do it through USB?

If you're using virtio or PV drivers, then the speed of the virtual
network interface is essentially limited by the speed of communication
between host and guest kernels.  Usually some form of ring of shared
memory buffers is used.  No other communication method can possibly be
any faster, so then you'd be looking at whether the network protocol
itself (ie. NFS) was itself efficient, and NFS has gone through enough
inspection and tuning that it's hard to see that you could do better
with a custom protocol written from scratch.

So I would conclude: (1) Install virtio or PV drivers.  (2) Stick with
a network file sharing protocol that you're familiar with.  (3) Test
both the speed of the virtual network interface and the file sharing
protocol.  (4) Use standard methods to tune both until you reach an
acceptable speed.


Richard Jones, Emerging Technologies, Red Hat  http://et.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.

More information about the libvir-list mailing list