Linux VPS

libvirt storage pools explained: dir, logical, netfs, ZFS and RBD

An overview of libvirt storage pool types for KVM: directory, LVM logical, NFS netfs, iSCSI, ZFS and Ceph RBD, with commands to define, list and manage pools and volumes.

IntermediateKVM hosts2 min read

libvirt manages VM disks through storage pools (where disks live) and volumes (the disks themselves). Understanding libvirt storage pools lets you mix local files, LVM, NFS and distributed storage with the same tools.

Before you start

Pool types

TypeBacked byVolumes areNotes
dirA local directoryqcow2/raw filesDefault pool at /var/lib/libvirt/images
logicalLVM volume groupLogical volumesFast block storage; see LVM pool
netfsNFS (or other network FS)FilesShared storage for migration; see NFS storage
iscsi / iscsi-directiSCSI targetLUNsSee iSCSI
zfsA ZFS poolzvolsSnapshots, compression; see ZFS for VMs
rbdCeph clusterRBD imagesDistributed; see Ceph
disk / fsWhole disk or a device with a filesystemPartitions / filesLess common

Common commands

virsh pool-list --all --details
virsh pool-info default
virsh vol-list default --details

Create a volume and delete one:

virsh vol-create-as default app01.qcow2 30G --format qcow2
virsh vol-delete app01.qcow2 --pool default

Define a new directory pool

virsh pool-define-as fastpool dir --target /srv/vm-fast
virsh pool-build fastpool && virsh pool-start fastpool && virsh pool-autostart fastpool

Define a ZFS pool

virsh pool-define-as zpool zfs --source-name vmpool

This assumes an existing ZFS pool named vmpool; libvirt will create zvols in it. ZFS support requires libvirt built with the ZFS backend.

Refresh after external changes

If you create files or LVs outside libvirt, refresh so they appear:

virsh pool-refresh default

Choosing

  • Single host, simple: dir with qcow2 or logical with raw.
  • Snapshots and integrity: ZFS.
  • Live migration across hosts: netfs, iSCSI with shared LVM, or RBD.

Troubleshooting

  • Pool inactive after reboot: run virsh pool-autostart.
  • "storage pool does not support volume creation": some types (like iscsi) only expose existing LUNs.
  • Permission errors: check ownership and SELinux/AppArmor labels on the target path.

Frequently asked questions

Do I need pools at all?

No, VMs can reference disk paths directly, but pools make management and tooling easier.

Can one VM use disks from several pools?

Yes, each disk can come from a different pool.

How do VPS panels handle storage?

They usually manage LVM, ZFS or files themselves; see VirtFusion storage.

Next steps

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.