Introduction:
There are a lot of DBAs who want to learn how to cluster SQL Server. There are also a lot of companies who may have a production SQL Server cluster, but not a test SQL Server cluster. In both cases, the reason for this is that clustering hardware is very expensive, and setting up a non-production SQL Sever cluster is out of the question from a budgetary perspective.
Fortunately, this is no longer a problem. With the introduction of Microsoft Virtual Server 2005, anyone can create a non-production SQL Server cluster on a single, relatively inexpensive computer. Microsoft Virtual Server 2005 allows you to create a virtual cluster that acts just like a real cluster, without the expensive hardware. This allows DBAs to build their own SQL Server cluster for educational and training purposes, and for companies to build their own test/development servers. This is a great boon for DBAs, and an area that DBAs need to spend some time investigating.
The purpose of this article is not to teach you everything you need to know about clustering SQL Server. That would take a book. The focus of this article is to introduce you to how Virtual Server 2005 can be used to create a virtual SQL Server cluster.
This article is rather technical, and makes some assumptions about your knowledge. It is assumed that you know how to install and administer SQL Server 2003 Server, how to install SQL Server 2003 Clustering, how to install and administer Virtual Server 2005, and how to install SQL Server 2000/2005 clustering. If you are not familiar with all of these topics, you may need to read up on them, or seek out the help of others.
The Big Picture
If you want to set up a SQL Server cluster under Virtual Server 2005, here are all the steps you will need to perform:
· Select the Hardware to Run Virtual Server 2005 (and the SQL Server Cluster)
· Select the Host OS to Run Virtual Server 2005
· Install and Configure Your Host OS
· Install Virtual Server 2005
· Configure Virtual Server 2005 for Clustering
· Create Node1
· Configure Node1
· Create Node2
· Configure Node2
· Configure the Two-node Cluster
· Install SQL Server 2000/2005 as a Cluster
In this article, we are not going to show you the details of all these steps. The goal is present the big picture, and to show you, step-by-step, how to configure Virtual Server 2005 as a cluster so that you can then install SQL Server clustering.
Select the Hardware to Run Virtual Server 2005 (and the SQL Server Cluster)
Just think, you will need a single computer that will end up running all of the following software:
· A host OS
· Two separate instances of Windows 2003 (guest OSs)
· Windows 2003 Clustering on each of the Windows 2003 instances
· A single instance of SQL Server running in an active/passive cluster
Even if you used the Microsoft-recommended minimum hardware for all of the above, this is still a lot of hardware. The exact hardware you need depends on what you will be doing with the cluster. If you are installing the SQL Server cluster for learning and educational purposes, the hardware recommendations are much less than if you intend to use the SQL Server cluster for development and testing purposes. Below are my (not Microsoft's) minimum recommendations:
Learning/Educational Hardware Recommendation
· Portable, Desktop, Server-Class Computer
· 1-Way 2GHz+, Hyperthreading CPU
· 1GB RAM
· 20GB free hard disk space
Testing/Development Hardware Recommendations
· Server-Class Computer
· 2-Way 2GHz+ CPUs
· 2GB RAM
· 50GB free hard disk space on a RAID 1, RAID 5, or RAID 10 array
Again, these are minimum recommendations, and bigger hardware, especially more RAM, can significantly boost performance of your virtual cluster. While you may get a virtual cluster running on less hardware, you won't be happy with its performance. See the Virtual Server Getting Started Manual to see what hardware Microsoft recommends.
Select the Host OS to Run Virtual Server 2005
Virtual Server 2005 will run under any of these OSs:
· Windows XP Professional
· Windows Server 2003 Standard
· Windows Server 2003 Enterprise
· Windows Server 2003 Datacenter Edition
If you are building a learning/educational cluster, Windows XP Professional will work fine. But if you are building a testing/development cluster, then you will want to use Windows Server 2003 Standard or Windows Server 2003 Enterprise, which offer more scalability and performance.
Install and Configure Your Host OS
Install the host OS, and appropriate service pack, onto your hardware as you would any other install. Also install any updated hardware drivers, if appropriate. Once you are done installing the base OS, ensure that all the hardware is working correctly, and if appropriate, make the system a member of your domain and check to see that it can communicate over your LAN.
Virtual Server 2005 requires that IIS be installed and operating correctly on the host OS. So if IIS was not installed as part of the OS installation, then you must install IIS at this point. Once it is installed, check to see that it can serve up web pages.
In the Control Panel, System, Performance Options, Advanced Tab, select "Background services" for "Processor scheduling" and select "Programs" for "Memory usage."
If your hardware is somewhat underpowered for your virtual cluster, you will want to turn off any OS services that don't need to run in order to free up resources for your virtual cluster.
Install Virtual Server 2005
Install Virtual Server 2005 as directed in the Virtual Server Getting Started Manual. If you are not familiar with Virtual Server 2005, you will also want to spend some time with the Virtual Server 2005 Administration Guide before you proceed with the following steps in this article on how to configure Virtual Server 2005 as a cluster for SQL Server.
Configure Virtual Server 2005 for Clustering
Now that Virtual Server 2005 has been installed, you are ready to begin configuring it so that you can set up your virtual SQL Server cluster. Here's what we will be doing in this section:
· Creating a virtual "Private" network for all virtual node to virtual node communications.
· Creating a virtual "Public" network for all client to virtual cluster communications.
· Create a virtual shared disk for the virtual cluster to share.
· Create a virtual quorum disk.
· Create two virtual "C" drives to be used by the virtual nodes in the virtual cluster.
Once all of the above prerequisites are complete, then you will be ready to install the guest OSs and the virtual cluster.
How to Create a Virtual Private Network
In this step, we will create a virtual Private network, which will be used by the two nodes in our cluster to communicate.
1. On the host computer, start the Virtual Server Administration Website. This is the tool you will be using to configure Virtual Server 2005 to work as a virtual SQL Server cluster. From the Master Status screen (the default screen displayed when the Virtual Server Administration Website is started), Under "Virtual Networks", select "Create." This displays the "New Virtual Network" Network Properties Screen, as shown below. Your screen may look slightly different than this one. That's to be expected, as my computer is configured differently than yours. This will not affect what we are doing here. This is true for all of the screens you see in this article.

In this screen, you need to replace "New Virtual Network", next to "Virtual network name" with an appropriate name, as shown below. In our case, we will call it "Private." This will make it easy for us to remember that this network is the private network, not the public network. In addition, leave the "Network adapter on physical computer" option set to its default value of "None (Guests Only)." And if you like, you can enter a description of this virtual network for the "Virtual network notes." When your are done with this screen, as shown below, click on OK to create this virtual network.

You are now done creating the Private virtual network.
How to Create a Virtual Public Network
Creating the Public virtual network, the one used to allow clients to connect to the virtual cluster, is very similar to creating the Private network. The only major difference is that we need to allow this virtual network to talk to the real world. Here's how we set it up.
1. As before, from the Master Status screen (the default screen displayed when the Virtual Server Administration Website is started), Under "Virtual Networks", select "Create." This displays the "New Virtual Network" Network Properties Screen, as shown below. Your screen may look slightly different than this one. In this screen, you need to replace "New Virtual Network", next to "Virtual network name" with an appropriate name, as shown below. In our case, we will call it "Public." Up to this point, we have followed all the same steps we did when we created the Private virtual network. Now we will do something different. Next to "Network adapter on physical computer" we need to select a real network adapter that is installed on our host computer. This physical network adapter will be our window to the world, allowing clients to talk to our cluster. In my case, the real network adapter on the host computer is a Broadcom 440x 10/100 Integrated Controller. Your network adapter will most likely be different. Select the adapter (if you have more than one) that is most appropriate. And if you like, you can enter a description of this virtual network for the "Virtual network notes." When your are done with this screen, as shown below, click on OK to create this virtual network.

How to Create a Virtual Shared Disk
Clusters require that a shared disk be available to store the data accessed via a cluster. In the real work, this is normally a Fiber or SCSI fault-tolerant RAID array. In our virtual world, this is just a file stored on the host computer. We must create the file and configure it appropriately. To create the virtual shared disk, follow these steps.From the Master Status screen (the default screen displayed when the Virtual Server Administration Website is started), Under "Virtual Disks", select "Create." This will produce a pop-up menu, from which you need to select "Fixed Size Virtual Hard Disk." We must choose this option because shared disks must be Basic disks, not Dynamic disks. This screen appears.

Here, you must specify three different things. First, you must specify the "Location" or the path where the file is to reside. When you click on the down-arrow button next to "Location", you will see one or more options. These are the available paths where you can store your file. If you don't like any of the available options, you can go to the "Search Paths" page of the Virtual Server Administration Webpage and change or add to the available paths. Second, you must specify the name of the file next to "Virtual hard disk file name." And last, you must specify the size of the disk. Select a size that will somewhat exceed the total amount of space you will need to store all of the SQL Server databases you expect to reside on this array. You will not be able to change this later, so you may want to overestimate rather than underestimate the amount. When you are done, your screen should look similar to the following one.
1. Once you have entered all the data, select "Create" to create the file. If you specified a large file, then it may take a few minutes to be created.
How to Create a Virtual Quorum Disk
Clustering two virtual servers requires the use of a quorum disk, which is used by the cluster to store database checkpoints and log files. Both nodes of a cluster must have access to the quorum disk. Creating a quorum disk is virtually identical to creating the shared disk. The only difference is that it does not have to be as large. Microsoft recommends that quorum disks be at least 500 MB, and that is what I recommend for your virtual quorum disk. To create the virtual quorum disk, follow these steps.
1. From the Master Status screen (the default screen displayed when the Virtual Server Administration Website is started), Under "Virtual Disks", select "Create." This will produce a pop-up menu, from which you need to select "Fixed Size Virtual Hard Disk." First, specify the "Location" or the path where the file is to reside. When you click on the down-arrow button next to "Location", you will see one or more options. Second, you must specify the name of the file next to "Virtual hard disk file name." And last, you must specify the size of the disk, which should be 500 MB. When you are done, your screen should look similar to the following one.
Continued in part 2