any scripts out there that will pull the following information from VI3 VC?
VM Name
VMDK Size (on disk)
VMDK location (lun)
i realize that veeam gives you vmdk size and disk used but not vmdk location.
You can make use SearchDatastoreSubFolders API, that returns FileInfo Data object. FileInfo object has properties fileSize and path from where you can get size and location.
*
Found this on the web . Maybe it is helpful for start
1. Browse the datastore
foreach my$ds( @{ $datacenter->datastore } ) {
**
my$datastore= Vim::get_view( mo_ref => $ds);
**
my$browser= Vim::get_view( mo_ref =>$datastore->browser );
**
my$task=
*
$browser->SearchDatastoreSubFolders(
datastorePath=> sprintf( "[%s]", $datastore->info->name) ,
searchSpec=> HostDatastoreBrowserSearchSpec->new( matchPattern=>[http://".vmx"|http://".vmx"] )
)
;
}
*
2. Build the list of VMs
my@vm_list
**
my$task_view= Vim::get_view( mo_ref =>$task);
**
foreachmy$result( @{ $task_view->info->result } ) {
**
if( defined$result->file ) {
**
foreachmy$file( @{ $result->file } ) {
**
push@vm_list, sprintf"%s%s", $result-> folderPath, $file->path;
*
}
}
}
*
*