0

I am attempting to share a directory on my host to a guest.
Host: Fedora 30
Guest: Centos 7

Using Virt-manager I added a filesystem
Type: mount
Driver: Default
Mode: Mapped
Source Path: /KVMshare (SELinux context set to svirt_image_t)
Target Path: /share

When I start the vm and attempt to mount using: mount -t xfs -o trans=virtio /share /mnt/host (/mnt/host is created) I get mount: special device /share does not exist
What am I doing wrong?

  • Try this: cialu.net/… – ajgringo619 Sep 7 '19 at 15:05
  • @ajgringo619 same result. I did have to change the filesystem type from 9p to xfs, as my vm is xfs – Roger Creasy Sep 9 '19 at 9:04
  • When you attach to a shared directory - Samba, NFS, QEMU - the underlying filesystem is irrelevant. Since I have Windows VMs, I use Samba (never had much luck with this). – ajgringo619 Sep 9 '19 at 15:29
  • OK. But, if I try 9p, I get unknown filesystem – Roger Creasy Sep 10 '19 at 18:33
  • You might want to check this out: unix.stackexchange.com/questions/112389/…. If this still applies to CentOS 7, then I'd switch to Samba. – ajgringo619 Sep 10 '19 at 18:45
0

Here is what I ended up doing:

I set up the host as an NFS server, and the vm as an NSF client. I then could mount the host drive over NFS, like any network NSF share.

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.