To ensure that all virtual machines that in an availability zone run on ESXi hosts in the same zone in VMware Cloud Foundation, you create and configure host and virtual machine groups rules in vSphere DRS .
Procedure
- In a Web browser, log in to vCenter Server by using the vSphere Client.
Setting Value URL https://sfo01m01vc01.sfo01.rainpole.local/ui User name [email protected] Password vsphere_admin_password - In the Hosts and Clusters inventory, expand the sfo01w01vc01.sfo01.rainpole.local tree.
- Select the sfo01-w01-shared01 cluster and click the Configure tab.
- Create host groups, each containing the ESXi hosts in the availability zone.
- In the Configuration section, click VM/Host groups and click Add.
- In the Create VM/Host group dialog box, configure the settings and click OK.
Setting Value for Availability Zone 1 Value for Availability Zone 2 Name availability-zone-1-hosts availability-zone-2-hosts Type Host group Host group Members - sfo01w01esx01.sfo01.rainpole.local
- sfo01w01esx02.sfo01.rainpole.local
- sfo01w01esx03.sfo01.rainpole.local
- sfo01w01esx04.sfo01.rainpole.local
- sfo02w01esx01.sfo01.rainpole.local
- sfo02w01esx02.sfo01.rainpole.local
- sfo02w01esx03.sfo01.rainpole.local
- sfo02w01esx04.sfo01.rainpole.local
- Repeat this step to create the host group for the other availability zone.
- Create virtual machine groups, each containing the two edge nodes in the availability zone.
- In the Configuration section, click VM/Host groups and click Add.
- In the Create VM/Host group dialog box, configure the settings and click OK.
Setting Value for Availability Zone 1 Value for Availability Zone 2 Name availability-zone-1-vms availability-zone-2-vms Type VM group VM group Members - sfo01wesg01
- sfo01wesg02
- sfo02wesg01
- sfo02wesg02
- Repeat this step to create the virtual machine group for the other availability zone
- Create rules for running virtual machines on hosts in their initial availability zone.
- In the Configuration section, click VM/Host rules.
- On the VM/Host rules page, click the Add button.
- In the Create VM/Host rule dialog box, enter the settings, and click OK.
Setting Value for Availability Group 1 Value for Availability Group 2 Name hostgroup-availability-zone-1 hostgroup-availability-zone-2 Enable rule Selected Selected Type Virtual Machines to Hosts Virtual Machines to Hosts VM group availability-zone-1-vms availability-zone-2-vms Action Should run on hosts in group. Should run on hosts in group. Host group availability-zone-1-hosts availability-zone-2-hosts - Repeat this step to create the rule for the other availability zone.