I am trying to use Rocky Linux with QEMU. I use cloud image Rocky-9-GenericCloud.latest.aarch64.qcow2. I can start guest VM, but I can’t share folder with my host machine.
Hi , Since you mentioned you don’t necessarily need 9p, you can try an alternative like Virtio-FS, which is often faster and better integrated for sharing directories between the host and guest in modern virtualized environments.
Steps to use Virtio-FS:
Check host support: Make sure that your host supports Virtio-FS. You should have the virtiofsd package installed on your host. On Rocky Linux, you can install it with:
sudo dnf install virtiofsd
QEMU command: When launching QEMU, use the parameter for Virtio-FS. For example:
Alternatively, you can manually add the entry in /etc/fstab on the guest:
shared /mnt/shared virtiofs defaults 0 0
Start the VM: Start the guest VM with the new configuration and check if you can successfully mount the shared directory using Virtio-FS.
This setup should provide a more stable and higher-performance solution than 9p for sharing directories between host and guest in modern virtual machines.