Top Banner
Setup Microsoft SQL Server 2008 R2 Failover Cluster in VMware Workstation If you search on internet about setting up Microsoft SQL Server 2008 R2 Failover Cluster in any desktop virtualization software, you can’t find it in one place. Here you can see step by step how to setup Microsoft SQL Server 2008 R2 Failover Cluster in VMware Workstation on your personal computer. Hardware Information: Dell Inspiron 570 AMD Athlon II x3 435 Processor 2.9 GHz Installed memory (RAM): 6.00 GB Hard disk: 500GB System type: 64-bit Operating System Operating System: Windows 7 Home Premium Required Software: 1) VMWare Workstation 7 (with free trial for 30 days) VMware-workstation-full-7.1.3-324285 2) Windows Server 2008 R2 (with trial license free for 180 days) 7600.16385.090713-1255_x64fre_server_eval_en-us-GRMSXEVAL_EN_DVD 3) Starwind Software (with free trial for 30 days) 4) SQL Server 2008 R2 (Download from Microsoft website) 5) Three virtual machines: one setup as Domain Controller and DNS Server(DC), the other two as clustered nodes (WIN1 and WIN2). I. Installation of VMware and Create Virtual Machines 1) install VMware ( I am sure you all know how to install VMware software on your computer)
97

Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

Feb 22, 2015

Download

Documents

Saravana Kumar
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

Setup Microsoft SQL Server 2008 R2 Failover Cluster in VMware Workstation

If you search on internet about setting up Microsoft SQL Server 2008 R2 Failover Cluster in any desktop virtualization software, you can’t find it in one place. Here you can see step by step how to setup Microsoft SQL Server 2008 R2 Failover Cluster in VMware Workstation on your personal computer.

Hardware Information:

Dell Inspiron 570 AMD Athlon II x3 435 Processor 2.9 GHz

Installed memory (RAM): 6.00 GB

Hard disk: 500GB

System type: 64-bit Operating System

Operating System: Windows 7 Home Premium

Required Software:

1) VMWare Workstation 7 (with free trial for 30 days)

VMware-workstation-full-7.1.3-324285

2) Windows Server 2008 R2 (with trial license free for 180 days)

7600.16385.090713-1255_x64fre_server_eval_en-us-GRMSXEVAL_EN_DVD

3) Starwind Software (with free trial for 30 days)

4) SQL Server 2008 R2 (Download from Microsoft website)

5) Three virtual machines: one setup as Domain Controller and DNS Server(DC), the other two as clustered nodes (WIN1 and WIN2).

I. Installation of VMware and Create Virtual Machines

1) install VMware ( I am sure you all know how to install VMware software on your computer)

2) create first VM machine named DC (Domain Controller)

Choose Typical (recommended) and Click Next

Page 2: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

Click I will install the operating system later and click Next

Page 3: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

Choose Microsoft Windows for Guest Operating system and choose Windows Server 2008 R2x64 for version and click Next

Give Virtual machine name: DC and type in the path of the location of VM going to be created.

Page 4: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

Default maximum disk size is 40GB, you may adjust allocation size according to your own needs.

Page 5: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

Review the summary page and click Finish. You may also customize your Hardware settings by clicking Customize Hardware…

3) click Edit Virtual Machine Settings tab to point Virtual CD Rom to use ISO image file:

Page 6: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

4) Power on VM and start installation of Windows Server 2008 R2

The next few steps are pretty much self explanatory.

Page 7: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

Choose Windows Server 2008 R2 Enterprise Edition

Page 8: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7
Page 9: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

Give a strong password when prompted and I am done with installing Windows Server 2008R2.

Page 10: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

5) Clone two more VM machines as WIN1 and WIN2 from DC.

Page 11: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

Choose Create a full clone and Click Next

Page 12: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

Enter WIN1 for Virtual machine name and path for location

Page 13: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

6) do the same as above steps to clone WIN2.

7) Configure network card information

a) assign static I.P to three machines as

DC WIN1 WIN2

I.P Address 192.168.102.128 192.168.102.129 192.168.102.130

Subnet Mask 255.255.255.0 255.255.255.0 255.255.255.0

Default Gateway 192.168.102.2 192.168.102.2 192.168.102.2

DNS Server 192.168.102.128 192.168.102.128 192.168.102.128

b) make sure three machines can ping each other.

3, Install Active Directory Service on DC and thus creating DNS Server as well.

1) Install Active Directory Service

Page 14: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7
Page 15: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7
Page 16: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

2) start dcpromo.exe command and the next screen will show up:

Page 17: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7
Page 18: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7
Page 19: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

Choose Assign Static I.P. option

Page 20: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7
Page 21: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7
Page 22: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7
Page 23: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

4, Add Win1 and Win2 to Domain Controller

a) Add WIN2 to Domain Controller

Click Change

Page 24: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

Enter Domain name as testcluster.com

