VMware Cloud Community
taylorb
Hot Shot
Hot Shot
Jump to solution

View total storage used by VM

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. ?

Reply
0 Kudos
1 Solution

Accepted Solutions
oreeh
Immortal
Immortal
Jump to solution

If all the VM files are in the same directory:

login to the console / SSH

cd to the VM directory

execute "du -h"

View solution in original post

Reply
0 Kudos
6 Replies
oreeh
Immortal
Immortal
Jump to solution

If all the VM files are in the same directory:

login to the console / SSH

cd to the VM directory

execute "du -h"

Reply
0 Kudos
taylorb
Hot Shot
Hot Shot
Jump to solution

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?

Reply
0 Kudos
Jae_Ellers
Virtuoso
Virtuoso
Jump to solution

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

-=-=-=-=-=-=-=-=-=-=-=-=-=-=- http://blog.mr-vm.com http://www.vmprofessional.com -=-=-=-=-=-=-=-=-=-=-=-=-=-=-
glynnd1
Expert
Expert
Jump to solution

I wonder if the code behind VCplus[/url] could be modified to do this.

Reply
0 Kudos
esiebert7625
Immortal
Immortal
Jump to solution

You can also use "ls -sh" which lists the individual files and there totals...

oreeh
Immortal
Immortal
Jump to solution

Probably yes.

Or use one of the SDKs and write it yourself Smiley Wink

Reply
0 Kudos