Discussion Locked

Building a Virtual Cluster Server with VMWare and MSCS

0 helpful
24 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Today's companies have tendencies to virtualize everything. Is this good or bad, this is another discussion. The fact is that with virtualization, you can [u]simply build a cluster environment[/u] as a POC for a project. This can also be used for [i]training, demonstration[/i] and even [i]post-sales support[/i]. This article is an extract of a full documentation I am writing. It explains step by steps how to configure VMWare with Microsoft Cluster Service (MSCS) and a Virtual SQL Server.

What you need (recommended specifications)
[i]- a powerful server with
- CPU: dual-core P4 3Ghz or Xeon 2Ghz
- RAM: 4Gb
- HDD: 50 Gb of free space
- 1 VMWare running Windows Server 2003 Enterprise Edition.
- SQL Server 2000 SP3/SP4 Enterprise or 2005 Enterprise
- VMWare (I used VMWare Server 1.0)
- a Microsoft Domain (Active Directory) and a Microsoft DNS Server (can run on VMWare)[/i]

[b]1. Configuring the shared storage[/b]
A cluster server requires access to an identical, highly available, shared storage. Without using virtualization, this requires SCSI or fiber channel connected storage. With VMWare, you can simulate this by configuring on the VMWare settings the access to an identical -shared- virtual disk.
Edit your Windows Server 2003 Virtual Machine Settings and add 2 virtual disks. Your machine must obviously be stopped. Proceed as following:
- create a folder where you will place your virtual disks
- Edit your Windows Server 2003 Virtual Machine Settings
- create a virtual disk
- disk size 2Gb (do not allocate disk now)
- define your destination path as created previously + name your first disk CLUSTER_QUORUM
- select the advanced options: select the virtual device node to "SCSI 1:0" and the mode to "Independent" and "Persistent"
- create a second one named DATABASE_QUORUM on the virtual device node "SCSI 2:0".

[b]2. VMWare Device configuration[/b]
Ok now let's make a point on the Devices configuration of your virtual machine. You should have:
- Memory: recommended 1Gb
- Hard Disk (SCSI 1:0) Independed-Persistant: this is the CLUSTER_QUORUM
- Hard Disk 2 (SCSI 2:0) Independed-Persistant: this is the DATABASE_QUORUM
- Hard Disk 3 (IDE 0:0): this is your local c: drive
- CD-ROM
- Ethernet (bridged by default)
- Ethernet 2 (bridged by default)
- Processor 1 or 2

[b]3. Adding line in VMWare configuration file[/b]
This entire configuration is stored in the vmx file of your Virtual Machine. Edit it and take a look at it. You may want to do dome cleaning but make sure you did a backup of it before.
You'll need to add some line to make VMWare use a shared disk as it would do in real cluster hardware. You may use my sample code:

[i]###BEGIN#SHARED#STORAGE###
disk.locking = "FALSE"
diskLib.dataCacheMaxSize = "0"

#scsi1 data storage
scsi1.present = "TRUE"
scsi1.virtualDev = "lsilogic"
scsi1.sharedbus = "virtual"
scsi1:0.present = "TRUE"
scsi1:0.fileName = "E:\Cluster\storage\CLUSTER_QUORUM.vmdk"
scsi1:0.mode = "independent-persistent"
scsi1:0.shared = "TRUE"
scsi1:0.redo = ""

#scsi2 quorum
scsi2.present = "TRUE"
scsi2.virtualDev = "lsilogic"
Page 110 on 143
scsi2.sharedbus = "virtual"
scsi2:0.present = "TRUE"
scsi2:0.fileName = "E:\Cluster\storage\DATABASE_QUORUM.vmdk"
scsi2:0.mode = "independent-persistent"
scsi2:0.shared = "TRUE"
scsi2:0.redo = ""
###END#SHARED#STORAGE###[/i]

