Highlighted
Hot Shot
Hot Shot

View total storage used by VM

Jump to solution

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

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Immortal
Immortal

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

0 Kudos
6 Replies
Highlighted
Immortal
Immortal

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

0 Kudos
Highlighted
Hot Shot
Hot Shot

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?

0 Kudos
Highlighted
Virtuoso
Virtuoso

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 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Highlighted
Expert
Expert

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

0 Kudos
Highlighted
Immortal
Immortal

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

Highlighted
Immortal
Immortal

Probably yes.

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

0 Kudos