3

First some background information on the server:

Host OS: Debian Linux Squeeze + qemu-kvm version 1.0+dfsg-8~bpo60+1

Guest OS: Debian Linux Squeeze

I use qemu-kvm via libvirt. I have set up 9p VirtFS with the following in Guest's XML config:

<filesystem type='mount' accessmode='passthrough'>
  <source dir='/srv/www'/>
  <target dir='wwwdata'/>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</filesystem>

That is, I want to share /srv/www to the guest OS using mount tag wwwdata.

When I try to mount the VirtFS share from the guest, I get an error message:

root@server:~# mount -t 9p -o trans=virtio,version=9p2000.L2 wwwdata /srv/www/
mount: wwwdata: can't read superblock

I also tried virtfs target dir/mount_tag www at first. I got the same error message. However, I was able to mount the VirtFS share using mount tag www1111, or www1 or similar.

Some more notes on this one. dmesg doesn't show anything useful either in guest or the host. The only sign is this entry in the guest dmesg:

[ 36.054936] Installing v9fs 9p2000 file system support

Does anyone know how to get this working correctly? Google gives no useful information on this issue; I've tried several searches.

2
1

Do you need to override PCI address information? From the QEMU documentation:

Libvirt will also automatically assign a PCI address for the 9p device, though that can be overridden if desired.

If you don't actually need that override, have you tried to strip your guest XML config to be only

<filesystem type='mount' accessmode='passthrough'>
  <source dir='/srv/www'/>
  <target dir='wwwdata'/>
</filesystem>
1
  • I entered only that information originally in the config file, libvirt automatically added the PCI address override line. So, that (probably) isn't the problem. – user119672 May 2 '12 at 23:22

Not the answer you're looking for? Browse other questions tagged or ask your own question.