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:

(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".

Select the following: (CTRL Click for multiple targets)

Microsoft Virtual System Migration Service/COMPUTER

Microsoft Virtual System Migration Service/COMPUTER.FQDN

cifs/COMPUTER

cifs/COMPUTER.FQDN

(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

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.

In the Hyper-V manager, open the properties of the host you want to edit.

Select "Live Migrations" on the left.

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.

Click "OK" to accept changes and close the properties. Make sure to repeat these steps for each host.

Move that thing!

In Hyper-V manager, right click the guest you want to migrate and select "Move"

Click "Next" on the Before you Begin page.

Keep "Move the virtual machine" selected and click "Next"

Specify the name of the destination Hyper-V server and click "Next"

Keep "Move the virtual machine's data to a single location" and click "Next"

Select the destination folder on the target server and click "Next".

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

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:

Power down the guest.

Open the settings and expand the CPU specification

Under "Compatibility" select "Migrate to a physical computer with a different processor version"

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.