[fedora-virt] Directory Passthrough

Robert Locke lists at ralii.com
Sun Mar 16 23:17:00 UTC 2014


On Sun, 2014-03-16 at 16:34 +0000, Richard W.M. Jones wrote:
> On Sat, Mar 15, 2014 at 05:29:16PM -0400, Robert Locke wrote:
> > Looking for some recommendations as to when directory passthrough
> > started working or will become available.
> > 
> > I would like to read-only mount a directory from the host (inside the
> > guest). Technically looking to do this in RHEL 7, but just curious as to
> > the proper virsh define xml to make it happen.
> 
> I'm fairly sure, if this is using virtio-9p, then it won't work in
> RHEL 7 as Red Hat are disabling all 9p support.
> 
> There was discussion in the qemu community last year about supporting
> MTP between guest and host, but I don't think it got as far as anyone
> writing code.
> 
> What are your actual requirements beyond needing to mount a directory?
> Why wouldn't a normal remote filesystem (eg. NFS/CIFS/Gluster) work?
> 
> Rich.
> 

Yeah, NFS mounting has been a little problematic/inconsistent for me.

Specifics: 

1) My "/content" directory on the hypervisor host has both direct data
but also a loop mount of an iso. The iso and its mountpoint both reside
inside /content.

2) In the guest, I have tried NFS mounting the shared /content tree. Of
course, I have enabled "crossmnt" to allow access to the loop mounted
directory.

3) In the guest, I am "sharing" the mounted tree via an Apache virtual
host.

My problems:

1) automounter and Apache don't seem to like each other. Apache would
not "trigger" the mount operation.

2) Now using fstab to mount the top level /content. It mounts. When I
"look" from a terminal window in the guest at the tree and the loop
mounted directory, both show nicely. But, then after a period of time
Apache gets lost again. For some reason I have yet to determine, the
loop mounted directory gets "lost" from inside Apache, but will
re-appear if I just do an ls of the directory from a terminal window.

So, I thought the idea of doing a directory passthrough (which appears
to be available in virt-manager in RHEL 7 but cannot get to "work" after
I configure it - the VM refuses to start) might be a solution for my
NFS/Apache troubles.

I know this list isn't the forum for this, but if someone has an idea to
a solution to getting NFS and Apache happier with each other, I would
greatly appreciate it.

--Rob




More information about the virt mailing list