Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 252940

Re: View Virtual Machine Specs with Orchestrator

$
0
0

I mean, you should change your script from STEP 2 to this:

 

System.log("VM: " + vms);
Server.log("VM: " + vms);

 

var vm = new new VcVirtualMachine() ;

vm = vms.shift(); // Returns the first item within the vms array

 

System.log("VM: " + vm.name);
Server.log("VM: " + vm.name);


cpuCount = vm.summary.config.numCpu;
memoryMB = vm.summary.config.memorySizeMB;

 

 

Cause your "vms" input is an array of virtualmachines and not one single virtualmachine. The attribute summary is not available on an array but on a virtualmachine object. So you have to pic the first virtualmachine object from within the array.

 

Regards


Viewing all articles
Browse latest Browse all 252940

Trending Articles