Saturday, November 10, 2012

Setup Share Nothing Hyper-V Live Migration: Step-by-Step

Forward

Share nothing live migration in 2012 is pretty cool; it allows you to move a running VM from one Hyper-V host to the other with NO elements shared between the two prior to the move. For more information about the feature, see:

Microsoft: Live Migration Description
Aidan Finn: Live Migration Demo

How-To

Setup Constrained Delegation

First we need to setup constrained delegation so we don't run into permissions issues during this operation. For more information regarding constrained delegation, see Matthijs Seldam's description and this Technet description

Perform the following for each Hyper-V host in your environment: 
  1. Find the computer object in Active Directory Administrative Center (preferably) or AD Users and Computers
  2. Drill into the properties and locate the "Delegation" location/tab
  3. Select "Trust this computer for delegation to specified services only" and "Use Kerberos Only"
  4. (Repeat for EVERY Hyper-V host you intend to use other than the host you are editing) Click "Add" and type the machine name for the other Hyper-V host in question. Click "OK". 
  5. Select the following: (CTRL Click for multiple targets)
    1. Microsoft Virtual System Migration Service/COMPUTER
    2. Microsoft Virtual System Migration Service/COMPUTER.FQDN
    3. cifs/COMPUTER
    4. cifs/COMPUTER.FQDN
  6. (Optional if using file servers for ISOs or VHD storage) For each file server repeat step 4 and then 5 adding ONLY the cifs services
  7. Click "OK" to save & close the properties of the host. Ensure you repeat step 4&5 for each Hyper-V host. 

Setup Hyper-V

Important: repeat this process for each Hyper-V host.
  1. In the Hyper-V manager, open the properties of the host you want to edit. 
  2. Select "Live Migrations" on the left. 
  3. On the Live Migrations property page, Check "Enable incoming and outgoing live migrations". Under Authentication protocol, select "Use Kerberos", under Incoming Live Migrations select "Use these IP addresses for live migration" and then add each IP address on this host you would like to use for migrations. More IPs=more available bandwidth. 
  4. Click "OK" to accept changes and close the properties. Make sure to repeat these steps for each host.  

Move that thing!

  1. In Hyper-V manager, right click the guest you want to migrate and select "Move"
  2. Click "Next" on the Before you Begin page. 
  3. Keep "Move the virtual machine" selected and click "Next"
  4. Specify the name of the destination Hyper-V server and click "Next"
  5. Keep "Move the virtual machine's data to a single location" and click "Next"
  6. Select the destination folder on the target server and click "Next". 
  7. At this point the wizard will present you with any other decisions that need be made concerning the move; one common one is which HyperV Switch should be used on the target host
  8. Click "Finish"
It should migrate; (if not see below) the guest migration will trigger after the disk has copied over. Migration time will depend  on your disk read performance reading on the former host, writing perf on the target host, and network bandwidth. 

OH NO!


So let's say you're migrating between hosts with differing processors; they could even be the same brand. In my case, for example, I am migrating between a "Core 2 Quad" era Xeon and an "Ivy Bridge" Xeon. If the differences are substantial enough the machine won't move because the features exposed to the VM are missing on one of the platforms. Unfortunately you'll have to power down the guest to perform this fix, but it's a one time deal so next time the live migration will work. Lets do it: 

  1. Power down the guest. 
  2. Open the settings and expand the CPU specification
  3. Under "Compatibility" select "Migrate to a physical computer with a different processor version"
  4. Hit "OK" and start the guest back up. Live migration should now work. 

A Note on Performance: 

While the live migration performs well, the weakest link in your chain will be the speed things move at. Take this example: 

Read from: 4x 7200RPM SATA in RAID 10 
Write To: 6x 7200RPM SATA in RAID 5
LAN: 3x 1GB Full-Duplex w/Jumbo Frames


It does seem to automatically use SMB 3.0 Multi-Channel, but I am having a bit of problem scaling performance. While the screenshot above is held back by the source read speed, I didn't realize much more performance reading from the RAID 5 array, which has very good read speeds, to a different SSD-based RAID 10 array, which has crazy write speeds. I'll post any additional performance info I find. 

No comments: