How to setup a SQL Failover Cluster with VMware WorkStation
I wanted to setup a SQL Cluster environment with VMware workstation just to play with it and check out some of the features. I don’t have a SAN (SCSI) setup at home so I need to virtualize that. What I do have though is a 6 core 16 GB Ram work station that is fully capable of running this so here we go…..
Minimum Requirements
Host Machine
- Processor – 2 – 4 Cores
- Memory – 8 GB’s
Client Machines
Domain Controller (Required for VSAN and Clustering)
- 1 –2 Cores
- 1 GB Ram
Virtual SAN (iSCSI)
- 1 –2 Cores
- 1 GB Ram
- 200-500 GB Virtual Hard Disk
- SQL Servers (2)
- 2 –4 Cores
- 2 GB Ram
- Setup Operating Systems (Virtual Machines)
See my post here for details on how to setup a base virtual machine to make this process easier.
1. Setup a domain controller and create a domain (see here for tips on setting up the domain controller)
- create a domain level admin user account for usage later. Example – sqladmin
2. If a Virtual SAN is required – see this post for detailed steps on setting this up.
3. Create 1st SQL Virtual Machine
- Create Linked Clone
- Add a second host only network adapter
- Rename machine to SQL1
- Join to Domain
- Enable the Failover Clustering Feature (Administrative Tools – Server Manager – Features – Add Feature – Failover Clustering)
- Install the iSCSI client software but do not create the drives yet – details
- 4. Create 2nd SQL Virtual Machine using the above steps
- At this point all machines should be up and running.
- Setup the SAN Disks
- Reference this post for details on the steps below
1. 3 Drives must be created on the iSCSI target (order is critical)
- 5 GB drive – label Quorum
- 10 GB drive – label MSDTC
- 100 + GB Drive – label Data
2. Connect each of the drives to the SQL1 Machine and format NTFS
3. Connect each of the drives to the SQL 2 Machine (no formatting required)
The disks should now be available for usage in the cluster
Setup the Cluster
We want to test the configuration before proceeding so we can fix any changes ahead of time.
Validate the cluster
1. Launch the cluster manager (Administrative Tools – Failover Cluster Manager)
2. Click on Validate a Configuration
3. Click next – then enter the dns names of the two servers in the Select Servers Wizard
4. Once selected – run all of the tests and ensure they all pass. If not – you will need to address these before continuing.
5. Only after validating the configuration should you continue.
Setup
1. Select the two servers for the cluster
2. Provide an access point for the cluster (Name that it can be accessed by)
3. Complete the wizard. Once the cluster is created – move to the next step.
4. At this point the two nodes should appear in the cluster manager with a status of Up. Under the Storage section you should see all 3 drives. The first drive should by under the Quorum section with the other two drives not being used. If they are not online – right click and select "bring this resource online”
5. Go to Services and Applications – right click and select “Configure a service or application”
6. Select the DTC and click next
7. Give it a name, and then select the 2nd disk we created for storage. Complete the wizard.
At this point we are ready to install SQL Server
Setup SQL Server
SQL 1
1. Put in your SQL Server 2008 R2 disk or mount the ISO file.
2. Launch the installation and go to the SQL Server Installation Center.
3. Select Installation – New SQL Server failover cluster installation
4. Ensure all of the prerequisites pass.
5. Walk through the wizard
- Select DB Features
- Set your instance configuration and your public Cluster Name
- Select your cluster disk
- Under Service Accounts – use the Domain user you created above
- Complete the rest of the configuration based on your preferences
- Once the installation is complete – you can now connect to SQL server. Time to setup the other half.
SQL 2
1. Put in your SQL Server 2008 R2 disk or mount the ISO file.
2. Launch the installation and go to the SQL Server Installation Center.
3. Select Installation – Add note to a SQL Server failover cluster
4. Walk through the steps and select the cluster to attach to from the SQL 1 setup.
5. Once installation is complete – you now have a failover ready.
SQL Server should now show up under the Services and Applications section in the Failover Cluster Manager.