Archive for August, 2011

 

In this post I will try to demonstrate how to build a HyperV Csv Cluster in simple and easy steps

 

Make sure of the normal things needed

  • You are using windows Ent. or datacenter (failover cluster not supported on standard or web )
  • A shared storage between the Hosts (with the same drive letter )
  • You name the network cards the same
  • you have the necessary hardware (specially NIC this can be ok in a lab but in production you have to make sure you have
  • One NIC for Machine access (OR More )
  • One for cluster Heartbeat
  • One for CSV and one for live migration ( both can be the same based on your setup )
  • One for Iscsi (this is a MUST )

Limitations for using Hyper-V and Failover Clustering

Specific limitations for using Hyper-V and the failover clustering feature are outlined below:

  • A maximum number of 16 nodes in the failover cluster are allowed.
  • You can have a maximum number of 1000 virtual machines per cluster for server computer virtualization, with a maximum of 384 on any one node. When Hyper-V is used in conjunction with Virtual Desktop Infrastructure (VDI) for client computer virtualization, you can have a maximum of 1000 VDI (Windows XP/Windows Vista®/Windows® 7) virtual machines per cluster, with a maximum of 384 on any one node.
  • The number of virtual machines allowed for each node does not change regardless of the size of the cluster.

 

Hyper-V Role Installation

We start by deploying the HyperV role as you normally would

clip_image002

Select the HyperV Role

clip_image004

clip_image006

Next step installing the failover cluster

To install the failover cluster feature on a Server Core installation, run the following command:

Start /w ocsetup FailoverCluster-Core

To install the failover cluster feature on a full installation of Windows Server 2008 R2

1. If you recently installed Windows Server 2008 R2, the Initial Configuration Tasks interface is displayed. Under Customize This Server, click Add features. Then skip to step 3.

2. If the Initial Configuration Tasks interface is not displayed and Server Manager is not running, click Start, click Administrative Tools, and then click Server Manager. (If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Continue.)

In Server Manager, under Features Summary, click Add Features.

3. In the Add Features Wizard, click Failover Clustering, and then click Install.

4. Follow the instructions in the wizard to complete the installation of the feature. When the wizard finishes, close it.

5. Repeat the process for each server that you want to include in the cluster.

clip_image008

clip_image010

clip_image012

 
Create a virtual network

You will need to perform this step on both physical computers if you did not create the virtual network when you installed the Hyper-V role. This virtual network provides the highly available virtual machine with access to the physical network.

To create a virtual network

1. Open Hyper-V Manager.

2. From the Actions menu, click Virtual Network Manager.

3. Under Create virtual network, select External.

4. Click Add. The New Virtual Network page appears.

5. Type a name for the new network. Make sure you use exactly the same name on all servers running Hyper-V.

6. Under Connection Type, click External and then select the physical network adapter.

7. Click OK to save the virtual network and close Virtual Network Manager.

clip_image014

clip_image016

 
Create the cluster

To create a cluster, you run the Create Cluster wizard.

To run the Create Cluster wizard

1. To open the failover cluster snap-in, click Start, click Administrative Tools, and then click Failover Cluster Management. (If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Continue.)

2. Confirm that Failover Cluster Manager is selected and then, in the center pane under Management, click Create a cluster.

Follow the instructions in the wizard to specify:

· The servers to include in the cluster.

· The name of the cluster.

· Any IP address information that is not automatically supplied by your Dynamic Host Configuration Protocol (DHCP) settings.

3. After the wizard runs and the Summary page appears, to view a report of the tasks the wizard performed, click View Report.

To view the report after you close the wizard, see SystemRootClusterReports where SystemRoot is the folder in which the operating system is installed (for example, C:Windows).

 

 

I always create a cluster with a single node first just to make sure everything OK

clip_image018

clip_image020

select the server

clip_image022

clip_image024

clip_image026

clip_image028

clip_image030

Give a cluster a name and IP

clip_image032

clip_image034

We make sure that everything is all right

clip_image036

Next step we add the second node

clip_image038

clip_image040

clip_image042

And we run the tests as above

clip_image044

clip_image046

Last step configure quorum

clip_image048

clip_image050

Most of the time based on the number of Hosts you will get different recommendation ( I explained each one in my how to create cluster Post )

http://ahmedhusseinonline.com/2011/02/how-to-make-two-node-failover-clusters-windows-server-2008-r2-file-share-witness-and-disk-majority/

 

clip_image052

clip_image054

clip_image056

Last Step Enable CSV

clip_image058

clip_image060

Now a new storage type appears

clip_image062

. clip_image064

clip_image066

clip_image068

 
Create a virtual machine

In this step, you use the New Virtual Machine Wizard to create a virtual machine.

On a Server Core installation, you have the option to create a virtual machine using the failover clustering PowerShell cmdlet, Add-ClusterVirtualMachineRole. The following is an example of how to use this cmdlet to create a virtual machine:

Add-ClusterVirtualMachineRole -VirtualMachine VM1 -Name "MainServer1"

This command configures VM1 as a clustered virtual machine, and assigns the name MainServer1 to the virtual machine.

Important

You must choose the shared storage as the location to store the virtual machine and the virtual hard disk. Otherwise, you will not be able to make the virtual machine highly available. To make the shared storage available to the virtual machine, you must create the virtual machine on the physical computer that is the node which owns the storage.

To create a virtual machine

1. Open Hyper-V Manager. Click Start, point to Administrative Tools, and then click Hyper-V Manager.

2. If you are not already connected to the server that owns the shared storage, connect to that server.

3. From the Action pane, click New, and then click Virtual Machine.

4. From the New Virtual Machine Wizard, click Next.

5. On the Specify Name and Location page, specify a name for the virtual machine, such as FailoverTest. Click Store the virtual machine in a different location, and then type the full path or click Browse and navigate to the shared storage( OR if you will store it in the CSV store it in C:ClusterStorageVolume* – you will find folder with the same numbers as you added storage )

6. On the Memory page, specify the amount of memory required for the operating system that will run on this virtual machine. For example, specify 1024 MB to run Windows Server 2008 R2.

7. On the Networking page, connect the network adapter to the virtual network that is associated with the physical network adapter.

8. On the Connect Virtual Hard Disk page, click Create a virtual hard disk. If you want to change the name, type new a name for the virtual hard disk. Click Next.

9. On the Installation Options page, click Install an operating system from a boot CD/DVD-ROM. Under Media, specify the location of the media, and then click Finish.

clip_image070

clip_image072

clip_image074

Make sure the Auto Start action is Nothing

clip_image076

Now we go to the cluster Management  select create service

clip_image078

clip_image080

select Vm

clip_image082

clip_image084

clip_image086

Make sure the Auto Start is Yes as you see below

clip_image088

clip_image090

Now for testing time  lets live migrate it

clip_image092

clip_image094

One packed Dropped, well that’s impressive Smile 

clip_image096

Note if you got The Cluster service failed to bring clustered service or application completely online or offline. One or more resources may be in a failed state. This may impact the availability of the clustered service or application.

Make sure that

  • No local resource are in the VM
  • No issues in cluster resources
  • Try to move the VM offline and open it from HyperV ( you will get detailed information then

http://technet.microsoft.com/en-us/library/cc732181(WS.10).aspx

Advertisements