Hyper-V R2 best practices and tips for designing and building your infrastructure

I will use this posting to publish all best practises on desiging, installing and configuring Hyper-V R2. Regulary more info will be added to this post.

1. Make sure your virtual machines are LIVE migrated to another Hyper-V host in your cluster instead of being Quick Migrated. 
Hyper-V R2 offers two methods of moving a VM to another host. Quick Migration which was available in version 1 of Hyper-V. In this method, the stated of the running VM is saved to disk. Then the VM is moved to another host and re-started.
Hyper-V R2 offers Live Migration; the VM continues to run while being moved to another host. 

However, when a Hyper-V R2 host is shutdown, for example because additional hardware needs to be added, or after applying software patches, the VM’s are Quick Migrated to another host. This is not what you want obviously.  The article titled Improve your Hyper-V Virtual Availability – Live Migrate VMs on Shutdown explains how to force your VM”s to be live migrated when your Hyper-V host is shutdown for maintenace.
 

2. Separate your virtual machines (anti affinity)
Sometimes two or more virtual machines should not be running on the same Hyper-V host. For instance two nodes of a Microsoft TMG cluster, or two Exchange 2010 servers running as mailbox server in a DAG. The redundancy the application offers is lost if the host fails. So you should make sure those VM’s are separated.
Separation of virtual machines cannot be managed from the graphical management tools available in Hyper-V; Hyper-V manager, Failover cluster manager and Virtual Machine Manager. See this blog for instructions on how to separate your VM’s https://up2v.wordpress.com/2010/07/27/how-to-separate-hyper-v-virtual-machines-using-anti-affinity/

3. Develop and implement a naming convention
Develop a naming convention for storage arrays, volumes of your storage, disk volume names in Windows Server, names for Cluster Shared Volumes, network interfaces etc. Building and troubleshooting is much easier when you use a naming convention.

4. Make sure you have a solid network design which includes all possible networks and order hardware with sufficient network interfaces
The networking design in Hyper-v is probably the most import part of the design and most complex bit of the building. You will need several physical network interfaces in your Hyper-V host:

1 nic for management of the parent partition.
1 or 2 for your virtual machines (teamed for redundancy)
1 for the cluster heartbeat
1 for live migration
1 for Cluster Shared Volumes
1 or 2 for iSCSI (2 for redundancy, do not team)

It is possible to trunk several VLAN ids over a physical nic which can be used by your virtual machines. In Hyper-V there is a one to one relation between the number of physical nic’s in your host and the number of virtual nics availble in your VM for external networking outside your host. So if you need two virtual nics in your VM (one for production traffic and one for backup) you will need two physical network adapters. It it not possible to create two external switches which are connected to the same physical nic. In VMware you can created portgroups on your switch, enabling to have multiple virtual nics in the VM which are all using the same physical nic.

Information on how to configure the network used for Live Migration http://technet.microsoft.com/en-us/library/ff428137(WS.10).aspx
The article above also explains how to set the network interface which will be used for Clustered Shared Volume traffic.

5. Make sure you know the limitations of your iSCSI storage
All  iSCSI storage platforms are limited in the number of iSCSI connections it can handle. The fact that Microsoft Hyper-V supports 16 nodes in a cluster, does not mean you are able to connect all 16 nodes to all of your CSV volumes on iSCSI. For example, Dell EqualLogic 4000 has a limit of 96 iSCSI connections per member. The number of iSCSI connection that will be active on the member is calculated by 

number of hosts in cluster x number of iSCSI nics x number of volumes x number of active ports on the EqualLogic. The EqualLogic has two active ports.

Each connection from a single host to a volume on the EqualLogic will use 4 iSCSI connections. With 16 nodes in a cluster, this will lead to 64 iSCSI connections. If you add a second volume to be used as CSV, you will need 128 iSCSI connections. As the limit of the Dell EqualLogic 4000 is 96, this will mean you cannot connect all host to both CSV’s.
So, know the limitations and design the number of CSV’ s accordingly!
See also this article https://up2v.wordpress.com/2010/07/30/clustered-shared-volumes-explained-issues-and-best-practises/

6. Do not disable NTLM for your cluster nodes as this will break your CSV
Aidan  Finn excellent blogsite has an article on NTLM. A lot of companies disable NTLM authentication because it is less secure than Kerberos. However, CSV uses NTLM for authentication between the hosts. Disabling will break your CSV! Read it at http://www.aidanfinn.com/?p=10842

7. disable auto start for Exchange 2010 mailbox servers member of a DAG to comply with Microsoft support policy.
Microsoft does support virtualized Exchange 2010 server having the mailbox role and member of a DAG. However, you must make sure the VM cannot be  not Live Migrated to another host and will not be restarted at another host if the original host fails. To prevent auto start of the VM after a host failure, select the VM in Failover Cluster Manager under the Services and Applications node, select Properties and disable Auto Start. As you are using a DAG, another node will take over. No need for an auto start. Read more here https://up2v.wordpress.com/2010/07/31/exchange-server-2010-virtualize-or-not-thats-the-question/

8. Decide if you are using SCVMM 2008, which version and which database
SCVMM can be used to centrally manage your Hyper-V host and virtual machine. If you want to roll out new VM’s using template, want to use quick storage migration or ProTips, you will need SCVMM.
It comes in two flavours: workgroup edition is able to manage a maximum of 5 Hyper-V hosts. The enterprise Edition will manage a unlimited number of host.
SCVMM comes wit the free SQL server express. The database is limited to 4 GB. This will be sufficient for around 150 Hyper-V hosts. More than 150 hosts: use SQL Server ! Also if you want to have reporting in SCVMM, you will need the full version of SQL server. Express edition does not support reporting according to this article http://technet.microsoft.com/en-us/library/cc764220.aspx

http://blogs.technet.com/b/scvmm/archive/2009/03/03/scvmm-and-sql-server-which-version-should-i-use.aspx
The procedure to upgrade from SQL Server express to the full edition is explained here http://www.yusufozturk.info/virtual-machine-manager/upgrading-scvmm-2008-r2-database-to-mssql-2008-r2-standard-edition.html

9. If you are installing more than 8-10 hosts, spend time on an automated deployment of Windows Server including Hyper-V
A manual deployment of several Windows Hyper-V servers will cost quite some time. Installing Windows, the latest device drivers, adding Hyper-V role, adding Failover clustering feature, storage, configuring networking etc etc. An automated deployment will save time and it makes sure all servers are installed and configuered the same way. Good opportunity to finaly learn PowerShell! 😉

10. Use the most recent device drivers and firmware
I have seen some networking issues with the Microsoft supplied drivers for Broadcom adapters. Using these drivers, all of a sudden the network connection was lost. By installing the latest Broadcom drivers issues were gone.

11. Do not install an anti-virus program in the parent partition of the Hyper-V host, or exclude some exectuables and folders.
Some serious issies with disappearing VM’s can happen if the anti-virus programs scans virtual machine files. Read this Microsoft article abour excludign program exectuables and folders http://support.microsoft.com/kb/961804

12. Keep an eye on Aidan Finn website.
He has lots of good information on Hyper-V, SCVMM and other Microsoft product. This article on setting up a Hyper-V cluster gives lots of good advise: http://www.aidanfinn.com/?p=10311

Advertisements

About Marcel van den Berg
I am a technical consultant with a strong focus on server virtualization, desktop virtualization, cloud computing and business continuity/disaster recovery.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: