How to manage storage volumes with virsh
Short: examples of using the libvirt API (virsh vol-*) to manage volumes inside storage pools and notes about backend-specific behavior.
Managing storage volumes with virsh In this section we’ll look at storage volume management using libvirt’s API (the virsh tool). We will use pools of type dir (image files on disk), although many operations are applicable to other backends; differences are noted where relevant.
Pools and volumes: quick concept A “volume” in libvirt is the storage unit created inside a pool. In dir and fs pools volumes are files (for example qcow2, raw); in logical pools they are LVM logical volumes; in disk pools they can map to partitions; and in networked backends (Gluster, RBD, iSCSI) creation and management may require backend-specific tools.