Welcome to the second part of this guide to "Creating a SQL Server 2008 Virtual Cluster". In this second part we will create the cluster VMs and attach the iSCSI LUNs. The first part went into the virtual machine setup and the virtual NAS configuration.
Create the Cluster VMs (DC and Cluster Nodes)
Now we are ready to start creating the VM's. Under the "Commands" section, select "Create virtual machine". Enter a Virtual machine name and select a datastore (this datastore maps to a folder on your local drive) then click "Next":
Select the Operating System type (Enterprise Edition for clustering) and click "Next":
Select the RAM (512Mb for DC and 1024MB for each cluster node) and CPU (1 each) then click "Next":
Select to create a new virtual disk:
Supply a size for the virtual disk and select SCSI bus (SCSI ID 0 for the VM boot drives in our example), make sure to pre allocate the disk space for the virtual disks by using the file options below. Click "Next";
The Windows 2008 nodes need a 25GB disk drive and 15GB for the DC.
Select "Add a network adapter" and the network selection browser opens
Select "Host only" for this vNIC and click "Next":
Select to use an ISO image for the vCD drive and click the browse button:
The datastore browser opens, drill down and select the Windows 2008 ISO and click "OK". At the "create virtual machine window" click "Next":
At the next screen do not add a floppy drive and click "Next":
Do not add a USB controller and click "Next":
At the last screen click "Finish" to complete the VM:
Create the remaining VMs (node 1 and node 2) using Windows 2008 Enterprise software. Use a pre allocated 25GB virtual disk for each node, also add 2 more vNICs, these will be used for the Heartbeat and iSCSI networks. Add the hardware listed as follows:
With the base VM created, select the first node and under the "Command" section click "Add hardware", the following screen appears. Click "Network adapter" and the vNIC properties appear:
Select the "VMnet2" option from the drop down list and click "Next". Add in a 3rd vNIC for VMnet3, then click "Finish" to complete. Do this for the second cluster node too.
Install the windows operating systems on each VM and create a domain controller with a test domain on ClusterDC. Configure Public networking between the 3 VM's and join the 2 nodes to the domain. Configure the iSCSI network between the VM's and the NAS VM. Configure the heartbeat network between the cluster node VMs.
Ensure you set the network adapter bindings on the 2 cluster nodes. The Public NIC should have priority followed by the Heartbeat and then the iSCSI NIC.
Once this is done you may proceed with the rest of the instructions in this document. If you are unsure with any aspect of the NOS build or configuration consult your Windows administrator for help with this. The screenshot below shows the deployed Windows 2008 server with network adapters.
Attach the iSCSI LUNs
Once the cluster nodes have been created and networking configured we need to start the Windows iSCSI initiator and discover the iSCSI LUNs. Open administrative tools and double click the iSCSI Initiator. You may receive a message indicating the service is not running and needs to be started, this is shown below. Accept this message to continue.
With the service now started, the following dialog should appear. Enter the NAS VM IP address and click "Quick connect".
You may even use IPsec for secure communications. Most importantly your iSCSI traffic should pass over a private, segregated network.
The quick connect dialog opens as shown below. Highlight each target and then click connect. When all targets are connected, click "Done".
All targets connected!
Go to the "Volumes and devices" tab and click "Auto configure" then click "OK"
If you now open disk management on one of the nodes you will see the following, notice the disks are offline and unknown!
Right click each disk and select "Online". Once all disks are online, right click any disk again and select "Initialise". The wizard will initialise all drives found to be online.
Before we create our partitions we will take a moment to visit a well used technique called partition aligning. This is done once the disks are online and initialised. Open a command prompt to start using the DISKPART utility. For our example we will create an aligned partition on disk 3 by using the following at the command prompt
- Type DISKPART then hit return
- Type SELECT DISK 3 then hit return
- Type CREATE PARTITION PRIMARY ALIGN = 256 then hit return
- Type ASSIGN LETTER ? then hit return (where ? is the drive letter)
- Type EXIT followed by return to return to the command prompt
- Type FORMAT ?: /FS:NTFS /A:64K /V:"SQLData" then hit return (where ? is the drive letter)
The commands above would create a primary partititon on disk 3 aligned to 256K using an NTFS filesystem with a 64K allocation unit size (default is 4K) and a volume name of SQLData.
How many times have you been told it's a dark art and only the Windows admin should do this??
Windows 2008 will partition align by default but by all means align your disks manually if you wish, this is optional. All disks online and formatted!
That's it, the VMs have been deployed and configured and the all important iSCSI storage has been attached and formatted. In part 3 we create the base Windows cluster and install the clustered SQL Server instance(s).