Virt-df lets you see disk usage of your virtual machines by partition.
What if you want to see the usage for a part of the directory hierarchy, eg. everything under
/home or in
/usr/share/doc? There is no “virt-du” command, but you can use the “du” command in guestfish:
$ echo du /usr/share/doc | guestfish --ro -i Fedora12 282304
The number printed is in kilobytes.
This also works, with a small modification, for Windows VMs:
$ echo du 'win:C:\windows\system32' | guestfish --ro -i Win2003x32 990022