13.3. Viewing virtual machine storage information by using the command line
By using the command line, you can view detailed information about storage resources available to your virtual machines (VMs).
Procedure
To view the available storage pools on the host, run the
virsh pool-listcommand with options for the required granularity of the list. For example, the following options display all available information about all storage pools on your host:# virsh pool-list --all --details Name State Autostart Persistent Capacity Allocation Available default running yes yes 48.97 GiB 23.93 GiB 25.03 GiB Downloads running yes yes 175.62 GiB 62.02 GiB 113.60 GiB RHEL-Storage-Pool running yes yes 214.62 GiB 93.02 GiB 168.60 GiB-
For additional options available for viewing storage pool information, use the
virsh pool-list --helpcommand.
-
For additional options available for viewing storage pool information, use the
To list the storage volumes in a specified storage pool, use the
virsh vol-listcommand.# virsh vol-list --pool <RHEL-Storage-Pool> --details Name Path Type Capacity Allocation --------------------------------------------------------------------------------------------- RHEL_Volume.qcow2 /home/VirtualMachines/RHEL8_Volume.qcow2 file 60.00 GiB 13.93 GiBTo view all block devices attached to a virtual machine, use the
virsh domblklistcommand.# *virsh domblklist --details <vm-name> Type Device Target Source ----------------------------------------------------------------------------- file disk hda /home/VirtualMachines/vm-name.qcow2 file cdrom hdb - file disk vdc /home/VirtualMachines/test-disk2.qcow2