Virtual Server 2005 R2 is a great virtualization platform to build your virtual network on. Improvements in R2 allow you to maintain availability using Windows clustering technologies. With R2 not only can you cluster guest machines in the virtual enviroment, but you can also cluster the hosts.
To begin, you will need an understanding of how to set up a Windows cluster. Also, before we begin, you should be aware of some prerequisites for the clustered systems such as
- servers must have identical hardware including CPUs from the same model, family and stepping.
- servers must be running Windows Server 2003 Enterprise or Datacenter Edition with SP1 or R2
- servers must be members of a Windows 2000 or 2003 Acitve Directory domain
- you must be using Virtual Server 2005 R2
- if you are using an iSCSI SAN, you must be using the Microsoft iSCSI 2.0 (or better) initiator or an iSCSI HBA
- Havm.vbs (available below)
Of course there are limitations you should be aware of including - potential loss of data from lost nodes due to power failure, or improper shutdown - virtual machines can only access one physical CPU With the cluster configured, it is time to install Virtual Server 2005 R2 on each node. Stop the Cluster service on node 1 and install the application and then restart the Cluster service. Repeat this on node 2. Next configure a shutdown script on each node. Open the local policy for editing and drill down to Computer Configuration | Windows Settings | Scripts | Startup/Shutdown. Right-click on Shutdown and select Properties and enter the path to the batch file.
The script can be a simple batch file that stops the cluster service. You can copy and paste the following into notepad and save as StopCluster.bat
net stop clussvc
Next we need to configure the resource group, disk resources and the guest control script. We will start with the disk resources by opening the Cluster Administrator and creating a new resource group. The name should reflect what it is so let's call it ResGroup1. Set the preffered owner to the cluster node that will act as the main node, i.e. the one that will be active most of the time.
Next create a physical disk resource, we'll call it ResDisk1 and assign the resource to ResGroup1 and make sure that both cluster nodes are listed under Possible Owners. This disk resource must be created on the shared storage device. Finally create a folder on the disk resource called VMs (this is where the VHD/VMC files will be located) and copy Havm.vbs to each nodes C:\Windows\System32\Cluster directory. We are now ready to configure Virtual Server 2005 R2 and create a virtual machine!
For more information see:
Download Virtual Server 2005 R2 Havm.vbs Script