Reply to Message

View discussion in a popup

Replying to:
tivs
Enthusiast
Enthusiast

list of VM's in a resource pool

Hi All,

    I am trying to display the list of VM's in a resource pool.

Input variables:-

  localparameter:- rpool

  Type:- VC:ResourcePool

Script:-

if (rpool.name == "ABC"){

var vms = VcPlugin.getAllVirtualMachines();

for(i in vms){

    var vm = vms[i];

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

            logtext = "VM name : " + vm.name  ;

}

}

  But the script is displaying  list of VM's in the vCenter but i need only VM's listed in the ABC resource pool. Please correct me, if i am wrong. Thank you in advance for the help.

Reply
0 Kudos