How to Deploy HyperV CSV Cluster Step By Step
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
Select the HyperV Role
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.
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.
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 SystemRoot\Cluster\Reports\ 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
select the server
Give a cluster a name and IP
We make sure that everything is all right
Next step we add the second node
And we run the tests as above
Last step configure quorum
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 )
Last Step Enable CSV
Now a new storage type appears
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:\ClusterStorage\Volume* – 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.
Make sure the Auto Start action is Nothing
Now we go to the cluster Management select create service
select Vm
Make sure the Auto Start is Yes as you see below
Now for testing time lets live migrate it
One packed Dropped, well that’s impressive ![]()
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
shiva
Hello Ahmed,
I am shiva working on building a private cloud set up in my computer lab. I am also using the Microsoft technologies to build. I want to know the exact requirements and installation steps to build it.
Up to now I have connected some systems by installing Windows server 2008 R2 SP1 Hyper-v and created a new virtual machine and need to install Operating system on windows server. I want to know what are further steps to build the private cloud. I have been searching for the information but I couldn’t find it. Can you please help me out.
Ahmed Hussein
Hello ,
it looks like there are a lot of missing steps in what you are saying , but you can find a very good resources @
http://technet.microsoft.com/en-us/private-cloud/
Regards ,
Ravinder Singh
Hi Sir,
I have 5 node(MSCS ).we installed server 2k8 r2 on phycial server then install 4-4 Server through hyper v.these server(VM) local H.D.D on CSV.if one server(phycial) go down( power,mainboard,etc issue).then how to these 4 server(VM) move on another node.
can i need to manualy move?
can i need again restaret?
can its take time?
pls help???
Ahmed Hussein
Hello ,
In order to build cluster you will need a shared storage. without shared storage you can go for solution that creates a virtual Shared storage OR you will only have Quick migration . so if a node failed without moving the vms first the vms will be down as well .
Regards ,
Ahmed