Microsoft 70-412: Objective 1.4 – Manage Virtual Machine Movement

Hooray, the last post in section 1! I hope this series is helping you study as much as it is for me!
This post deals with Objective 1.4, which handles some common Virtual machine operations:

Table of Contents:
Perform live migration
Perform quick migration
Perform storage migration
Import, Export, and Copy VMs
Configure VM network health protection
Configure drain on shutdown

1) Perform live migration

Live migration allows you to move a running virtual machine from one Hyper-V host to another with no  downtime, similar to VMware’s vMotion (But Microsoft was very late to the game, with live migration first appearing in Windows Server 2008 R2).

Common requirements for any form of live migration:

  • Two (or more) servers running Hyper-V that:
    • Support hardware virtualization.
    • Use processors from the same manufacturer. For example, all AMD or all Intel.
    • Belong to either the same Active Directory domain, or to domains that trust each other.
  • Virtual machines must be configured to use virtual hard disks or virtual Fibre Channel disks (no physical disks).
  • Use of an isolated network, physically or through another networking technology such as VLANs, is recommended for live migration network traffic.

Requirements for live migration in a cluster:

  • Windows Failover Clustering is enabled and configured.
  • Cluster Shared Volume (CSV) storage in the cluster is enabled.

Requirements for live migration using shared storage:

  • All files that comprise a virtual machine (for example, virtual hard disks, snapshots, and configuration) are stored on an SMB share.
  • Permissions on the SMB share have been configured to grant access to the computer accounts of all servers running Hyper-V.

Configure Hyper-V hosts for Live Migration
A freshly configured Hyper-V cluster is not able to perform Live Migrations without some additional configuration:

  1. Open up the settings for each host by right-clicking the host name in Hyper-V Manager and selecting Hyper-V Settings
  2. In the left option tree, select ‘Live Migrations’. It should look like the below:
  3. Tick the box for Enable incoming and outgoing live migrations (Unchecked by default).
  4. Choose an authentication protocol:
    1. CredSSP – No additional configuration needed- limited because you need to perform the migration from the source computer.
    2. Kerberos – Requires additional configuration in AD to work- specifically, you need to open ADUC and modify the computer objects for the cluster servers to be trusted for delegation.This is a great article to walk through Constrained Delegation with Kerberos:
  5. Set the number of simultaneous migrations allowed. 2 seems to be okay for a gigabit network.

Set the subnets to be used for Live Migration. Migration traffic is ‘bursty’ and not encrypted, so the recommendation is to do Migration traffic on it’s own separate subnet.

To move a running virtual machine

  1. From the Virtual Machines section of Hyper-V Manager, right-click the virtual machine and then click Move.
  2. On the Choose Move Type page of the Move Wizard, choose Move the virtual machine.
  3. On the Specify Destination page, type the name or browse to the destination computer.
  4. On the Choose Move Options page, select whether you want to move various items stored for a virtual machine, such as virtual hard disks, snapshots, and paging file.

On the Summary page, review your choices and then click Finish.

PowerShell Equivalent:
PS C:\> Move-VM <VM Name> <Server Name> –IncludeStorage –DestinationStoragePath <File Path>

Back to Table of Contents

2) Perform a Quick Migration

Quick migration allows you to move a running virtual machine much faster than a live migration, but with a few minutes of downtime (depending on the RAM in the VM and the storage speed).

I’m led to believe that the type of migration is selected from the Choose Move Type page of the Move wizard, but there is scant information on how to perform a quick migration in Server 2012 r2 online, and I would need to reconfigure my hypervisor to allow nested virtualization to illustrate this option…

Maybe when I go back to clean up this walkthrough sometime after the test. For now, it’s important to know that Quick Migration is fast, but with downtime and should be done after hours for critical systems.

Back to Table of Contents

3) Perform storage migration

Hyper-V in Windows Server 2012 makes it possible to move virtual machine storage while a virtual machine is running. This can be useful if there is congestion on the SAN or if there’s storage maintenance to be done. Important: Since the source and destination servers are the same, Storage Migration can be performed in a workgroup environment.

The methodology is similar to the way this is done in vSphere, namely:

  1. Throughout most of the move operation, disk reads and writes go to the source virtual hard disk.
  2. While reads and writes occur on the source virtual hard disk, the disk contents are copied to the new destination virtual hard disk.
  3. After the initial disk copy is complete, disk writes are mirrored to both the source and destination virtual hard disks while outstanding disk changes are replicated.
  4. After the source and destination virtual hard disks are completely synchronized, the virtual machine switches over to using the destination virtual hard disk.
  5. The source virtual hard disk is deleted.

To perform a storage migration

  • From the Virtual Machines section of Hyper-V Manager, right-click the virtual machine and then click Move.
  • On the Choose Move Type page of the Move Wizard, choose Move the virtual machine’s storage.
  • Here’s a good reference article for Storage Migration:

    Back to Table of Contents

    4) Import, export, and copy VM:


    1. Select the VM in Hyper-V Manager.
    2. Right-Click and select ‘Export’.
    3. Select a location to store the files.


    1. Copy the folder of VM files to the desired destination.
    2. Click on ‘Import Virtual Machines’ from the Actions pane in Hyper-V Manager.
    3. Browse to the location of the virtual machine files and click ‘Next’.
    4. Select the VM to be imported, click ‘Next’.
    5. Choose your import type:
      1. Register the Virtual Machine in-place: This is the fastest method, but you need to have the VM files in their destination location already.
      2. Restore the Virtual Machine: If your virtual machine files are stored somewhere other than their final resting place and you want Hyper-V to move the files to the appropriate location for you, and then register the virtual machine – this is the option for you.
      3. Copy the virtual machine:  This will copy the files to an appropriate location, give the virtual machine a new unique ID, and then register the virtual machine. Useful if you are using this VM as a template.
    6. If prompted, select the locations for virtual hard disks.
    7. Select the desired virtual network switch (Only prompted if the VM was originally connected to a different switch).
    8. Complete the wizard.

    See Import, step 3.

    Back to Table of Contents

    <b5) Configure VM network health protection

    VM Network Health protection is a feature of Windows Server 2012 R2 that triggers an automatic Live Migration if a protected network resource becomes unavailable. By default, this protection is enabled for all virtual network adapters.

    Since it’s configured by default, I assume that they’re asking how to prevent automatic migrations..
    To do this, open the VM’s settings, go to the virtual adapter for the virtual network, and then expand it so you see the “Advanced Features” item.  Untick the box next to ‘Protected Network’.

    Similarly, you can discover what virtual networks are connected to a VM with powershell:
    PS C:\Windows\system32> Get-ClusterGroup InsertVirtualMachineName |Get-VM | Get-VMNetworkAdapter | FL VMName,SwitchName,MacAddress,ClusterMonitored

    And disable monitoring with powershell:
    PS C:\Windows\system32> Get-ClusterGroup InsertVirtualMachineName |Get-VM | Get-VMNetworkAdapter | Where-Object {$_.SwitchName -eq “InsertSwitchName”} | Set-VmNetworkAdapter -NotMonitoredInCluster $True

    Back to Table of Contents

    6) Configure drain on shutdown 

    Another feature solely Windows Server 2012 R2, Drain on Shutdown automatically migrates virtual machines off of a node that is being shutdown without putting the host in maintenance mode. In contrast, shutting down a Windows Server 2012 Hyper-V cluster would save the current state of all the running VM’s to disk, moved and then resumed with the ensuing downtime involved. Note that best practice would still be to put the node in maintenance mode prior to shutdown.

    Here is a pretty good MSDN article on configuring the behavior of Drain on Shutdown:

    Back to Table of Contents