Building a Cluster with Hyper-V and Server Core (Part 2) and Creating a Windows Server 2008 Cluster

In this series of posts, I will explain how to build a Windows Server 2008 cluster with Server Core and Hyper-V. There will be three posts as linked to below. Each post will be published as it get ready. Each post will have step-by-step snapshots. If it happens a certain image thumbnail is not good enough for you, then click on the snapshot to see a larger image.

1st Part: Hyper-V & Server Cluster – Server preparation

2nd Part: Hyper-V & Server Cluster – ISCSI Storage preparation & Configuration (You are here)

3rd Part: Hyper-V & Server Cluster – Creating Windows Server Core 2008 & Hyper-V Cluster

2nd Part: ISCSI Storage Preperation & Configuration:

From now on, we will perform all operations under the domain log-in administrator. This is very important because if we were logged in as local administrators for each node, we would not be able to conduct operations that have an impact on Active Directory.

Go to Switch User and make sure to log in as the domain administrator, in my case ponicke\administrator.

We are going to enable remote management and disable the firewall (Be careful with this last step as, here, we are in the laboratory, this should not be done in production so adjust the firewall appropriately)

Cscript /windows/system32/scregedit.wsf /ar 0

Cscript /windows/system32/scregedit.wsf /cs 0

Netsh advfirewall set allprofiles state off

MS Windows 2008 servercore shuting down firewall

Now comes a very exciting and important moment! We are going to enable the Hyper-V and Failover Cluster services.

Ocsetup FailoverCluster-Core

Ocsetup-Microsoft-Hyper-V

(Please remember that all this is supposed to be done on both nodes even though I am only showing you one)

Once this is done, you will have to restart both nodes, which will complete the installation.

Now, it’s time to start thinking about connecting the LUNs to the nodes so that we make sure that we have automated and running iSCSI services in both nodes. It is easier to do this from an OS with GUI using an MMC with Services Snap-in connected to each node.

From the DC, we will run MMC and add the snap-ins pointing to the server core nodes. This will give us their service console.

saving service console to the ad machine

Then, for each node, we will make sure that the service is automated and running.

ms windows 2008 server core ensure service is automated and running

Now, we can start connecting the LUNS to the nodes. To do so, in Node 1, we will use the command iscsicli (remember to repeat the same actions for the other node).

In my case, the storage (iSCSI Target) is at ip 172.16.16.2

iscsicli QAddTargetPortal 172.16.16.2

windows 2008 server core adding iscsi target

Now we will list the target for connection with the command iscicli ListTargets. This step is important to obtain the IQN that we will be using later.

Windows 2008 server core iscsi obtain target iqn

The upper screen shows the IQN listed for my iSCSI Target.

Now connect!

iscicli AddTarget IQN (previously obtained with ListTargets)

Windows 2008 server core adding iscsi target IQN

Finally, we will log in with iscicli QloginTarget IQN (previously obtained with ListTargets)

windows 2008 server core iscsi qlogintarget iqn


We’re almost done!

Let’s list the discs!!

Diskpart and list disk

windows 2008 server core diskpart and listdisk

Here you can see the three LUNS created for the cluster: a small one for the quorum and two 20GB for the VMs.

We put them online select the disk.

sele disk 1

and then

online disk

Repeat this for disc 2 and 3.

windows 2008 server core diskpart and listdisk for the rest

Then come back to each disc to create the primary partitions.

If, upon creating them, you get an error such as:

Diskpart has encountered an error. The media is write protected,then you say:

ATTRIBUTES DISK CLEAR READONLY

and try again.

In my case:

sele disc 1

create partition primary size = 498

Windows 2008 Server Core create primary partitions

and the same with the disc 2 and 3.

Windows 2008 Server Core create primary partitions

Assign the letters (if you want)

Windows 2008 Server Core assign partition letters

Repeat for all volumes

windows 2008 server core assign partition letters repeat for the rest

And reformat (leave diskpart with Exit)

format e:

format f:

format g:

Thanks again to ponicke for giving us this informative and very helpful article in Spanish. We hope that all of our English readers will find it just as helpful.

Comments

  1. Nothing like commenting on a 3 year old post …

    I have two independent nodes that I would like to cluster. I have followed this guide, and have a question or two.

    When setting up the shared storage, do I do all the steps on both nodes or just node1? The other two parts mention to make sure to enter the commands on both nodes, but the iSCSI setup only mentions node1. In Part III, there is a mention of checking that the disks are mounted on both nodes while the validation process is running.

    Will clustering existing nodes, lose any of the currently running VMs? (They both have their VMs on their local storage)

    Thank you.

  2. Hi,

    You will have to repeat the iSCSI steps on both sides.
    You should not lose your currently existing VMs which run on the local storage. At least it was the case when I last tried few years back.

    Enjoy,
    Eiad

Trackbacks

  1. […] Ads « Adding VMware ESX hosts in Virtual Machine Manager (Part 1) Building a Cluster with Hyper-V and Server Core (Part 2) and Creating a Windows Server 2008 Cluster […]

  2. […] Sponsored Ads « Building a Cluster with Hyper-V and Server Core (Part 2) and Creating a Windows Server 2008 Cluster […]

Speak Your Mind

*