Hello,

I would like to get feedback as to the best approach for performing a 
pre-condition check before allocating a guest vm to a physical host. For my 
example, a pre-condition check is to verify the guest vm does not use an 
existing DNS entry. If the pre-condition fails we do not want to allocate the 
guest vm to the physical host and we want to record this as an error condition.

As far as I can tell the only option I have is to extend the default 
FirstFitAllocator class and override the allocateTo methods to first perform my 
pre-condition verification and if it passes then to call the the overridden 
allocateTo() method. If it fails then I would throw a RuntimeException of some 
sort or possibly set the returnUpTo value equal to 0.

Can you please advise as what would be the best approach? If anyone else is 
performing pre-conditions checks in their allocation logic before provisioning 
a guest VM please let me know of your approach.


Thank you,

Amir

Reply via email to