VMware {code} Community
AnitaSinghal
Contributor
Contributor

Deploy to VMs on separate hosts using vCloud API

How can we ensure that a pair of redundant VMs are deployed on separate physical hosts using the vCloud API ? This is needed for purpose of  HA and Fault tolerance.

0 Kudos
2 Replies
lamw
Community Manager
Community Manager

afaik, this is not possible with the vCloud API. I've seen some users create anti-affinity rules within vSphere after the vApp has been created in vCloud Director (though I don't believe this is officially supported), which would allow you to keep your VMs seperate. If you have vSphere HA enabled on your vSphere Cluster, then the VMs will automatically restart upon a host failure and you don't have to worry about it.

0 Kudos
cfor
Expert
Expert

I have looked at this before.

One possible solution.

Using the AMQP notification tasks in vCloud - when a instantiate operation occurs you can (using the VCO vSphere api's to make it easier) create a DRS rule to keep the VM's separate.  (We have a use-case where we want them to stay together for network speed reasons).

When the VM's start they will be started on different hosts - and DRS will keep them on different hosts.

Last part of this is to clean up the DRS rule when the vApp is deleted, you can use a workflow and AMQP notifications for that side of the process as well.

ChrisF (VCP4, VCP5, VCP-Cloud) - If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
0 Kudos