On libvirt a default storage pool is created called default, which uses location /var/lib/libvirt/images for file based volumes. Each VM created will have a volume, volumes can be created beforehand and the volume destination can be provided for the virt-install command.
$ virsh pool-list
Name State Autostart
-------------------------------------------
cipher active yes
default active yes
store active yes
$ virsh pool-info default
Name: default
UUID: 5a67026a-5879-4294-9595-297d79ae8d23
State: running
Persistent: yes
Autostart: yes
Capacity: 78.24 GiB
Allocation: 42.74 GiB
Available: 35.51 GiB
$ virsh pool-info store
Name: store
UUID: f51da59f-59e5-45d7-9f13-138a067ddc49
State: running
Persistent: yes
Autostart: yes
Capacity: 596.17 GiB
Allocation: 50.00 GiB
Available: 546.17 GiB
$ virsh vol-list default
Name Path
------------------------------------------------------------------------------
centos-VAGRANTSLASH-7_vagrant_box_image_1802.01.img /var/lib/libvirt/images/...
centosext.qcow2 /var/lib/libvirt/images/centosext.qcow2
Create from XML:
<volume type='file'>
<name>alpha.qcow2</name>
<key>/var/lib/libvirt/images/alpha.qcow2</key>
<capacity unit='bytes'>107374182400</capacity>
<allocation unit='bytes'>3099361280</allocation>
<target>
<path>/var/lib/libvirt/images/alpha.qcow2</path>
<format type='qcow2'/>
</target>
</volume>$ virsh vol-create default alpha.xml
Vol alpha.qcow2 created from alpha.xml
Or use vol-create-as:
$ virsh vol-create-as default beta.qcow2 2G
Vol beta.qcow2 created
$ virsh vol-info /var/lib/libvirt/images/beta.qcow2
Name: beta.qcow2
Type: file
Capacity: 2.00 GiB
Allocation: 2.00 GiB
$ virsh vol-wipe /var/lib/libvirt/images/alpha.qcow2
Vol /var/lib/libvirt/images/alpha.qcow2 wiped
$ virsh vol-delete /var/lib/libvirt/images/alpha.qcow2
Vol /var/lib/libvirt/images/alpha.qcow2 deleted
Related Articles
Libvirt volume management
On libvirt default storage pool is created called default, default pool will be defined to use location /var/lib/libvirt/images for file based volumes.
How We Set Up Our KVM Hypervisor: From Bare Metal to Production-Ready VM Host
Detailed walkthrough of building a dedicated KVM/libvirt hypervisor with XFS tuning, hugepages, 10GbE tuning, and automation.
Building a Predictable KVM Infrastructure: From Chaos to Control
How to engineer a predictable KVM-based infrastructure focusing on repeatability, observability, and operational safety.