2

I can mount a drive using 9p on to my libvirt guest using the following command...

mount -t 9p trans=virtio,version=9p2000.L,rw share /machine/host

...but can't work out what to add to /etc/fstab to do it on startup.


I have tried...

share /machine/host 9p trans=virtio,version=9p2000.L,rw 0 0

...but the guest fails to boot (and I get taken to Emergency mode).


Can anyone please advise?

Thanks

  • 1
    Also see libvirt/9p/kvm mount in fstab fails to mount at boot time over on Superuser – roaima Jul 9 '17 at 18:31
  • Please add this as an answer so I can give you credit. – Beakie Nov 20 '17 at 0:22
  • Thank you. It was a long time ago and I'm not sure which of the referenced answers would have worked for you. In this case it would be better, I tihink, for you to answer your own question with the solution that worked best. Feel free to cross-reference the superuser answer(s). – roaima Nov 20 '17 at 0:28
2

This did it for me.

https://superuser.com/q/502205/524816

All credit to @roiama for the answer (in question comments).

0

In case you are using systemd, this can be probably also a problem with the system trying to mount a little bit to early. In my case, following instructions for NFS from the Arch Wiki solved the issue:
https://wiki.archlinux.org/index.php/NFS#Mount_using_.2Fetc.2Ffstab_with_systemd

E.g this helped for me:
/blacknas/show-archive /mnt/blacknas/show-archive 9p noauto,x-systemd.automount,x-systemd.device-timeout=10,timeo=14,x-systemd.idle-timeout=0,trans=virtio,version=9p2000.L,rw 0 0

Your Answer

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

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