Jump to content

VirtioFS

From NixOS Wiki
Revision as of 15:23, 4 October 2025 by Bachp (talk | contribs) (Created page with "[https://virtio-fs.gitlab.io/ VirtioFS] is a filesystem that allows mounting host path inside a VM with minimal performance overhead. == Mounting == VirtioFS directories can be mounted directly in NixOS viar the standard fileSystems option. Assuming you setup a VirtioFS called VMShare in your VM manager, like libvirt, you can mount it by adding the following inside your VM. fileSystems."/mnt/VMShare" = { device = "VMShare"; fsType = "virtiofs";...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

VirtioFS is a filesystem that allows mounting host path inside a VM with minimal performance overhead.

Mounting

VirtioFS directories can be mounted directly in NixOS viar the standard fileSystems option.

Assuming you setup a VirtioFS called VMShare in your VM manager, like libvirt, you can mount it by adding the following inside your VM.

   fileSystems."/mnt/VMShare" = {
     device = "VMShare";
     fsType = "virtiofs";
     options = [
       "nofail"
       "x-systemd.automount"
     ];
   };