host to guest directory share, 9p and virtio
Hi chaps,
I'm having some issues, I'm attempting to pass/share a directory from the host to a KVM guest using 9p and virtio, detailed here: wiki.qemu.org/Documentation/9psetup
Starting the Guest directly:
me(at)host$ qemu -m 1024 -name debian -drive file=/var/lib/libvirt/images_local/debian.img,if=virtio -fsdev local,security_model=passthrough,id=fsdev0,path=/images -device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=/imagestarget
qemu: invalid option -- '-fsdev'
Using libvirt:
Editing the .xml file that configures the guest and adding:
<filesystem type='mount' accessmode='passthrough'>
<source dir='/images'/>
<target dir='/imagestarget'/>
</filesystem>
Gets imediately reconfigured by libvirt to:
<filesystem type='mount'>
<source dir='/images'/>
<target dir='/imagestarget'/>
</filesystem>
On the guest, trying to mount the share yeilds:
root(at)debian:~# mount -t 9p -o trans=virtio,version=9p2000.L /imagestarget /images
Killed
root(at)debian:~#
Message from syslogd(at)debian at Apr 21 18:59:27 ...
kernel:[ 56.370241] Oops: 0002 [#1] SMP
Message from syslogd(at)debian at Apr 21 18:59:27 ...
kernel:[ 56.370247] last sysfs file: /sys/bus/virtio/drivers/9pnet_virtio/uevent
Message from syslogd(at)debian at Apr 21 18:59:27 ...
kernel:[ 56.370436] Stack:
Message from syslogd(at)debian at Apr 21 18:59:27 ...
kernel:[ 56.370467] Call Trace:
Message from syslogd(at)debian at Apr 21 18:59:27 ...
kernel:[ 56.370573] Code: 8b 7d 18 48 8b 47 28 ff 50 08 31 d2 59 5b 5d 41 5c 41 5d 41 5e 89 d0 41 5f c3 53 48 8b 5f 20 48 c7 c7 40 76 34 a0 e8 cd 5f fb e0 <c6> 43 01 00 48 c7 c7 40 76 34 a0 5b e9 20 5d fb e0 41 54 49 89
Message from syslogd(at)debian at Apr 21 18:59:27 ...
kernel:[ 56.370639] CR2: 0000000000000001
This makes me think I'm missing a kernel module, or a part of qemu/kvm, anybody have any idea whats wrong?
I would be open to any other (fast) way of sharing a host directory (or disk) with a guest too if someone has a better way.
I tried to include all the information that might be useful. Many thanks in advance for your help!
J
Last edited by lllux; 04-22-2013 at 09:35 AM.
|