A Guide to installing Microsoft Failover Clustering and SQL Failover Clustering on VMware vSphere on 2 Windows VMs across 2 VMware hosts

rhiancohenVMware Senior Consultant
A Guide to installing Microsoft Failover Clustering and SQL Failover Clustering on VMware vSphere on 2 Windows VMs across 2 VMware hosts

VMware vSphere supports clustering using MSCS across virtual machines. Clustering virtual machines can
reduce the hardware costs of traditional high-availability clusters

Clustering Configuration Overview

Several applications use clustering, including stateless applications such as Web servers, and applications with built-in recovery features such as Database servers. You can set up MSCS clusters in several configurations, depending on your environment.

A typical clustering setup includes:
  • Disks that are shared between nodes. A shared disk is required as a quorum disk. In a cluster of virtual machines across physical hosts, the shared disk must be on a Fibre Channel (FC) SAN.
  • A private heartbeat network between nodes
  • Failover Clustering feature is available with Windows Server 2008/R2 and above Enterprise/Datacenter editions. You don't have this feature with the Standard edition of Windows Server 2008/R2
  • You also need a form of Shared Storage (FC)
  • To use the native disk support included in failover clustering, use basic disks, not dynamic disks and format as NTFS
  • 1 or more Windows 2008 R2 Domain Controller Virtual Machines with Active Directory Services and a Domain
  • 1 x Windows Server 2008 R2 Virtual Machine for Node 1 of the Windows Cluster with 2 NICs
  • 1 x Windows Server 2008 R2 Virtual Machine for Node 2 of the Windows Cluster with 2 NICs
  • Make sure all Virtual Machine are joined to the domain
  • Make sure all Virtual Machines are fully updated and patched with the latest S/W updates
  • You may need to adjust your Windows Firewall
  • On the first network adapter rename this as Public and on the second adapter, rename this as Private or MSCS Heartbeat
  • On the first network adapter, add the static IP address, Subnet Mask, Gateway and DNS
  • On the second network adapter, just add the IP Address and Subnet Mask
  • Go back to the original screen and untick the following boxes
  • Clear the Client for Microsoft Networks
  • Clear the File and Printer Sharing
  • Clear QOS Packet Scheduler
  • Clear Link Layer Topology checkboxes
sql2.bmpClick Properties on Internet Protocol Version 4 (TCP/IPv4)

  • Click the DNS tab and clear the Register this Connection's Addresses in DNS
  • Select the WINS tab and clear the Enable LMHOSTS Lookup checkbox
  • After you configured the IP addresses on every network adapter verify the order in which they are accessed. Go to Network Connections click Advanced > Advanced Settings and make sure that your LAN connection is the first one. If not click the up or down arrow to move the connection on top of the list. This is the network clients will use to connect to the services offered by the cluster.
sql6.bmpAdding Storage

Check that your Storage Admin has already pre-created the LUNs that we are going to assign
  •  Go to vCenter and click Edit Settings
  • Select Add > Select Hard Disk
  • Select Raw Device Mapping
  • You will see that there are 4 LUNs available. This is because you want to set up Microsoft Failover Clustering with SQL Failover clustering and you need 4 disks for the Quorum, SQL Data, SQL Logs and MSDTC
  • Select to store with the Virtual Machine. When an RDM is used, a small VMDK file is created on a VMFS Datastore and is a pointer to the RDM. This will be used when you configure the 2nd node in the cluster
  • Select Compatibility Mode. Physical Compatibility Mode is required for Microsoft Failover Cluster across hosts
  • Review and Finish
  • Because you added the new disk as a new device on a new bus, you now have a new virtual SCSI controller which will default to the recommended type, LSI Logic SAS for Windows 2008 and Windows 2008 R2
  • In Edit Settings, you need to click on the newly created SCSI Controller and select Physical for SCSI Bus Sharing. This is required for failover clustering to detect the storage as usable
  • You now need to repeat this action for all RDMs you need to add
  • Be careful as you need to generally choose  a new SCSI Controller for each drive you create as a Best Practice. If you run out of SCSI Controllers, just choose another  but never choose Controller 0
  • When you have finished adding all the RDMs you should see the following in Edit Settings for the VM
  • You should now have the following setup to work with
  • Note: Each Disk is on its own SCSI Bus. There are only 4 SCSI Controllers which allow 15 devices to be attached in VMware so use them all then you will need to reuse SCSI Controllers as you can see in the below table
  • Next we need to add the RDMs to the second VM which is a slightly different procedure
  • Click Edit Settings on the 2nd VM and Add Hard Disk
  • Select Use an existing Virtual Disk
  • To select the RDM Pointer file browse to the Datastore and folder for the VM where you created the pointer file on the first VM
  • Select the same SCSI Virtual Device Node you setup on the first VM for the first RDM
  • Review Settings and make sure everything is correct
  • Next you will need to set the SCSI Bus Sharing Mode to Physical and verify that the type is LSI Logic SAS
  • You now need to do the same for all the disks that have been added
  • Check everything looks correct and this is your storage setup
