VMware Cloud Community
jorgensan
Contributor
Contributor
Jump to solution

VM placement in stretched cluster when deployed

We have created a stretched cluster over 2 sites, backed by vSAN, all good so far. 

Problems appear when we want to deploy a new vm with ansible. The playbook uses the cluster as a variable, not hosts, so it seems that vm placement is totally random. That is an issue as we want to deploy the vm's to only one of the sites. I know I can regulate this with drs rules, but there is no way to create rules on a vm before it is deployed? 

Does anyone know how to make sure vm's only gets deployed to the hosts on a site of my choice? 

Reply
0 Kudos
1 Solution

Accepted Solutions
LucianoPatrão
Jump to solution

Hi,

From the manual, you get:

With Local Affinity, customers can use policies to keep data on a single  site. In this case Primary Failures to Tolerate (PFTT) = 0.

This ensures that objects are not  replicated to the secondary site there by reducing the bandwidth required  between sites.

Additionally, by using Affinity rules, customers can set  VM/VMDK assignments to specific hosts.

For example, to test local affinity, you can set PFTT = 0, SFTT = 2,  FTM = RAID 5. The outcome of this test is that all IOs should be done  locally and not on the secondary site. This way, you can  seamlessly achieve host/disk protection for objects that do not require  site protection.

A few housekeeping rules for local affinity:

  1. Affinity will only be available when Stretched Clusters is enabled
  2. DRS/HA rules should be aligned with Data Locality
  3. RAID 0 / RAID 1 are supported for Hybrid and RAID 0 / RAID 1 / RAID 5 / RAID 6 are supported for All Flash

Honestly, I can't remember if, in the Fault Domain section, there is an option like VM Placement.

But I am pretty sure that you can do this using VM Storage policy, using Single Site Storage Policy. With this you can create a Local Affinity.

Hope this can help,

Luciano Patrão

VCP-DCV, VCAP-DCV Design 2023, VCP-Cloud 2023
vExpert vSAN, NSX, Cloud Provider, Veeam Vanguard
Solutions Architect - Tech Lead for VMware / Virtual Backups

________________________________
If helpful Please award points
Thank You
Blog: https://www.provirtualzone.com | Twitter: @Luciano_PT

View solution in original post

1 Reply
LucianoPatrão
Jump to solution

Hi,

From the manual, you get:

With Local Affinity, customers can use policies to keep data on a single  site. In this case Primary Failures to Tolerate (PFTT) = 0.

This ensures that objects are not  replicated to the secondary site there by reducing the bandwidth required  between sites.

Additionally, by using Affinity rules, customers can set  VM/VMDK assignments to specific hosts.

For example, to test local affinity, you can set PFTT = 0, SFTT = 2,  FTM = RAID 5. The outcome of this test is that all IOs should be done  locally and not on the secondary site. This way, you can  seamlessly achieve host/disk protection for objects that do not require  site protection.

A few housekeeping rules for local affinity:

  1. Affinity will only be available when Stretched Clusters is enabled
  2. DRS/HA rules should be aligned with Data Locality
  3. RAID 0 / RAID 1 are supported for Hybrid and RAID 0 / RAID 1 / RAID 5 / RAID 6 are supported for All Flash

Honestly, I can't remember if, in the Fault Domain section, there is an option like VM Placement.

But I am pretty sure that you can do this using VM Storage policy, using Single Site Storage Policy. With this you can create a Local Affinity.

Hope this can help,

Luciano Patrão

VCP-DCV, VCAP-DCV Design 2023, VCP-Cloud 2023
vExpert vSAN, NSX, Cloud Provider, Veeam Vanguard
Solutions Architect - Tech Lead for VMware / Virtual Backups

________________________________
If helpful Please award points
Thank You
Blog: https://www.provirtualzone.com | Twitter: @Luciano_PT