Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 232319

Any other better way of generating the total snapshots' size for one VM via vSphere Perl SDK

$
0
0

I've searched the VMware Community, looking for the key to getting the whole snapshots' size for a single VM via vSphere SDK such as Perl or Java Edition, instead of using the powerCLI command 'Get-VM | Get-Snapshot ' (it's meaningless to me namely).

And I do get some ideas from the existing discussions in this community, although there's no API to getting the whole snapshots' size directly.

Here's the useful link with core code displayed in JAVA style:Re: How to get Snapshot space using vi java api??

In the discussion,

I think it's a good way to gathering the whole snapshots size indirectly.

What I actually want to know is, is it accurate enough to summary the snapshots' size for one VM.

Here's my demo code of getting the whole snapshots' size via vSphere Perl SDK. You can run it like this: ./calaSnapshotSizeForVM.pl --vm vm_name --server vc_ip --username account_name --password account_pwd

I hope someone else can help to give me some advise/suggestion, or another way of getting the data.

 

Thank you all in advance!

Jin Rong 2016/09/05.


Viewing all articles
Browse latest Browse all 232319

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>