Configuring the storage on the VMs
  • Power on Node/VM1
  • Connect to Node1/VM1
  • Launch Server Manager and navigate to Disk Management under Storage
  • In Disk Manager you will see the new disks as being offline
  • Right click each disk and select Online and if necessary right click again and select Initialise Disk then select the MBR partition type
  • Create a simple volume on all 4 disks which should then look like the below
  • Next Power on and log into Node2/VM2
  • Open Disk Management and right click each disk and select Online. Once the Disks are online you will see the volume labels and status
  • If the disks have been assigned the next available drive letters then you will need to change the drive letters to match the letters you assigned on Node1/VM1
  • The disks will now look identical to Node1/VM1
Install Microsoft Failover Clustering

You will need to install Failover Clustering on both nodes as per below procedure
  • Open Server Manager > Add Features > Failover Clustering
  • Click Install
  • On the first Node1/VM1 click Start > Administrative Tools > Failover Cluster Manager
  • Click on Validate a Cluster
  • Validation will run a variety of tests against your virtual hardware including the storage and networking to verify if the hardware is configured correctly to support a failover cluster. To pass all tests, both nodes must be online and the hardware must be configured correctly
  • Select your 2 Nodes/VMs
  • Click Next and Run all Tests
  • Verify the server names and check the tests
  • Click Run and the tests will begin
  • Your configuration is now validated and you can check the reports for anything which is incorrect
  • Click Create the cluster now using the validated nodes
  • Type a name for your cluster
  • Type an IP Address for the Cluster IP
  • Check Networks and Type and IP Address
  • Check details are all correct and click Create
  • Finish and check everything is setup OK
  • If you want to install SQL Server clustering, we will need to install a MSDTC Service
  • Go to Services and Applications – right click and select “Configure a service or application
  • Click Next and select DTC
  • Put in a name and IP Address for the DTC. E.g. PPM-APB-DTC where PPM is the environment name
  • Click Next and select the storage you created for the MSDTC
  • Click Next and Review the confirmation
  • Click Next and the MSDTC Service will be created
  • Finish and make sure everything was setup successfully
  • You have now set up your Windows Failover Cluster
  • Check that your Windows Cluster IP and your MSDTC IP are listed in DNS
To set up SQL Server Failover Clustering

Pre Requisites
  • You must have installed Microsoft .NET Framework on both nodes in the cluster - On the Windows Server, you can go to Add Features and select Microsoft .NET 3.5 SP1 or install .NET 4 from the internet
  • Create all necessary SQL Server Active Directory Groups for the relevant SQL Server Services (SQL Agent, DB Agent, Analysis Services) Note that Reporting Services/Integration Services are not cluster aware but you can install it to be used with the server
  • Make sure all patching and software updates are current
  • You must be running Microsoft Enterprise/Datacenter edition
  • Disk I/O timeout is 60 seconds or more (HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Disk\TimeOutValue)
  • If you place the boot disk on a virtual disk, select Support Clustering Features such as Fault Tolerance during disk provisioning.
  • Please see the table below for an example of the amount of NICs and different subnets required for a 2 Node Windows/SQL Cluster. IP Addresses are from my lab just as example
sql42.bmpNumber of Nodes supported by SQL Server versions

