This post shares a method I've used to create test-lab instances of standard 2003 file and print Microsoft Cluster Services (MSCS) clusters in a VMware ESX VI3 virtual environment. The resultant solution is not supported and definitely not production-ready, but if you want a real multi-node MSCS cluster in an ESX lab environment, this process might be helpful with a minimum set of requirements.
With my usual theme of repeatable command-line execution, most of these operations can be completed via the command-line, either in the ESX service console or a command-prompt from the virtual MSCS nodes.
I followed bits and pieces of the VMware supported method - which is very specific and quite restrictive. Note that I’m a little dubious that this cluster would be particularly stable – the SCSI reservations MSCS uses to lock disks are in no way supported when using a shared VMDK through a shared SCSI adapter (I think RDM is the only supported method), but it does work and at least provided me with a test environment.
The shared nothing model of 2003 MSCS clustering dictates that only one node accesses the partition at any one time, but the disk still needs to be visible to both nodes. A limitation of this solution is that both MSCS nodes need to be hosted on one ESX server – a requirement you could satisfy with a DRS rule to keep the two nodes together. However, if DRS decided to migrate both VMs, the cluster would almost certainly break during the failover (and possibly after).
If you follow the steps below, you should end up with two virtual x64 2003 enterprise servers, both members of a single MSCS cluster. In the cluster there will three shared disks (VMDKs), one for the quorum and one each for file and print – with a virtual server and relevant cluster resources. A test file share is created, along with drivers and a test printer. You'll need to modify the commands that reference the public adapter and IP addresses
Steps involved:
- Create an area for storage of the shared disk on your datastore:
- mkdir /vmfs/volumes/%datastore%/cluster01
- Create a 5GB quorum disk:
- vmkfstools -d thick -a lsilogic -c 5G /vmfs/volumes/%datastore%/cluster01/MSCS-Quorum.vmdk
- Create a 5GB disk for shared data:
- vmkfstools -d thick -a lsilogic -c 5G /vmfs/volumes/%datastore%/cluster01/MSCS-disk01.vmdk
- Create two 2003 x64 enterprise virtual machines, either through cloning, deployment with templates or whatever your standard build process may be
- If cloning was used, run sysprep on both nodes to give a unique SID and join your lab domain
- Shutdown the first node and add the shared disk
- Add the quorum disk, mounted under scsi 1:0 (which adds a new SCSI adapter)
- Set the newly created SCSI Adapter to SCSI bus sharing virtual
- Add disk01, attached as scsi 1:1
- In the first VM, use disk administrator (or diskpart) to initialise the quorum and disk01 disks, partitioned with basic. Record the signature of the disk and the drive letter used (although this is the disk volume when the disk is owned by the OS, not the cluster).
- Add a service account for the cluster service:
- dsadd user "CN=clustersvc,CN=Users,DC=test,DC=local" -pwdneverexpires yes -pwd password -disabled no -desc "MSCS VM cluster service account"
- Ensure the service account is an administrator of each virtual 2003 node
- Use Cluster Administrator to install the cluster on the first node, with your chosen cluster name, using the created quorum disk and service account
- Verify correct operation of the single-node cluster, and then add the second VM node to the cluster.
- Create a new port group to allow a second private adapter on each ESX server:
- esxcfg-vswitch -A MSCS-Private Private
- Add a second interface to each VM cluster node, allocated separate address space
- Verify connectivity (ping) and configuration following cluster best practices (no gateway, no DNS etc)
- Mark as a private heartbeat connection for the cluster, prioritised above the LAN connection.
- Create a virtual resource group, creating IP, network name and disk resources in the group, the following commands will create a group called v01, in the lab01 cluster. For these steps, you’ll need the drive letter to use (M: below), the disk signature, the public network name, IP Address and subnet mask of the virtual server being created:
- cluster /cluster:lab01 group "v01" /create
- cluster /cluster:lab01 res "v01 Disk01" /create /group:"v01" /type:"physical disk"
- cluster /cluster:lab01 res "v01 Disk01" /priv Drive="M:"
- cluster /cluster:lab01 res "v01 Disk01" /priv signature=0x%disksignature%
- cluster /cluster:lab01 res "v01 Disk01" /prop Description="M: disk01"
- cluster /cluster:lab01 res "v01 Disk01" /On
- cluster /cluster:lab01 res "v01 IP" /create /group:"v01" /type:"IP Address"
- cluster /cluster:lab01 res "v01 IP" /priv Network="%publicNetwork%"
- cluster /cluster:lab01 res "v01 IP" /priv Address=192.168.10.10
- cluster /cluster:lab01 res "v01 IP" /priv SubnetMask=255.255.255.0
- cluster /cluster:lab01 res "v01 IP" /priv EnableNetBIOS=1
- cluster /cluster:lab01 res "v01 IP" /priv OverrideAddressMatch=0
- cluster /cluster:lab01 res "v01 IP" /AddDep:"v01 Disk01"
- cluster /cluster:lab01 res "v01 IP" /On
- cluster /cluster:lab01 res "v01" /create /group:"v01" /type:"Network Name"
- cluster /cluster:lab01 res "v01" /priv RequireKerberos=1
- cluster /cluster:lab01 res "v01" /AddDep:"v01 IP"
- cluster /cluster:lab01 res "v01" /priv Name="v01"
- cluster /cluster:lab01 res "v01" /On
- Install ABEUIamd64.msi on each node if Access Based Enumeration is required
- To create a test directory, share and ABE resource on the new virtual server on the cluster (v01):
- md \\v01\m$\Dir01
- cluster /cluster:lab01 res "v01 Dir01 Share" /create /group:"v01" /type:"File Share"
- cluster /cluster:lab01 res "v01 Dir01 Share" /priv path="M:\Dir01"
- cluster /cluster:lab01 res "v01 Dir01 Share" /priv Sharename=Dir01
- cluster /cluster:lab01 res "v01 Dir01 Share" /priv Remark="Dir01 File Share"
- cluster /cluster:lab01 res "v01 Dir01 Share" /prop Description="Dir01 File Share"
- cluster /cluster:lab01 res "v01 Dir01 Share" /priv security=Everyone,grant,F:security
- cluster /cluster:lab01 res "v01 Dir01 Share" /AddDep:"v01"
- cluster /cluster:lab01 res "v01 Dir01 Share" /AddDep:"v01 Disk01"
- cluster /cluster:lab01 res "v01 Dir01 Share" /On
- cluster /cluster:lab01 res "v01 Dir01 ABE" /create /group:"v01" /type:"Generic Application"
- cluster /cluster:lab01 res "v01 Dir01 ABE" /priv CommandLine="cmd.exe /k abecmd.exe /enable Dir01"
- cluster /cluster:lab01 res "v01 Dir01 ABE" /priv CurrentDirectory="%SystemRoot%"
- cluster /cluster:lab01 res "v01 Dir01 ABE" /priv InteractWithDesktop=0
- cluster /cluster:lab01 res "v01 Dir01 ABE" /priv UseNetworkName=0
- cluster /cluster:lab01 res "v01 Dir01 ABE" /prop SeparateMonitor=1
- cluster /cluster:lab01 res "v01 Dir01 ABE" /prop Description="Access Based Enumeration for Dir01 File Share"
- cluster /cluster:lab01 res "v01 Dir01 ABE" /AddDep:"v01"
- cluster /cluster:lab01 res "v01 Dir01 ABE" /AddDep:"v01 Disk01"
- cluster /cluster:lab01 res "v01 Dir01 ABE" /AddDep:"v01 Dir01 Share"
- cluster /cluster:lab01 res "v01 Dir01 ABE" /On
- Additional shared cluster disks can be created as required, eg:
- vmkfstools -d thick -a lsilogic -c 5G /vmfs/volumes/%datastore%/cluster01/MSCS-disk02.vmdk
- Add the disks to one node, (scsi 1:2 in this example). Initialise and allocate in the cluster (as in step 7 above)
- To create a virtual print server (assuming you’ve mounted disk02 from step 15 for use in the cluster):
- cluster /cluster:lab01 group "v02" /create
- cluster /cluster:lab01 res "v02 Disk02" /create /group:"v02" /type:"physical disk"
- cluster /cluster:lab01 res "v02 Disk02" /priv Drive="P:"
- cluster /cluster:lab01 res "v02 Disk02" /priv signature=0x%disksignature%
- cluster /cluster:lab01 res "v02 Disk02" /prop Description="P: print01"
- cluster /cluster:lab01 res "v02 Disk02" /On
- cluster /cluster:lab01 res "v02 IP" /create /group:"v02" /type:"IP Address"
- cluster /cluster:lab01 res "v01 IP" /priv Network="%publicNetwork%"
- cluster /cluster:lab01 res "v01 IP" /priv Address=192.168.10.11
- cluster /cluster:lab01 res "v01 IP" /priv SubnetMask=255.255.255.0
- cluster /cluster:lab01 res "v02 IP" /priv EnableNetBIOS=1
- cluster /cluster:lab01 res "v02 IP" /priv OverrideAddressMatch=0
- cluster /cluster:lab01 res "v02 IP" /AddDep:"v02 Disk02"
- cluster /cluster:lab01 res "v02 IP" /On
- cluster /cluster:lab01 res "v02" /create /group:"v02" /type:"Network Name"
- cluster /cluster:lab01 res "v02" /priv RequireKerberos=1
- cluster /cluster:lab01 res "v02" /AddDep:"v02 IP"
- cluster /cluster:lab01 res "v02" /priv Name="v02"
- cluster /cluster:lab01 res "v02" /On
- Create v02 print spooler:
- cluster /cluster:lab01 res "v02 Spooler" /create /group:"v02" /type:"print spooler"
- cluster /cluster:lab01 res "v02 Spooler" /priv DefaultSpoolDirectory="P:\Spool"
- cluster /cluster:lab01 res "v02 Spooler" /prop Description="v02 Print Spooler"
- cluster /cluster:lab01 res "v02 Spooler" /AddDep:"v02 Disk02"
- cluster /cluster:lab01 res "v02 Spooler" /AddDep:"v02"
- cluster /cluster:lab01 res "v02 Spooler" /On
- On v02, add a standard Laserjet 4000 retail driver for x64 and x86, run from a cluster node:
- rundll32 printui.dll,PrintUIEntry /ia /c \\v02 /m "HP LaserJet 4000 Series PCL6" /h "x64" /v "Windows XP and Windows Server 2003"
- rundll32 printui.dll,PrintUIEntry /ia /c \\v02 /m "HP LaserJet 4000 Series PCL6" /h "x86" /v "Windows 2000, Windows XP and Windows Server 2003"
- Create a test printer on v02 called printer01 using the LJ 4000 driver, with a record in DNS, published in AD, set to duplex by default, with customised permissions using the standard winprint processor:
- dnscmd %DNSserver% /recordadd %zone% printer01 A 192.168.10.100
- cscript //nologo portmgr.vbs -a -c \\v02 -p printer01 -h 192.168.10.100 -t LPR -q printer01
- cscript //nologo prnmgr.vbs -a -c \\v02 -b printer01 -m "HP LaserJet 4000 Series PCL6" -r printer01
- cscript //nologo prncfg.vbs -s -b \\v02\printer01 -h printer01 -l "%Location%" +published
- setprinter.exe \\v02\printer01 8 "pDevMode=dmDuplex=2,dmCollate=1,dmFields=duplex collate"
- subinacl /printer \\v02\printer01 /grant=%domain%\%group%=F
- setprinter \\v02\printer01 2 pPrintProcessor="WinPrint"
References
VMware Support method of running MSCS clusters:http://www.vmware.com/pdf/vi3_35/esx_3/r35u2/vi3_35_25_u2_mscs.pdf
Implementing an MSCS 2003 server cluster Cluster
http://waynes-world-it.blogspot.com/2008/03/implementing-mscs-2003-server-cluster.html
subinacl 5.2.3790.1180:
http://www.microsoft.com/downloads/details.aspx?FamilyID=E8BA3E56-D8FE-4A91-93CF-ED6985E3927B
Windows Server 2003 Resource Kit Tools:
http://www.microsoft.com/downloads/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&DisplayLang=en
Wayne's World of IT (WWoIT), Copyright 2009 Wayne Martin.
No comments:
Post a Comment