About how to place VMs to a specified datacenter #414
-
I want to place the current VM to a specified datacenter. For example, I have two Vms and two datacenters. I want to place Vm0 to datacenter0 and Vm1 to datacenter1. (Each datacenter has enough PEs that place two VMs at the same time) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You can create a subclass from DatacenterBrokerSimple and override the defaultDatacenterMapper to implement your own logic. //Selects the next datacenter in a circular (round-robin) way.
return getDatacenterList().get(++lastSelectedDcIndex % getDatacenterList().size()); |
Beta Was this translation helpful? Give feedback.
You can create a subclass from DatacenterBrokerSimple and override the defaultDatacenterMapper to implement your own logic.
Inside your overriden method, if you just keep the line below may work: