Use this when choosing or troubleshooting storage for KVM VMs.
KVM Storage
KVM storage keeps VM disks as qcow2 or raw files, LVM volumes, NFS shares, iSCSI LUNs or Ceph RBD images, managed through libvirt storage pools and volumes (virsh pool-list, vol-list).
1. KVM storage via libvirt pools: dir, LVM, iSCSI, RBD, NFS, ZFS.
2. Formats: qcow2 or raw.
3. Use virtio-scsi/virtio-blk with cache=none (or writeback with care).
4. io=native or io_uring.
5. Back up disks with domain XML.
VM disk → libvirt pool → backend
Context & applicabilityCommon mistakes · platform/version boundaries
- Pools not set to autostart, so VMs fail after a reboot (
virsh pool-autostart <pool>). - Images created outside libvirt not visible until the pool is refreshed (
virsh pool-refresh). - SELinux/AppArmor labels blocking images in custom paths.
Operational reference
Fast context before you go deeper.
virsh domblklist vm01Evidence · 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.
Subtopics
Go one level deeper into this subject.
QCOW2 is QEMU's copy-on-write disk format with thin provisioning, internal and external snapshots, backing files and optional compression.
Subtopic RAWRAW is a plain disk image with no metadata, one byte on disk per byte in the guest.
Subtopic LVMLVM for KVM gives each VM disk its own logical volume as a raw block device, avoiding file-system overhead.
Subtopic Ceph RBDCeph RBD for KVM stores VM disks as RADOS block device images in a Ceph pool, accessed directly by QEMU through librbd.
Subtopic NFSNFS for KVM stores qcow2 or raw disk images on a network share mounted on every host, giving simple shared storage for live migration.
Subtopic KVM Storage TroubleshootingTroubleshoot KVM storage with virsh pool-info and vol-list, qemu-img info and check for image chains and corruption, file permissions and SELinux or AppArmor labels, and the host's dmesg and libvirt logs.
- libvirt pools hold volumes of different types.
- qcow2 is flexible, raw is fastest.
- Shared storage is needed for live migration.
virsh pool-list --all --details— poolsvirsh vol-list <pool>— volumesvirsh domblklist <vm> --details— VM disks
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
KVM/libvirt storage is organised as pools (directories, LVM VGs, iSCSI targets, RBD pools, ZFS) containing volumes that become VM disks.
virsh pool-list --all
virsh pool-define-as images dir --target /var/lib/libvirt/images; virsh pool-start images; virsh pool-autostart images
virsh vol-list images
virsh domblklist vm1 --details
virsh domblkinfo vm1 vda
Use virtio-scsi or virtio-blk for performance, discard='unmap' for thin storage, and cache='none' with io='native' for most production disks.
Pool types
| Pool type | Backing |
|---|---|
dir | Directory of image files |
logical | LVM volume group |
iscsi / iscsi-direct | iSCSI LUNs |
rbd | Ceph RBD |
zfs | ZFS pool |
netfs | NFS mount |
virsh pool-list --all, virsh vol-list <pool>.
ReferenceConfiguration & state1 section · depth on demand
Commands
virsh pool-list --all
virsh pool-info default
virsh vol-list default
virsh domblklist vm01
qemu-img info --backing-chain /var/lib/libvirt/images/vm01.qcow2
Pools can be directories, LVM volume groups, iSCSI targets, NFS, ZFS or Ceph RBD. Disk cache mode (none for most cases) and I/O mode (native/io_uring) affect performance and safety.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Hypervisor Storage → KVM Storage. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://pve.proxmox.com/pve-docs/chapter-pvesm.html · confidence 94%