sql43.bmpInstructions for Node 1
  • On Node 1, connect the SQL Server 2005/2008 ISO or installer
  • Click Setup and choose New SQL Server Failover Cluster Installation
  • Select Product Key
  • Accept the License Screen
  • Setup Support Files.
  • Select to Install Setup Support Rules
  • Validate that the checks return successful results. If the checks returned a few warnings, make sure you fix them before proceeding with the installation. An example of this is the Network binding order.
  • If you get a Network Binding error and your bindings all look correct with the LAN NIC at the top correctly then please try modifying the registry. It looks like sometimes the system takes the Virtual Cluster adapter to be the top binding but this is not visible from Network Connections Window when you go into Advanced settings
  • Drill down to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Linkage and open up the Bind value and move the LAN ID to the top
  • On Feature, Select Database Engine Services
  • Note that Reporting Services/Integration Services are not cluster aware but you can install it to be used with just this server
  • Change Shared Feature Directory to D and Shared Feature Directory (x86) to D
  • Specify a SQL Server Cluster Name. E.g. PPM-APB-DB
  • Keep the default instance MSSQLSERVER or choose a new instance as required
  • Change Instance Root Directory to D
  • Click Next
  • Check Disk Space Requirements
  • On the Cluster Resource Group, you can keep the settings as SQL Server (MSSQLSERVER)
  • Click Next
  • In the Cluster Disk Selection, Select the disks you want to use for SQL DB and SQL Logs (Make sure both are ticked!!!)
  • Next the Cluster Network Configuration
  • Untick DHCP and provide a new IP Address and Subnet
  • On Cluster Security Policy, keep Use Service SSIDs
  • On Service Accounts, please fill in the AD accounts you previously created for SQL Server Agent and SQL Server DB Engine
  • Note that the start-up type is set to manual for all cluster-aware services and cannot be changed during the installation process. Click Next.
  • Check Collation is as you want it - Usually Latin1_General_C1_AS
  • In Database Engine Configuration, select Windows Authentication mode and add the users and groups you want to be able to access SQL
  • Click the Data Directories Tab and configure these paths as appropriate
  • Note: The below paths are just an example in terms of letters to use and it will depend on how much storage you created and what letters you assigned to the storage
  • Enable Filestream if you want/require it.
  • On Error and Usage Configuration, untick both options and click Next
  • Next
  • Next
  • Install
sql51.bmpInstructions for Node 2
  • Choose Add Node to a SQL Server Failover Cluster
  • Next
  • Put in Product Key
  • Accept Licensing
  • Install Setup Support Files
  • Check Setup Support Rules
  • On the Cluster Node Configuration, check this is all correct
  • Enter password for SQL Server Engine and SQL Server Agent account
  • Click Next on Error Reporting
  • Click Next on Add Node Rules
  • Click Install
  • Complete and Close
Testing Failover
  • Log into the SQL Server and open SQL Management Studio. Test a query against your DB
  • Open Failover Cluster Manager
  • Go to Services and Applications
  • Click on SQL Server (Cluster Name)
  • Select Move this Application or Service to another node.
  • Once this has transferred, do the same query test on the second server and make sure everything works as expected.
  • If so then Failover is working correctly
  • Within VMware create a HA Rule to keep these 2 DB Servers running on different  hosts to provide good failover
SQL Configuration Manager
Once complete for all SQL installs, go into SQL Configuration Manager, and enable TCP/IP protocol, then put in 1433 port

sql55.bmp Groups
  • Next Just check everyone is in the SQL Admins group who needs to be in Active Directory and you are good to go
Articles of Interest

VMware KB Article KB 1008542
I/O Crash Consistency in VMware based Virtual Environments
This article explains storage IO crash consistency for VMware products

Setup for Failover Clustering and Microsoft Cluster Service
Example setups and different ways of setting up clustering within VMware

Microsoft Clustering on VMware vSphere: Guidelines for Supported Configurations (1037959)
This article provides clear guidelines and vSphere support status for running various Microsoft clustering solutions and configurations.

Other Information

This article can also be found on my blog located at http://www.electricmonk.org.uk. There are 2 articles. One of which is related to setting up Windows Failover Clustering and the other is related to setting up SQL Failover Clustering.


rhiancohenVMware Senior Consultant

Comments (1)

rhiancohenVMware Senior Consultant


Hi LHerrou,

Thankyou for your comments

Can you expand on your 2 points as I would really like to know where it can be improved and especially not be dangerous to anyone

1. Would it be better to have this article  based on Windows Server 2012 and SQL 2012?  Did you mean using Windows Server 2008 R2 is dated? The VMware version can be 4 or 5 upwards for this article. What do you mean when you say much of the content is not original? Do you mean other people have written the similar articles?

2. Could you tell me what advice could be construed as dangerous and I will amend asap. Any feedback welcome as I didn't want to put anyone at risk with any of this article's content.

Many Thanks


Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.