Page 25: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

b) Add WIN1 to the domain.

III. Install Starwind Software to create SCSI disks:

1) Install Starwind software on DC virtual machine

Page 26: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7
Page 27: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7
Page 28: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7
Page 29: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7
Page 30: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7
Page 31: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

2) Start Starwind software

In the left pane, right click testcluster.com and click Connect

At the login prompt, the username field will have root already entered. Enter starwind for the password and click OK.

In the left pane, right click Targets and select Add Target.

Add a target alias as of Quorum and click Next.

Page 32: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

Leave Storage type as Hard Disk and click Next

Page 33: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

Leave Device Type as Basic Virtual and click Next

Page 34: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

Leave Device type as Image File Device and click Next

Click Create New Virtual Disk and click Next

Page 35: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

Type in name of c:\q.img, enter 5210 for the size in MB field and click Next

Page 36: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

Leave Asnychronous mode selected, select Allow Multiple concurrent iSCSI connections (clustering) and click Next

Bypassing this screen and click Next

Page 37: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

Click Next to continue

Page 38: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

Click Finish to complete creating an iSCSI disk

Page 39: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

Do the same for the following disks:

Name File Size

Data c:\s.img 5120Mb

Logs c:\l.img 5120Mb

MSDTC c:\m.img 5210Mb

Close StarWindManagement Console

Configuring the iSCSI initiator

Click WIN1 tab

Page 40: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

If Microsoft iSCSI service is not already started, you will see next popup and just click Yes to continue.

Page 41: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

Enter Target name or I.P in the Target window: Click Connect for each disk.

Do the same for the WIN2.

Page 42: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

Open the computer management window:

Right click disk management will bring up the next window:

Page 43: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

Bring the disks online and initialize the disks and label them

Page 44: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7
Page 45: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7
Page 46: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

Do the same for DISK2, DISK3 and DISK4, assigning them drive letters Q,L and M and labeling them, Logs, Quorum and MSDTC, respectively.

Page 47: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

IV. Adding Failover Cluster Feature on each node and Verifying Cluster

1) Adding Failover cluster feature on each node(WIN1 and WIN2)

Page 48: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

2) Validating a Windows failover Cluster

Page 49: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7
Page 50: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

Enter the server name of the clustered node:

Win1.testcluster.com

Win2.testcluster.com

Page 51: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7
Page 52: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7
Page 53: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

There are warnings on the network section, basically saying that there is one point of failure because I only configure one set of network card. In real world, you should configure two sets of network cards for high availability. In our situation here, just a testing, I would just leave as it is.

Overall result is pass and at this point, we can go ahead install SQL Server 2008 R2

Page 54: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

V. Installation of SQL Server 2008 R2

1) Runing Failover Cluster Wizard

Page 55: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

Enter win1.testcluster.com, win2.testcluster.com

Enter vmcluster for Cluster Name and 192.168.102.131 for I.P Address.

Page 56: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7
Page 57: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7
Page 58: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

3) Installing MSDTC on a failover cluster

Page 59: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

Enter vmclusterDTC for Name and 192.168.102.132 for I.P Address.

Page 60: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

Check mark Cluster Disk4 and click Next

Page 61: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7
Page 62: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

vmclusterDtc service is created and online

4) Installing SQL Server 2008 R2 on WIN1

Page 63: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

Choose New SQL Server Failover cluster installation

Page 64: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7
Page 65: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7
Page 66: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7
Page 67: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7
Page 68: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7
Page 69: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

Choose Disk2 and Disk3

Page 70: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

Uncheck DHCP and type in I.P address 192.168.102.133

Page 71: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7
Page 72: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

Choose use the same account for all SQL Server services

Page 73: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7
Page 74: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7
Page 75: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7
Page 76: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7
Page 77: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7
Page 78: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

VI. Add WIN2 to the SQL Cluster

Choose Add node to a SQL Server failover cluster

Page 79: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7
Page 80: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7
Page 81: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7
Page 82: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

Enter password for SQL Server Engine and SQL Server Agent account.

Page 83: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7
Page 84: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7
Page 85: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7
Page 86: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

VII. Test Failover

Start Microsoft SQL Server Management Studio from DC machine and connect to SQL Server on the SQL Cluster do a query (see below)

Page 87: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

Current owner is WIN2

I will initiate Failover to WIN1 from WIN2

Page 88: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

Click Move SQL Server (MSSQLSERVER) to WIN1 and wait for about 20 seconds.

Now current owner is WIN1

Page 89: Setup SQL Cluster r2 Failover Cluster in Vmware Workstation 7

In the management Studio, click the Execute button again, the same query will run and return the following result:

Congratulations. You have successfully setup SQL Server 2008 R2 Failover Cluster on your personal computer.

The whole process has been tested twice on my desktop computer. Any questions or comments are welcome. Hope it helps if you are setting up your own failover cluster.