I have a big raid array at /storage, and I'd like my guest to have access to it. I added

<filesystem type='mount' accessmode='passthrough'>
      <source dir='/storage/Test'/>
      <target dir='label'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0c' function='0x0'/>

to my libvirt XML file, and mounted the drive inside the VM with

sudo mount label /mnt -t 9p -o trans=virtio

This works fine, but appears to be read only. If I try and write a file, this happens:

$ touch testfile
touch: setting times of 'testfile': No such file or directory

I did some googling, but the only thing I've found so far is people saying it's a permissions issue, so for reference, libvirtd is running as root, and qemu-system-x86_64 is running as nobody. /storage/Test has 777 permissions and user nobody has the ability to write to the folder (tested by running sudo -u nobody touch testfile).

Any ideas?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.