Skip to content

About how to place VMs to a specified datacenter #414

Answered by manoelcampos
wangdaoishere asked this question in Q&A
Discussion options

You must be logged in to vote

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:

//Selects the next datacenter in a circular (round-robin) way.
return getDatacenterList().get(++lastSelectedDcIndex % getDatacenterList().size());

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by manoelcampos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants