[ILUG] Libvirtd & kvm: mount directory from host in guest
David De La Harpe Golden
david at harpegolden.net
Thu Nov 18 22:24:20 GMT 2010
On 18/11/10 14:44, Bailey, Darragh wrote:
> Is there an equivalent feature in libvirtd& kvm to make directories on
> the host system available in the guests? I recall this being available
> in VMWare but not 100%.
IIRC VMWare autoconfigures a (possibly modified) samba for you
underneath, at least on a linux physical host. I dunno what it does on
a windows physical host, but probably just uses windows' native cifs
n.b. qemu/kvm support autoconfiguring samba to provide shares for
guests from the host, as simple as e.g.
"-net user,smb=/srv/smbtmp" on the command line
...though whether the libvirt wrapper has any automatic management of
that in particular I don't know off the top of my head.
> If not, I'll have to decide between sharing a disk image between guests
Uhm. If I'm not misunderstanding, that's unlikely to work well _at all_
at all unless you were to run a true shared-block-device clustered fs
across the guests, like GFS. And you probably don't to want to get into
that, though it might be academically interesting, it would be a pretty
odd setup for most purposes.
> or using NFS to provide some local scratch space so users of the
> different guests can easily access the same local data no matter
> which one they are actually on.
Well, that's very similar to using samba, only, well, nfs. So perhaps
better fit for linux/unixy guests, worse fit for windozey guests.
(just in case: don't confuse that with the libvirt "nfs storage pool" -
AFAIK that means using an nfs server to store the disk images for a
bunch of guests).
More information about the ILUG