Pcornel
Browse topics
Options
Recent
Favorites
Storage · Technical reference

NFS · KVM Storage

Direct answer

NFS for KVM stores qcow2 or raw disk images on a network share mounted on every host, giving simple shared storage for live migration. Use NFSv4.1 or later, a dedicated network and hard mounts.

When to use this

Use this when KVM VMs store disks on NFS.

First 30 seconds

1. NFS pools (netfs) host qcow2/raw files.

2. Hard mounts.

3. Same path on all hosts for migration.

4. SELinux: virt_use_nfs boolean.

5. Dedicated network.

Operational verification

VM disk file → NFS → server

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Hypervisor Storage
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformHypervisor Storage
Scope / prerequisiteUse this when KVM VMs store disks on NFS.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Common mistakes Narrow the fault
  • Libvirt NFS pool not set to autostart.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • Mount on every host for migration.
  • Use NFSv4.1+ and hard mounts.
  • Network latency becomes disk latency.
Key checks
  • virsh pool-info <nfs-pool> — netfs pool
  • nfsstat -m — mount options
  • findmnt -t nfs4 — mounted
ReferenceHow it works1 section · depth on demand

How it works

In libvirt, an NFS storage pool (type netfs) mounts the export on the host and manages volumes (disk images) inside it. For live migration every host needs the same pool mounted at the same path. File ownership matters: qemu runs as a specific user, so the export must allow it (watch root_squash and SELinux labels such as virt_use_nfs).

ReferenceImportant terms & boundaries2 sections · depth on demand

In depth

NFS as a libvirt storage pool

libvirt's storage documentation describes the netfs pool type. It mounts a network export from a host and path; the default protocol is auto, which generally tries NFS first. Starting the pool mounts the share, autostart mounts it when libvirt starts, and pool-destroy only unmounts it, without touching the data.

# cat nfs-pool.xml
<pool type="netfs">
  <name>nfs-images</name>
  <source>
    <host name="10.0.0.20"/>
    <dir path="/export/kvm"/>
    <format type="nfs"/>
  </source>
  <target>
    <path>/var/lib/libvirt/images/nfs</path>
  </target>
</pool>
# virsh pool-define nfs-pool.xml
# virsh pool-start nfs-images && virsh pool-autostart nfs-images
# virsh pool-list --all
 Name         State    Autostart
----------------------------------
 nfs-images   active   yes
# virsh vol-list nfs-images

Operational points

TopicGuidance
Live migrationAll hosts must mount the same export at the same path
Permissionsqemu runs as a dedicated user; exports with root_squash must allow that UID/GID
SELinuxSet virt_use_nfs on RHEL-family hosts
Mount optionsKeep hard for VM disks; soft timeouts risk silent corruption
Disk formatqcow2 for snapshots and thin images; raw for the lowest overhead

Troubleshooting

SymptomCheck
Pool fails to startmount -t nfs by hand from the host; firewall; export ACL
VM fails to start, Permission deniedFile ownership on the export, SELinux label or boolean
VM pauses with I/O errorNFS server unreachable; virsh domblkerror <vm>
Migration fails on disk pathDifferent mount path on the target host

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Pool definition

virsh pool-define-as nfspool netfs --source-host nas01 --source-path /export/vms --target /var/lib/libvirt/images/nfs
virsh pool-start nfspool ; virsh pool-autostart nfspool

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docHypervisor Storage current

Authoritative/upstream documentation reviewed for bounded claims in Hypervisor Storage → KVM Storage → NFS. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://pve.proxmox.com/pve-docs/chapter-pvesm.html · confidence 94%
Confirmation

Confirm action

Continue?