12.3. コマンドラインを使用した仮想マシンのストレージ情報の表示
コマンドラインを使用して、仮想マシン (VM) で使用可能なストレージリソースに関する詳細情報を表示できます。
手順
ホスト上で使用可能なストレージプールを表示するには、必要なリストの粒度オプションを指定して
virsh pool-listコマンドを実行します。たとえば、次のオプションは、ホスト上のすべてのストレージプールに関する利用可能なすべての情報を表示します。# 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-
ストレージプール情報を表示するために使用できる追加オプションは、
virsh pool-list --helpコマンドを使用してください。
-
ストレージプール情報を表示するために使用できる追加オプションは、
指定したストレージプール内のストレージボリュームをリスト表示するには、
virsh vol-listコマンドを使用します。# 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仮想マシンに接続されているすべてのブロックデバイスを表示するには、
virsh domblklistコマンドを使用します。# *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