On 05/18/2016 12:20 PM, Snyder, Emile wrote:
Hello all,
I'm a newbie to libvirt, coming to it because I'm trying to understand how to
provide the ability to attach/detach network filesystem shares to openstack guest
instances in something analogous to the way block devices can be now.
While playing with the existing virtfs/9p support for qemu, I found that I can't use
virsh to attach a "filesystem" device while the VM is running. For example, I
create a snippet of XML like
<filesystem type='mount' accessmode='mapped'>
<source dir='/tmp/share'/>
<target dir='share_tag'/>
</filesystem>
and then try:
stack@devstack-8366:~/devstack$ virsh list
Id Name State
----------------------------------------------------
3 instance-00000002 running
5 instance-00000004 running
8 instance-00000007 running
stack@devstack-8366:~/devstack$ virsh attach-device 8 share.xml
error: Failed to attach device from share.xml
error: Operation not supported: live attach of device 'filesystem' is not
supported
I see that error coming from src/qemu/qemu_driver.c in the qemuDomainAttachDeviceLive
function.
Can anyone tell me if this is something that is going to be hard or easy to make
possible? Pointers to where I should look in the source, or in qemu? Is anyone working it
already?
Unfortunately qemu currently lacks the support for virtio 9pfs hotplug AFAICT.
There's two aspects: there's the filesystem source bit, which is the qemu
-fsdev option, and then there's the guest facing -device virtio-9p*.
The latter bit is hotpluggable, there were qemu patches that said as much in
the last year. But there's no infrastructure for hotplugging fsdevs. So any
work to enable this in libvirt would have to start there.
- Cole