VMware Cloud Community
jauling
Enthusiast
Enthusiast

vRO 7.2 - most efficient way to query VMs with 10+ vCenter instances

Hello.

We have over 10 vCenter instances attached to our vRO 7.2 appliance. This might not be the best architecture, but it is what we've got until/unless we change the design.

When we query if a VM exists, for instance to do such operations:

  • Prevent VM name collisions when provisioning
  • Return VM object when searching for a VM

This operation can take quite a long time, since it looks like it traverses each vCenter instance and pulls VM objects from each. We use the built-in workflow called Get virtual machines by name, which is in Library / vCenter / Virtual Machine management / Basic tree structure.

Is there a better or faster way to do this? I know in the past, VCO used to have some kind of inventory service, but I believe that has been deprecated or didn't work well. Is there any kind of caching mechanism in vRO 7.x that I can leverage to prevent iterating over all my vCenter instances when I'm looking for a VM name or UUID? Is there a way to only query VMs in a specific vCenter instance maybe?

0 Kudos
3 Replies
iiliev
VMware Employee
VMware Employee

Hi,

Get virtual machines by name iterates over all available vCenter instances (using a foreach element) and for each of them it calls another workflow Get virtual machines by name with PC. The problem is that the foreach element calls happen sequentially (or at least I think so), so the total execution time is a sum of workflow execution times for each vCenter instance.

To speed things up, you can write another workflow, that will invoke Get virtual machines by name with PC in parallel. Another option is not to search on all vCenter instances, but only on one instance, again callin Get virtual machines by name with PC and providing the specific vCenter instance as vc input parameter.

0 Kudos
qc4vmware
Virtuoso
Virtuoso

We have a similar vRO instance with about 30,000 vm inventory.  I use this piece of code which returns a result in 30-60 seconds.

VcPlugin.getAllVirtualMachines(null, "xpath:name=\'" + vmName + "\'");

0 Kudos
carl1
Expert
Expert

Another thought:  Perhaps use a vRO cache of all VM names that you have provisioned.  You could ensure accuracy by doing a refresh of the cache during a quiet period using the above mentioned methods.

Carl L.

0 Kudos