[fedora-virt] Directory Passthrough
Richard W.M. Jones
rjones at redhat.com
Mon Mar 17 11:22:34 UTC 2014
[A shared filesystem sounds like what you want, but given that qemu
only has 9pfs and the KVM team have deemed that this is unsupportable,
read on ...]
On Sun, Mar 16, 2014 at 07:17:00PM -0400, Robert Locke wrote:
> 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.
You could export the ISO readonly to multiple guests as a block
device. Put this into the libvirt XML:
<disk type='block' device='cdrom'>
<driver name='qemu' type='raw'/>
<source file='/path/to/cd.iso' />
<target dev='sdc' bus='virtio-scsi' tray='open'/>
<readonly/>
<shareable/>
</disk>
How often does the non-ISO content change? If it's essentially static
over long periods you could make it into an ISO or squashfs (or
virt-make-fs) and export it to the guests. However this becomes quite
clumsy if the content changes much.
> 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.
I've never set up an automounter myself, so I don't know what the
problem is. I know the configuration of it is .. obscure.
[...]
> 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.
This part is probably a virt-manager / RHEL 7 bug. It shouldn't
expose features which are disabled lower down in the stack. Cole?
[...]
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top
More information about the virt
mailing list