Skip to content

virtiofs

Virtiofs is a shared file system that lets virtual machines access a directory tree on the host


Enable these kernel configs

cd /usr/src/linux/
make menuconfig
  • Select the kernel configs below
CONFIG_VIRTIO_FS=y
CONFIG_DAX=y
CONFIG_FS_DAX=y

Install virtiofsd

emerge --ask app-emulation/virtiofsd

Open virtual manager and choose filesystem and viritofs

Source path is the directory and the value below is the name of the share

The xml must looks like

Screenshot Screenshot Screenshot

<filesystem type='mount' accessmode='passthrough'>
  <driver type='virtiofs' queue='1024'/>
  <binary path='/usr/libexec/virtiofsd'/>
  <source dir='/mnt/usb/glftpd/site/'/>
  <target dir='glftpd_site'/>
  <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
</filesystem>

Windows Guest

You must follow the guide and mount the iso file to get the drivers for viritofsd, it should looks like

Screenshot

Open PowerShell and type services.msg

  • Right click on the two virtiofs setings and press start
  • Right click on VIrtIO-FS Service and Virtual DIsk and press Startup Type to Automatic and press Apply followed by OK

Screenshot Screenshot