Hi,
I am in trouble to get the Vm snapshot space regarding to the specific cluster. I didn't find any property or method in the vi java api. So please tell me how to get snapshot space??? or refer me any sample code related to the VM snapshot Space.
Thanks in advance.
Nevermind, finally after deep study of vsphere java sdk & Snapshot I got the Solution...we need to use searchDatastoreSubFolder_Task() method with two parameters.....1) Datastore Path 2) HostDatastoreBrowserSearchSpace object.
Hey could you post the sample code for it....I am trying to clone from snapshot but still not able to find the snapshot space through java api
Thanks
Rashmi
Hi ,,
if any query then ask me.
samadhan
Hi ,
There is one great tab available to get this information at host level.
Select host-->storage views tab. there it will give you the vm's with snap shots and space occupied by snap shot in very detail.
Its pretty simple than else.
Durga
Hi durga,
I think u r talking about snapshot space at vsphere client(vcenter client) level, but rashmi want to take snapshot space using vsphere vi java api.
Samadhan
How were you able to determine the value for "dspath ?
hi profversaggi,
I think the param 'dspath' maps to the VM's attribute of vm.config.files.snapshotDirectory.
I've got the dspath as below with perl, and it works perfect!
eg:
my $ds_path = $vm_view->{'config.files'}->snapshotDirectory;
Is there any code samples for finding Space Utilization By File Type of a datastore. I googled it but no use.
Thanks in advance.
Hi Samadhan. Thanks for your code. It actually worked. Just add fqf.setFileOwner(true); for latest version of vCenter s or else it may throw property fileOwner missing error.
For java Datastore Path is nothing but [datastore_name] .
Eg: [datastore1]