VMware Cloud Community
muralee29477
Contributor
Contributor
Jump to solution

ESXi HA and SQL Failover Clustering - Solved

  Dears

My Current environment is

3 Esxi 5.5 Hosts with HA enabled

Requirement ;

I have prepared 2 Windows 2012 R2 vm's and I need to build a two node SQL cluster  on these. (with WFCS) and I was reading the below article for the supported option  and found out that I need to to enable anti affinity rules

VMware KB: Microsoft Clustering on VMware vSphere: Guidelines for supported configurations

I got confused and lost on how to enable these options on  HA only clusters,

appreciate if somebody could share their experience in this regard,

Reply
0 Kudos
1 Solution

Accepted Solutions
vThinkBeyondVM
VMware Employee
VMware Employee
Jump to solution

DRS requires vSphere Enterprise license. That is the reason it is not showing these options in your environment. vSPhere HA requires vSphere Standard edition. As you have standard edition, you are able to configure HA.

There is NO as such impact.

1. You are using MSCS as cluster of VMs & if anything happens to clustering application configured, MSCS will failover to other VM in MSCS cluster.  (I am assuming you are using CIB config. Cluster in Box)

2. vSphere HA helps you to give additional level of HA on host/VM level. As you are running your MSCS cluster VMs on the top of hosts. vSPhere HA is additional HA.

3. In case, host fails, vSphere HA will failover all MSCS clustered VMs to other available host inside vSphere HA cluster. i.e It will restart all VMs on other host. Please note that restarting a VM will have minimal downtime. In this case, as all VMs are on same host, even MSCS cluster will have same downtime as vSphere HA will have. But if you are using CAB (Cluster across box ) as MSCS configuration, you can minimize MSCS  VMs downtime.

4. In case, VM itself fails (not host), vSphere HA will restart the failed VM on the same host. In this case MSCS will failover all your application on other VMs in MSCS cluster.

You have only vSPhere HA without DRS. It should be fine. Just that DRS gives some more flexibility to you.

Please note that in any HA solution, in case of failure, you will come across minimal downtime (time may differ across different HA solution).


----------------------------------------------------------------
Thanks & Regards
Vikas, VCP70, MCTS on AD, SCJP6.0, VCF, vSphere with Tanzu specialist.
https://vThinkBeyondVM.com/about
-----------------------------------------------------------------
Disclaimer: Any views or opinions expressed here are strictly my own. I am solely responsible for all content published here. Content published here is not read, reviewed or approved in advance by VMware and does not necessarily represent or reflect the views or opinions of VMware.

View solution in original post

Reply
0 Kudos
10 Replies
rcporto
Leadership
Leadership
Jump to solution

Have you enabled DRS in your cluster ?

Here is how to configure a VM-VM affinity rule: Create a VM-VM Affinity Rule in the vSphere Web Client

To read more about DRS rules, chek: VMware DRS Rules | Afininty and Anti-Affinity

---

Richardson Porto
Senior Infrastructure Specialist
LinkedIn: http://linkedin.com/in/richardsonporto
Reply
0 Kudos
muralee29477
Contributor
Contributor
Jump to solution

Dear Richardson

Thanks for the reply.

My environment is HA only cluster (ESXi Standard Edition) in this case how could I achieve  my goal?

Best regards

Reply
0 Kudos
vThinkBeyondVM
VMware Employee
VMware Employee
Jump to solution

As Richardson specified : You need to enable DRS to configure affinity rules. Once you enable DRS. You can refer below steps to configure anti-affinity rules.

1

Browse to the cluster in the vSphere Web Client navigator.

2

Click the Manage tab.

3

Click Settings and click DRS Rules.

4

Click Add.

5

In the Create DRS Rule dialog box, type a name for the rule.

6

From the Type drop-down menu, select either  Separate Virtual Machines.

7

Click Add.

8

Select at least two virtual machines to which the rule will apply and click OK.

9

Click OK.

Say, you selected 2 VMs in step 8, it is mean that these 2 VMs will not be on same host. 

Also vCenter 5.5 has introduced one advanced option ::::

in order to make VM-VM anti-affinity rule vSphere HA aware, you will have to configure one HA advanced option “das.respectVmVmAntiAffinityRules” to true. (default value of this advanced option is false). I repeat this is a HA advanced option, not the DRS advanced option. You can configure this option from web client through this workflow (Cluster>>Manage>>vSphere HA>>Advanced option). However, you can configure this option from Desktop client as well.


