General discussion


Building a Virtual Cluster Server with VMWare and MSCS

By ngruloos ·
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 simply build a cluster environment as a POC for a project. This can also be used for training, demonstration and even post-sales support. 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)
- a powerful server with
- CPU: dual-core P4 3Ghz or Xeon 2Ghz
- RAM: 4Gb
- HD 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)

1. Configuring the shared storage
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".

2. VMWare Device configuration
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
- Ethernet (bridged by default)
- Ethernet 2 (bridged by default)
- Processor 1 or 2

3. Adding line in VMWare configuration file
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:

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 = ""

4. Initialize and Convert Shared Disks
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.

5. Prepare your second node
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.

6. Network, Domain and DNS configuration
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 and 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)

7. Create your cluster.
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)

8. Prepare the Cluster Group for SQL
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.

9. Create the MSDTC resource
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 - 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

10. Install your Virtual SQL Server
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.

This conversation is currently closed to new comments.

24 total posts (Page 1 of 3)   01 | 02 | 03   Next
| Thread display: Collapse - | Expand +

All Comments

Collapse -


by rauguste In reply to Building a Virtual Cluste ...

Nicely written. I am assuming you can do the same for Exchange Cluster

Collapse -

Yes, you can...

by rayeni In reply to WOW

I used the information in this article to create an Exchange 2003 cluster.

Collapse -

Re: Yes, you can...

by ngruloos In reply to Yes, you can...

Funny... I used the documentation on clustering Exchange to build this article :)

Collapse -

Exchange 2003 Cluster

by naeim In reply to Yes, you can...

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,,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."

Collapse -

Very good work

by drutledge In reply to Building a Virtual Cluste ...

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)

Collapse -

Re: Very good work

by ngruloos In reply to Very good work

Hi drutledge,

you are absolutely right, this is something I omited and VMWare is not reseting the SID so my suggestion is to use NewSID from Sysinternals; this is what I used when I faced the problem while joining the domain from the duplicated node. NewSID is available from

Best regards,

Collapse -

NewSID discontinued?

by jduvalle In reply to Re: Very good work

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.


Collapse -

Veritas Cluster Server on VMWare

by ngruloos In reply to Building a Virtual Cluste ...

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 :)

Collapse -

You like this article?

by ngruloos In reply to Building a Virtual Cluste ...

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

Collapse -

Rookie question re code

by PHGarey In reply to Building a Virtual Cluste ...

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

Back to Networks Forum
24 total posts (Page 1 of 3)   01 | 02 | 03   Next

Related Discussions

Related Forums