Quantcast
Channel: VMware Communities : Discussion List - vSphere SDK for Perl
Viewing all articles
Browse latest Browse all 1577

List all the VMs with more than 2 Virtual disks

$
0
0

Hello.

I want to list all the VMs in a vCenter Datacenter which has got more than 2 Virtual disks. Here is the flow I am trying to work on:

 

1. Get the Datacenter View

2. Get the Cluster view with Datacenter view as the "begine_entity"

3. for each cluster view, Get the VirtualMachine View bit cluster view as "begin_entity"

4. for each VM views, get this information: VirtualMachine->config->hardware->device

          Above information is an array.

 

 

I need help in order to pull the Disk information from this array and then run an if condition where any VM which has got more than 2 disks should get printed.

Could you help. I have written script up to the point 4. just need some guidance for the later part.

 

Thanks.


Viewing all articles
Browse latest Browse all 1577

Latest Images

Trending Articles



Latest Images

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