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

  1. To view the available storage pools on the host, run the virsh pool-list command 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 --help command.
  2. To list the storage volumes in a specified storage pool, use the virsh vol-list command.

    # 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 GiB
  3. To view all block devices attached to a virtual machine, use the virsh domblklist command.

    # *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
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部