Skip to main content

Shared directory virt-manager debian <-> kali

I wanted a shared directory between my Debian host and Kali guest running in virt-manager1. Following this very nicely written guide to the letter worked perfectly up until the point where I added

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

to /etc/fstab.

After rebooting I got some weird errors and was forced into emergency mode. My first thought was that SELinux was causing this trouble (as mentioned in the guide) but I checked and SELinux was disabled by default in Kali Linux.

After some searching, I found this. Apparently the 9p modules needs preloading. This means adding these three lines to /etc/initramfs-tools/modules


and then running

sudo update-initramfs -u

There are other solutions mentioned in the question libvirt/9p/kvm mount in fstab fails to mount at boot time that I didn't try but this worked like a charm.

  1. Depending on your level of paranoia this might perhaps pose a security risk.