This is probably easy, but I can't seem to figure it out. How can I easily calculate how much storage space is being used by an individual VM? As in, how much of my LUN is this VM actually taking including all suspend, snapshot, swap, config files, vmdk's etc. ?
If all the VM files are in the same directory:
login to the console / SSH
cd to the VM directory
execute "du -h"
If all the VM files are in the same directory:
login to the console / SSH
cd to the VM directory
execute "du -h"
Thanks, that works well. If you go up a level to the directory for the whole LUN you can see what each VM is using individually as well as a total usage for the LUN. Just what I was looking for.
Can anyone think of a way to do it from the VI client w/ virtual center?
You can see the info in VC by clicking on the datastore and browsing to the folder. This doesn't give you the total.
This is a missing feature in VC. It can be added to VC with some scripting work, but I haven't done it yet as I am more worried about filling luns and VC does an OK job communicating that. When I need to migrate vms I usually just go to the /vmfs file system and run a report on all the visible datastores using ls
You can also use "ls -sh" which lists the individual files and there totals...
Probably yes.
Or use one of the SDKs and write it yourself