How do i display storage pool information using kvm virsh?



  • The storage pool is a area of storage used for VM's. VM's use volumes within the storage pools.

    # virsh pool-list
     Name                 State      Autostart 
    -------------------------------------------
     default              active     yes       
     Pool0                active     yes
    

    The default is the local disk. The Pool0 is another dedicated local disk storage pool, could be NFS, iSCSI, SAN, etc

    To show more information on a storage pool.

    # virsh pool-info default
    Name:           default
    UUID:           a8eac234-115f-734e-81aa-1d9b178683de
    State:          running
    Persistent:     yes
    Autostart:      yes
    Capacity:       20.97 GiB
    Allocation:     6.40 GiB
    Available:      14.56 GiB
    

    To display the information on the volumes. This is using a local disk storage pool, called Pool0.

    # virsh vol-list Pool0
     Name                 Path                                    
    ------------------------------------------------------------------------------
     cirros-0.3.5-x86_64-disk.img /home/trainer/Pool0/cirros-0.3.5-x86_64-disk.img
    

    Display information on volume cirros-0.3.5-x86_64-disk.img.

    # virsh vol-info --pool Pool0 cirros-0.3.5-x86_64-disk.img
    Name:           cirros-0.3.5-x86_64-disk.img
    Type:           file
    Capacity:       39.22 MiB
    Allocation:     14.22 MiB
    


© Lightnetics 2024