[b]4. Initialize and Convert Shared Disks[/b]
Start your Virtual machine by clicking and open the "Computer Management" dialog (Start > All Programs > Administrative Tools > Computer Management). Click on the Disk Management tree node and you'll immediately be prompted to with the "Initialize and Convert Disk Wizard".
- Do NOT convert any of the disks to dynamic since we need then to be basic so make sure that the two disks are unchecked.
- Create for each disk an extended partition of all the available size
- When this is done, create for in partition a logical drive of the available size, assign a drive letter and format it with NTFS with the quick format checkbox enabled.

[b]5. Prepare your second node[/b]
To build the second server of your cluster, just power off your actual server (we'll call it Node 1) and duplicate the VMWare files (separate them into different folders).
You?ll need then to power on the Node 2, change the machine name and IP Address.

[b]6. Network, Domain and DNS configuration[/b]
Your both nodes are running. It is now time to join the domain. We'll need them to be configured with fixed IP. The second NIC of each node should be configured with a 10.0.0.1/8 and 10.0.0.2/8 IPs. No need to put this in the DNS, this is just for the intra-cluster communication (aka Heart-Beat).
When this is done, have them joining your Active Directory.
Also you can prepare 1 IP and 1 name in the DNS for:
- Cluster
- SQL-Virtual SQL Server
- SQL-MSDTC (aka Distributed Coordinator)

[b]7. Create your cluster.[/b]
Microsoft Windows Server comes with the Cluster feature by default installed (not like Windows 2000 Advanced Server).
In the administrative Tools, open the Cluster administrator.
Step by step procedure:
- you will automatically be prompted with the "create new cluster wizard"
- Enter then the cluster name as created in your DNS and in your domain
- Select the node on which you are working now, it will be the first member of the cluster. We'll add the second later
- Enter then a domain administrator user account (it is possible to restrict the rights/permission set if there would be a company security policy).
- Add the second node to the create cluster (you don't need to log on the second node, you can do it from Node 1)

[b]8. Prepare the Cluster Group for SQL[/b]
In your Cluster Administrator panel, you now have two groups: "Cluster Group" and "Disk1 Group". Rename "Disk1 Group" to "Database Group".
Configure your network resources to match the internal network and public-network.

[b]9. Create the MSDTC resource[/b]
MSDTC is a requirement for SQL Server when you need SSIS, Notification Services or Workstation. The Distributed Coordinator Service cannot be started on a Cluster Node. For this reason, it is required to create it as a Cluster Resource.
Proceed as explained in http://support.microsoft.com/kb/301600 - How to configure Microsoft Distributed Transaction Coordinator on a Windows Server 2003 cluster: in the "Database Group"
- Create an IP address resource (SQL_MSDTC_IP)
- Create an Network Name resource (SQL_MSDTC_Name)
- Create an MSDTC resource (SQL_MSDTC_Resource): for the Resource Type, click to select Distributed Transaction Coordinator

[b]10. Install your Virtual SQL Server[/b]
When prompted:
- install SQL Server Database Services AND a SQL Server failover cluster
- select the public IP address as defined in f.
- add your two nodes as part of the cluster
- select to create a default instance. If you want and active/active cluster, you will need to install a named instance afterward

That's all; you have your Microsoft Cluster Server running a Virtual SQL Server instance.
Any remark or question is welcome.

Nicolas Gruloos.

24 replies

by naeim

Hello
I can do this article "Building a Virtual Cluster Server with VMWare and MSCS " but you can do exchnage cluster on it,,i try it but i can not,,for explain what i do :
1.cluster 2 node exactly this article.
2.install & run iis,nntp,smtp,asp.net,www,dcdiag,netdiag on 2 node.
3.install forestprep ,domainprep on 2 node.
4.install exchange 2003 on 2 node but in action can not set typically because see this error:"you must have Distributed Transaction Coordinator resource running on at least one node in cluster to continue."

by drutledge1

One minor nitpick - I think the duplicate MS SIDs generated by copying the server will cause problems if you try to use this in a virtual domain, especially if you are trying to model the behavior of Kerberos for server linking / replication / n-tier apps. It might be better to sysprep the server, copy it, then go through the mini-setup to get a good server that can pass muster with Kerberos.

(Unless VMWare is resetting the SID through that dialog that pops up when you start a copied guest host) (doubtful)

by jduvalle

It seems that NewSID is now discontinued and is not available now. I did find it on the net and this works like I expected.

Your article and advice was great at getting my DEV environment working with a cluster.

Thanks,
Jason

by ngruloos

Interrested in having an article on building a Veritas Cluster Server on VMWare?
-> join my LinkedIn network and give me a recommendation, I'll deliver you the pdf!
Thanks :)

by ngruloos

Hi, if you like this article, I will really appreciate that you join my LinkedIn network and you give me a recommendation.
Kind regards, Nicolas

by phgarey

The command-line code includes a line stating, "Page 110 on 143". Is this correct, or an error / artifact? Thanks very much.

by rajnair7

I cannot get a local hard disk with IDE 0:0
When i create a vm in vmware workstation 6.0 it only creates a scsi disk.

so i have 3 disks after creating the 2 virtual disks .
1) hard disk scsi 0:0 (8.gb , created when creating the virtual machine)
2) virtual disk 1 cluster_quorum (2 gb)
3) virtual disk 2 database_quorum ( 2 GB)