It is also important to note that, even when DRS is disabled on cluster, HA continues to honor above rule. As per the current design, we can not disable these rules when DRS is disabled. Hence care must be taken while disabling DRS, you can disable this rule when you disable DRS or when you want to disable this rule, enable DRS for a while in conservative migration threshold mode & disable this rule.


Recently I had written one blog on this as below.

Refer:is vSphere HA aware of DRS affinity rules? | vThinkBeyondVM


----------------------------------------------------------------
Thanks & Regards
Vikas, VCP70, MCTS on AD, SCJP6.0, VCF, vSphere with Tanzu specialist.
https://vThinkBeyondVM.com/about
-----------------------------------------------------------------
Disclaimer: Any views or opinions expressed here are strictly my own. I am solely responsible for all content published here. Content published here is not read, reviewed or approved in advance by VMware and does not necessarily represent or reflect the views or opinions of VMware.

Reply
0 Kudos
vThinkBeyondVM
VMware Employee
VMware Employee
Jump to solution

I assume, you do not have vCenter server. In order to leverage DRS, you need to have vCenter. It is must. Without vCenter we can not set DRS affinity rules.

I think, you are just using MSCS clustering on host level. (Cluster in Box or Cluster across box). Even in order to manage/configure vSphere HA (cluster of EsXi hosts), you need to have vCenter server.


----------------------------------------------------------------
Thanks & Regards
Vikas, VCP70, MCTS on AD, SCJP6.0, VCF, vSphere with Tanzu specialist.
https://vThinkBeyondVM.com/about
-----------------------------------------------------------------
Disclaimer: Any views or opinions expressed here are strictly my own. I am solely responsible for all content published here. Content published here is not read, reviewed or approved in advance by VMware and does not necessarily represent or reflect the views or opinions of VMware.

Reply
0 Kudos
muralee29477
Contributor
Contributor
Jump to solution

Dear Vicky

Thanks for the reply.

Does it mean that  I cannot configure AntiAfffinity / Affinity  rules on HA only Cluster? as I dont see these options in my configuration.

If it Yes  what will happen to the  SQL VM's Clustered with Shared disk (RDM) during a Host failover  ?

Reply
0 Kudos
vThinkBeyondVM
VMware Employee
VMware Employee
Jump to solution

please confirm below queries.

are you using MSCS (Microsoft clustering service) solution or similar clustering solution from any other Vendor?

do you have vCenter server installed?  (vCenter is primarily used to manage multiple ESXi host in single window and enabling several cool features)

As I said earlier, without vCenter, you can not configure affinity rules. in order to provide HA in case of host (ESXI) failure, you need to have vCenter initially to configure vSphere HA. 


----------------------------------------------------------------
Thanks & Regards
Vikas, VCP70, MCTS on AD, SCJP6.0, VCF, vSphere with Tanzu specialist.
https://vThinkBeyondVM.com/about
-----------------------------------------------------------------
Disclaimer: Any views or opinions expressed here are strictly my own. I am solely responsible for all content published here. Content published here is not read, reviewed or approved in advance by VMware and does not necessarily represent or reflect the views or opinions of VMware.

Reply
0 Kudos
muralee29477
Contributor
Contributor
Jump to solution

Dear Vicky

Please see the reply below

are you using MSCS (Microsoft clustering service) solution or similar clustering solution from any other Vendor?

Yes I am using MSCS within the SQL Guest VM with RDM disks

do you have vCenter server installed?  (vCenter is primarily used to manage multiple ESXi host in single window and enabling several cool features)

Yes , I do.

As I said earlier, without vCenter, you can not configure affinity rules. in order to provide HA in case of host (ESXI) failure, you need to have vCenter initially to configure vSphere HA.

Yes I have configured HA , My confusion started when I read the  section

HA/DRS specific configuration for clustered virtual machines on the article "VMware KB: Microsoft Clustering on VMware vSphere: Guidelines for supported configurations

Would like to know what will happen if we configure HA only cluster in my environment will it be supported , and will it have any impact on my cluster behaviour?

Best regards

Muralee

Reply
0 Kudos
vThinkBeyondVM
VMware Employee
VMware Employee
Jump to solution

DRS requires vSphere Enterprise license. That is the reason it is not showing these options in your environment. vSPhere HA requires vSphere Standard edition. As you have standard edition, you are able to configure HA.

There is NO as such impact.

