Professional Documents
Culture Documents
DeployaHyperVCluster
Note
This topic includes sample Windows PowerShell cmdlets that you can use to automate some of the procedures described. For more information, see Starting
Windows PowerShell.
Prerequisites
Prerequisites
To use the HyperV role on a failover cluster with two nodes, you need the hardware, software, accounts, and network infrastructure that are outlined in the
sections that follow.
Hardware requirements
For general requirements for the servers, networks, network adapters, storage, and device controllers for storage for HyperV and for failover clusters, see
"Hardware requirements" in HyperV Overview and Failover Clustering Hardware Requirements and Storage Options.
Note
https://technet.microsoft.com/enus/library/jj863389.aspx
1/8
12/11/2015
DeployaHyperVCluster
You can use shared storage that is attached, and you can also use SMB3.0 file shares as shared storage for servers that are running HyperV that are
configured in a failover cluster. For more information, see Deploy HyperV over SMB. The steps in this topic assume that you will be using shared storage
that is attached to the cluster nodes.
Important
Microsoft supports a failover cluster solution only if all the hardware features are marked as "Certified for Windows Server 2012 R2" or "Certified for
Windows Server 2012." In addition, the complete configuration servers, network, and storage must pass all cluster validation tests. For more information,
see Step 4: Validate the cluster configuration in this topic and Validate Hardware for a Failover Cluster.
Software requirements
For the software requirements for using the HyperV role and the Failover Clustering feature, see HyperV Overview and Failover Clustering Overview.
To install the guest operating system that will run on the clustered virtual machine, you will need appropriate installation media for a supported operating
system. You can install from a physical media or an image .iso file. You also can configure the virtual machine by using a virtual hard disk on which an
operating system has already been installed. The steps in this topic assume that you will install Windows Server 2012 R2 on the virtual machine.
Limitations
HyperV and failover clusters include the following general limitations:
The failover cluster can have a maximum of 64 nodes.
You can have a maximum of 8,000 virtual machines per cluster for server computer virtualization, with a maximum of 1,024 virtual machines on a single
node, provided that the server hardware has the resources to support them. For example, when HyperV is used together with Virtual Desktop
Infrastructure VDI for client computer virtualization, you can have a maximum of 8,000 VDI Windows 8.1, Windows 8 or Windows7 virtual machines per
cluster, with a maximum of 1,024 on a single node.
For more information about scalability limits for HyperV, see HyperV scalability in Windows Server 2012 and Windows Server 2012 R2.
https://technet.microsoft.com/enus/library/jj863389.aspx
Step 1: Connect both physical
2/8
12/11/2015
DeployaHyperVCluster
https://technet.microsoft.com/enus/library/jj863389.aspx
3/8
12/11/2015
DeployaHyperVCluster
6. Under Connection Type, click External network, and then select the physical network adapter.
7. Click OK to save the virtual network and close Virtual Switch Manager.
NewVMSwitch"VMExternalSwitch"NetAdapterName"WiredEthernetConnection3"AllowManagementOS
https://technet.microsoft.com/enus/library/jj863389.aspx
4/8
12/11/2015
DeployaHyperVCluster
the location of both the virtual machine and the virtual hard disk.
Ensure that you select a virtual hard disk option that is appropriate for the method you are using to install the guest operating system on the virtual
machine for example, from physical media or from an .iso file.
NewVHDPath<PathToVHDXFile>DynamicSizeBytes127GB
NewVMNameFailoverTestPath<PathToVMFolder>Memory1GBSwitchName"VMExternalSwitch"BootDeviceCDVHDPath<PathToVHDXFile>
AddVMDvdDriveVMNameFailoverTestPath<PathtoISOFile>
SetVMNameFailoverTestAutomaticStartActionNothing
AddClusterVirtualMachineRoleVirtualMachineFailoverTest
https://technet.microsoft.com/enus/library/jj863389.aspx
5/8
12/11/2015
DeployaHyperVCluster
Quick migrationPause the virtual machine, save state, move the role to another node, and start the virtual machine on the other node.
Storage migrationMove only the virtual machine data to other clustered storage.
For example, to test a planned failover by performing a live migration, you can use Failover Cluster Manager or the Windows PowerShellMove
ClusterVirtualMachineRole cmdlet.
MoveClusterVirtualMachineRoleName"FailoverTest"NodeContosoFCNode2
https://technet.microsoft.com/enus/library/jj863389.aspx
6/8
12/11/2015
DeployaHyperVCluster
StopClusterNodeNameContosoFCNode2
UpdateClusterVirtualMachineConfigurationName"FailoverTest"
Scenario A: To remove a virtual machine from a cluster and retain the virtual machine
1. Use Failover Cluster Manager to take the virtual machine offline. Under Roles, rightclick FailoverTest the clustered virtual machine that you configured in
Step 7: Create a highly available virtual machine, point to More Actions, and then click Stop Role.
2. Optionally, export the virtual machine. Exporting a virtual machine allows you to move the virtual machine to another server running HyperV, such as a
nonclustered server. To do this:
https://technet.microsoft.com/enus/library/jj863389.aspx
7/8
12/11/2015
DeployaHyperVCluster
a. Switch to HyperV Manager and verify that the FailoverTest virtual machine is selected.
b. Under Actions, click Export.
c. Type or browse to specify a location in which to export the virtual machine, and then click Export.
Important
If you plan to import the virtual machine to another cluster, use either HyperV Manager or Microsoft System Center Virtual Machine Manager. If you
import a virtual machine using HyperV Manager, afterwards, configure the virtual machine by using the High Availability Wizard in Failover Cluster
Manager, or the Windows PowerShellAddClusterVirtualMachineRole cmdlet.
3. In HyperV Manager, verify that the FailoverTest virtual machine is selected. Under Actions, click Delete.
4. In Failover Cluster Manager. expand Roles, rightclick FailoverTest, and then click Remove.
The virtual machine is removed from the cluster.
Scenario B: To remove a virtual machine from a cluster and delete the virtual machine
1. Use Failover Cluster Manager to take the virtual machine offline. Under Roles, rightclick FailoverTest the clustered virtual machine that you configured in
Step 7: Create a highly available virtual machine, point to More Actions, and then click Stop Role.
2. Switch to HyperV Manager and select the FailoverTest virtual machine. Under Actions, click Delete.
3. In Failover Cluster Manager, expand Roles, rightclick FailoverTest, and then click Remove.
The virtual machine is removed from the cluster.
4. Manually delete the virtual machine and the virtual hard disk from the shared storage.
See also
HyperV Overview
Failover Clustering Overview
System Center 2012 Virtual Machine Manager
2015 Microsoft
https://technet.microsoft.com/enus/library/jj863389.aspx
8/8