The 8 gb disk .vmdk file is in another folder than the shared disk

Pls guide me where i am wrong.

Thanks
Raj

by ngruloos

I just created a new image with the "Typical (recommended)" v6.5 configuration type and got an IDE disk by default. Anyway I would suggest to better use VMWare Server rather than VMWare Workstation for this type of installation.

by jcgagui

Can this be done on any storage? We are using NAS/NFS for our shared storage.

Thanks!

by tollpayer

I had to allocate the space to the shared harddrives. I didn't on my first attempt and the quorum drive got corrupted following a hard reboot.

2nd try I pre allocated the space and everything seems to be working fine and dandy

by gary.w.wong

I was able to create two NICs on each node. However, when I add the quorum and sharedata disks, my "public" NIC will disappear which not able to connect to domain controller. If I remove the disk configuration from .VMX file, the NIC and setting comes back. The same issue on both VM Workstation and VM Server. Any suggestion on what is wrong? Thanks.

-GW

by ptireland

I'm building a test environment in my house to practice. I have a pretty high end system (i7 Processor, a very large hard drive, 6Gb of Triple Channel RAM) running Vista Ultimate (64-bit)

I've setup 3 individual Win2k3 Enterprise R2 Servers. One as the DC and 2 Exchange 2k3 Enterprise servers. I want to set them up as a windows/exchange cluster. Each machine has 1Gb of RAM.

Will your workaround work in this instance?

by jduvalle

I just tried to do that same thing for my cert testing and found that Workstation 7 is not supported. I then tried the ESXi and this worked for me eventually. I used one document from MS about clustering itself and I used the post on this thread to help find a few problems in my logic.

As for as your SPECS for the machine, that is more than enough to really run a test/dev environment. I run about the same with 8gig's of ram and 2tb of storage.

Thanks,
Jason

by sivaprakash123

Its an amazing blog. Short and excellent. I got an issue here. After creating my single node sql cluster. I tried to add an extra node in the existing cluster. I got a warning on cannot find shared quorum disk while adding the node to the cluster. And i finished that process by going back to advanced (minimum) mode. Then i tried to add the cluster group to the new node. Can you please help me in solving this.

It ll be really helpful.
Thanks

by alaidroos

hi ever body
i have one quatsion about filover cluster on vmware workstation when i creat two node in one host server filover cluster is work but if i created on sepreate host servers filover cluster is not work why?????

This discussion is closed to new replies.