主要參考man pagenode
virt-df 列出虛機文件系統的剩餘空間
virt-df - Display free space on virtual filesystems數據庫
-a:後接鏡像
[root@cloudmanager datapool]# virt-df -a centos56x64
Filesystem 1K-blocks Used Available Use%
centos56x64:/dev/sda1 194442 12858 171545 7%
centos56x64:/dev/vmvg/root 5872136 2155876 3413156 37%centos
-d:後接domain,就是虛機名
[root@cloudmanager ~]# virt-df cacti
Filesystem 1K-blocks Used Available Use%
cacti:/dev/sda1 495844 52884 417360 11%
cacti:/dev/VolGroup/lv_root 47033288 2281128 42362964 5%dom
-h:以M,G顯示分區大小,可讀性較強
[root@cloudmanager datapool]# virt-df -a centos56x64 -h
Filesystem Size Used Available Use%
centos56x64:/dev/sda1 190M 13M 168M 7%
centos56x64:/dev/vmvg/root 5.6G 2.1G 3.3G 37%ide
--csv:以表格的形式顯示結果,這樣能夠導入數據庫和電子表格裏
[root@cloudmanager datapool]# virt-df -a centos56x64 --csv
VirtualMachine,Filesystem,1K-blocks,Used,Available,Use%
centos56x64,/dev/sda1,194442,12858,171545,6.6
centos56x64,/dev/vmvg/root,5872136,2155876,3413156,36.7spa
-i:顯示inode
[root@cloudmanager datapool]# virt-df -a centos56x64 -i
Filesystem Inodes IUsed IFree IUse%
centos56x64:/dev/sda1 50200 35 50165 1%
centos56x64:/dev/vmvg/root 1516032 87962 1428070 6%get
-V:顯示版本號
[root@cloudmanager datapool]# virt-df -a centos56x64 -V
virt-df 1.16.19rhel=6,release=1.el6it
-x:顯示trace信息
[root@cloudmanager datapool]# virt-df -a centos56x64 -xclass
SEE ALSO
df(1), guestfs(3), guestfish(1), virt-filesystems(1), <http://libguestfs.org/>.sed