On Thu, Nov 26, 2015 at 05:36:39PM +0530, Ritesh Raj Sarraf wrote: > On Thu, 2015-11-26 at 11:26 +0100, Guido Günther wrote: > > So in this case s.th. like: > > > > * How can I mount a directory from the host in a QEMU VM. > > > > Use the 9pfs filesystem with a domain xml like: > > > > <filesystem type='mount' accessmode='passthrough'> > > <source dir='/direcgory/on/host'/> > > <target dir=share'/> > > </filesystem> > > > > and to mount it within the guest use: > > > > cat <<EOF > /etc/fstab > > share /mnt/share 9p trans=virtio,rw,_netdev 0 0 > > EOF > > mount /mnt/share > > > > See https://libvirt.org/formatdomain.html#elementsFilesystems for > > details. > > > > This is pretty good. > > > Or maybe we want to have more like a "How do I switch from VirtualBox > > to > > QEMU" section? > > > > I'd rather stick with documenting basic obvious things only. I think > the catch is on what constitutes "basic obvious things". > > > > What I'd like to understand is what motivated you to submit the > > patch. > > I'm pretty sure we need to improve on the docs, just trying to figure > > out _where_. > > So, virt-manager, shows the option to add a share. There, in that > window, it gives no feedback on what needs to be done on the guest. > > So the standard expectation would be that on next boot the guest would > have the storage accessible. FYI, that's how it is on VBox (Assuming > you have the VBox Guest Extensions Installed). > > So with nothing being accessible in the Guest VM, my next step was to > look at the maintainer docs (README.Debian), if anything obvious is > documented. > > Next, Google for "libvirt mount hostfs" led to a bunch of blog entries > that gave me the hint about 9p file system. > > Assuming, that there may be users who may not have access to the > internet, this is not the most optimal option. > > > > But that said, I do think too, that there needs to be a line ensuring > we don't clutter our usual README docs. > > > > > Looking again at this stack: > > libvirt-bin package has no direct relationship with libvirt-doc. > Neither does virt-manager package. > > virt-manager GUI app has a Help menu. But just with 1 button talking > "About" the tool. > > > Actually, you put the right question on what led me to write the patch. > So in my case, the usual practice has been to refer README.Debian. But > while writing this reply, it has made me wonder what a normal user > would do. Because there is no direct relationship established in- > between the tool and the documentation; even though both are available > in Debian.
Hmmm...so how would we go from here? Looking from the VBox->KVM migration for "desktop" scenarios this would need improvements in virt-managers help system or even better: make things simpler by using qemu-ga to actually add a mount point for the 9pfs filesystem. We seem to have more than enough in qemu-ga nowadays to make this possible: https://github.com/qemu/qemu/blob/master/qga/qapi-schema.json We have such nice tools but sometimes we lack the plumbing to make things simple. Cheers, -- Guido

