Quantcast
Channel: VMware Communities : All Content - vRealize Orchestrator
Viewing all articles
Browse latest Browse all 10285

How to get entity of all vms including workstation vms?

$
0
0

With the following vRO script lines, I would be able to get the server vms entities. However, this is not working to get workstation (windows7 & 10 etc) entities?

 

var vCACVms = Server.findAllForType("vCAC:VirtualMachine", "VirtualMachineName eq '" + vmName + "'");

var virtualMachineEntity = vCACVms[0].getEntity();

var vCacHost = Server.findForType("vCAC:VCACHost", virtualMachineEntity.hostId);

 

By trying with the following way also not working. Is there a better way to get the provisioned workstation properties (details)?

 

var vmName = "win7ent";

var allVms = VcPlugin.getAllVirtualMachines();

for (var i in allVms) {

  if (allVms[i].name == vmName) {

  vm = allVms[i];

  break;

  }

}

var virtualMachineEntity = vm.getEntity();

var vCacHost = Server.findForType("vCAC:VCACHost", virtualMachineEntity.hostId);


Viewing all articles
Browse latest Browse all 10285

Trending Articles



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