I, like many, love the new Hyper-V in Server 2012. NIC teaming, concurrent live migration, SMB VM storage, and the all-new Replica. Replica solves a few problems, but it’s definitely not a panacea on it’s own.

There is lots of info on Hyper-V Replica out there, but a few points I wanted to make that are being skipped for those of us new to it. Most importantly: Replica does not do automatic failover.

Things Replica can do:

  • Keep a copy of your VM on another server and storage, up to within 5-15 minutes of current.
  • Allow you to do a manual, “planned failover” for planned maintenance of host. After maintenance, it’s only minutes of manually failing back.

Things Replica can’t do:

  • Failover automatically before host server auto reboots, such as a monthly Windows Updates.
  • Auto start the replicas if primary host or VM’s goes offline. All starts of replicas are manual.

Now there are surely ways to automate these limitations with PowerShell, and certainly with System Center Orchestrator. Example could be a PowerShell script that does a Planned Failover on all VM’s as a shutdown script on the host. Also you might be able to create a script on replica host that watches for replicas in disconnected state, and then starts up replicas. If you’ve researched or tried this, let us know in comments.

Also, something that tripped me up the first time. The Move command, which seamlessly move’s your VM to another host without downtime and without shared storage… is incompatible with Replica, but Replica has it’s own Move built in, called Planned Failover. Clicking Move will give you bad news that you have to shutdown first, but really should say “hey, you’re using Replica, why not use the Planned Failover?”

I’ve been using Hyper-V since 1.0 in production (and Virtual Server 2005 before it), and have my own personal list of “things to do and not do”, applicable to all three versions so far. These are highly opinionated guidelines of mine, but they’ve worked great and small and large shops.

Guidelines

  • NIC’s plural: They need at least 2 NIC’s plugged into 1GB switch, preferably all 4 NIC’s. Smoke ‘em if ya got ‘em.
  • Friends Don’t Let Friends Share NIC’s: The default Virtual Switch will take the first NIC and share it between the host and guests. The preferred way is to go in and set up the Virtual Switch so that no NIC’s are shared (unchecked the “shared with host” box), and the first NIC is just for the host (not used in a Virtual Switch at all). The end result is the host gets a dedicated 1GB NIC, and the guests can use the others. Now in Server 2012, we can team the other NIC’s and tell the Virtual Switch to use the team as if it was just one NIC. Here’s details on NIC teaming for Hyper-V. It’s awesome sauce.
  • Friendly Names: With each host having one Virtual Switch, they should be named the same so it’s easier to move VM’s between them. The Switch name is used to match up VM’s to the network when doing import/export.
  • Friendly Names, For Real: With so many physical NIC’s, it’s easier for troubleshooting later if you go into the Network Connections on the host server and rename the NIC’s to something like “Host NIC” and “Guest NIC 1″, etc.
  • There is an I in Teaming: When setting up NIC Teaming in Server 2012, choose options: Switch Independent, Hyper-V Port. This is good when you don’t have a single VM that needs more then 1GB and you don’t have switches that can be configured for teaming. It basically puts each VM on one of the three physical ports, but if one fails, it will fall back to one of the others. This is a great combo of “zero config” and good performance when using a Hyper-V host. Manual physical switch config to achieve true aggregation is still the best way to go.
  • SR-IOV Not So Fast: When setting up a Virtual Switch on new hardware, you may be tempted to click the SR-IOV. It’s the new hotness and allows a VM to talk directly to the physical NIC to save nano-seconds. This sounds awesome, but really is only needed if you have something like a high end SQL server that needs every ounce of the NIC, or a voice server where every nanosecond counts. SR-IOV requires the guest be Server 2012, and also manually enabled in guest with PowerShell. It requires very new hardware, and doesn’t work with Teamed NIC’s in the host… so we’re going to leave it off most of the time.
  • Mo Disk Means Mo Fun: Run one big RAID6 set on a standard 2U dual processor host. This is definitely not best practice, as you’ll read a lot about doing RAID10 for improved I/O, but I find for the average small IT shop that the I/O requirements just aren’t there to justify loosing 1/2 of their storage. If you’re buying SAS drives (10k RPM and up), then I would do RAID6 *including host partition disks. Yes you read that right. If you look at the I/O of the host disks in the typical RAID1/RAID5 split server, the I/O of the host (just running Hyper-V service) is wasted, sitting near idle. Better to add that I/O to the RAID6 pool for all workloads to share. You can then make your smaller system partition, and put the rest to a Hyper-V disk storage partition. Whew.
  • Integrate and Celebrate: Since Server 2008, Windows Server has come with Integration Services built-in. But, if you’re running down-level versions of Windows on a Hyper-V host, that you need to upgrade/install the Integration Services to match the host version. So if the host is 2012, then every non-2012 VM on it need their Integration Services.

VM Preferred Settings and Limits

Remember some steps and numbers when setting up new Windows virtual machines in your sexy new Hyper-V host:

  • CPU: In Hyper-V 2008 and 2008 R2, you can only give a max of 4 CPU’s. Starting in Hyper-V 2012, you can give up to 64, but there’s still some supportability limits:
    • Server 2003 with SP2 = 2
    • Server 2008 with SP2 = 8
    • Server 2008 R2 and up = 64
  • CPU part deux: Don’t be afraid to give more CPU’s then you think it needs. You should not use the number of CPU’s as a way to control resource utilization. A new 2U server today will typically have 12-16 hyperthreaded cores… so limited your VM’s to 2 or 4 is silly. Give boxes 8, or give your SQL/Exchange servers 16, or 24… Then use the built-in CPU priority to control which VM’s get a priority on CPU cycles.
  • RAM: Dynamic RAM in Server 2008 R2 SP1 and newer is so fantastic that you should enable it for everything except Exchange and SQL servers. Minimum RAM in most scenarios should be 256MB for Server 2003 and 512MB for Server 2008 and newer. Again, don’t use the Max RAM to control the distribution of resources, but rather use the RAM priority to do that. Make the Max what you could imagine the server using at it’s highest, then add a little more :) . I just leave it at the default for most cases.

Good Luck!

You may be running Hyper-V great on Windows Server 2008 R2 and want to upgrade to Server 2012, or maybe want some Hyper-V goodness in Windows 8 (finally!). But before you do, be sure your hardware can support it, because Hyper-V 3.0 has a new requirement of your processor for memory management.  Here’s a great tip from Hanselman’s Windows 8 power user post:

If you want, you can check your Windows 7 machine now and see if your system is 64-bit and supports SLAT and the newer CPU features you’ll need. Download CoreInfo and from an Admin Command Prompt run “coreinfo -v.” You want to see a start where it says “Supports SLAT.”