1. You are using MSCS as cluster of VMs & if anything happens to clustering application configured, MSCS will failover to other VM in MSCS cluster.  (I am assuming you are using CIB config. Cluster in Box)

2. vSphere HA helps you to give additional level of HA on host/VM level. As you are running your MSCS cluster VMs on the top of hosts. vSPhere HA is additional HA.

3. In case, host fails, vSphere HA will failover all MSCS clustered VMs to other available host inside vSphere HA cluster. i.e It will restart all VMs on other host. Please note that restarting a VM will have minimal downtime. In this case, as all VMs are on same host, even MSCS cluster will have same downtime as vSphere HA will have. But if you are using CAB (Cluster across box ) as MSCS configuration, you can minimize MSCS  VMs downtime.

4. In case, VM itself fails (not host), vSphere HA will restart the failed VM on the same host. In this case MSCS will failover all your application on other VMs in MSCS cluster.

You have only vSPhere HA without DRS. It should be fine. Just that DRS gives some more flexibility to you.

Please note that in any HA solution, in case of failure, you will come across minimal downtime (time may differ across different HA solution).


----------------------------------------------------------------
Thanks & Regards
Vikas, VCP70, MCTS on AD, SCJP6.0, VCF, vSphere with Tanzu specialist.
https://vThinkBeyondVM.com/about
-----------------------------------------------------------------
Disclaimer: Any views or opinions expressed here are strictly my own. I am solely responsible for all content published here. Content published here is not read, reviewed or approved in advance by VMware and does not necessarily represent or reflect the views or opinions of VMware.

Reply
0 Kudos
muralee29477
Contributor
Contributor
Jump to solution

Dear Vicky

Thanks for the excellent reply.

It certainly cleared all my doubts.

I have one last query which is If I enable DRS (with proper ESXi license) then I need to enabled Affinity /Anti Affinity rules is it correct?

Also what does it mean by

Also vCenter 5.5 has introduced one advanced option ::::

in order to make VM-VM anti-affinity rule vSphere HA aware, you will have to configure one HA advanced option “das.respectVmVmAntiAffinityRules” to true. (default value of this advanced option is false). I repeat this is a HA advanced option, not the DRS advanced option. You can configure this option from web client through this workflow (Cluster>>Manage>>vSphere HA>>Advanced option). However, you can configure this option from Desktop client as well.


Is it mean that this will be configured when we enable HA and DRS?


Reply
0 Kudos
vThinkBeyondVM
VMware Employee
VMware Employee
Jump to solution

muralee29477 wrote:

I have one last query which is If I enable DRS (with proper ESXi license) then I need to enabled Affinity /Anti Affinity rules is it correct?

It is not required to configure affinity/anti-affinity rules when DRS is enabled as well. It is all depend on your requirement, what exactly you want to achieve by configuring these rules.

Let me give some details on these rules.

Below are the 4 DRS rules, you can configure. 

Here are the current DRS rules we can configure on the DRS cluster:
1. VM-VM affinity rule: This rule is intended to keep group of VMs together on single host.

2. VM-VM anti-affinity rule: This rule is intended to keep group of VMs away from each other all the time.

3. VM-Host affinity rule: This rule restricts to run a group of VMs on a group of Host. This rule can be hard/must or soft/should rule.

4. VM-Host anti-affinity rule: This rule does not allow  to  run a group of VMs on a group of Host. This rule can be hard/must or soft/should rule.

Now based on above rule details, you can choose any rule and configure that if that makes sense to your environment along with MSCS and vSphere HA.

One example:  rule number 2 (VM-VM anti-affinity) can be configured if you have 2 VMs on same host, say that host failed, both VMs will be down (or will be restarted on other host if vSphere HA is there). To avoid downtime for both VMs, you can configure VM-VM anti-affinity rule so that DRS will try its best to keep these VMs on separate host so that in case of failure only one VM will have downtime.

On another query on das.respectVmVmAntiAffinityRules:::: Please read my blog :is vSphere HA aware of DRS affinity rules? | vThinkBeyondVM


----------------------------------------------------------------
Thanks & Regards
Vikas, VCP70, MCTS on AD, SCJP6.0, VCF, vSphere with Tanzu specialist.
https://vThinkBeyondVM.com/about
-----------------------------------------------------------------
Disclaimer: Any views or opinions expressed here are strictly my own. I am solely responsible for all content published here. Content published here is not read, reviewed or approved in advance by VMware and does not necessarily represent or reflect the views or opinions of VMware.