Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
Are you sure it was the tag name change that made it work? I've got the same problem on CentOS 6, but changing the tag name doesn't seem to help... once in a moon phase the mount does work though, if I keep trying. –  Per Johansson Jun 26 '12 at 9:36

1 Answer 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>
share|improve this answer
    
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

protected by Community May 28 '12 at 5:56

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

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