[fedora-virt] libguestfs best practices: Exposing files from the host for the duration of a session

Richard W.M. Jones rjones at redhat.com
Fri May 29 06:27:35 UTC 2009


On Fri, May 29, 2009 at 12:38:46AM -0400, Michael Ansel wrote:
> On Thu, May 28, 2009 at 8:19 PM, Charles Duffy <charles at dyfis.net> wrote:
> > I have a rather large set of RPMs and such on my host I want to install on
> > my guest using libguestfs. The normal way to do this would be to upload the
> > package(s), install them, then (optionally) remove the RPMs.
> >
> > However, I don't particularly want to bloat the qcow2 file with the changes
> > made via uploading files which are only going to be deleted when no longer
> > in use. Someday (*sigh*) we'll have 9p-over-virtio support built into qemu;
> > until then, a few ways to get around this present themselves:
> >
> 
> 
> What about setting up a temporary NFS export on the host and mounting
> that on the guest? I've done installs using yum/rpm directly from the
> NFS mount, eliminating the need to ever copy the RPMs into anything
> more than working memory. If network security is an issue, I'm sure
> you could use a combination of iptables rules and NFS export options
> to limit access to that single box as well (though, I haven't done
> that one).

The original libguestfs plan was to use NFS for all file transfers.
The reason why we don't intend to do this anymore is twofold: NFS
requires root on the host side, and NFS requires either matching UIDs
or complex UID-UID mappings.  If we were going to implement any
protocol, it'd be FTP, because FTP clients are common, can be run
non-root, and don't need complicated UID mappings.

Rich.

-- 
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.
http://et.redhat.com/~rjones/virt-p2v




More information about the Fedora-virt mailing list