Step-by-Step: Migrating to FREE Microsoft Hyper-V 2012 Servers AND Clusters from 2008 R2 and VMware


UPDATE: I’m updating this article to also include a new Step-by-Step video and migration guide that was recently released by our Cluster team to provide guidance for using the Migrate a Cluster Wizard to migrate CLUSTERS of Hyper-V Server hosts from 2008 R2 to 2012, in addition to the other migration scenarios previously included in this article below.

– – – – – – – – – – –

Microsoft Hyper-V Server 2012 is our completely FREE Type-1 hypervisor product.  Unlike some other competing free hypervisors, Hyper-V Server 2012 has the same virtualization scale and availability features as the Hyper-V role in licensed editions of Windows Server 2012 ( 4TB Physical RAM, 320 Logical Processors, and MORE ), but it’s optimized for running only the Hyper-V hypervisor on bare metal.  It’s a great solution when you’re looking to deploy dedicated hypervisor hosts within your shop.  The result?  An enterprise-scale type-1 hypervisor for FREE! You can get more details on Hyper-V Server 2012 here.

Recently, I was involved in a project that was migrating from Hyper-V Server 2008 R2 to Hyper-V Server 2012.  Due to architectural changes involved in implementing the new features in Hyper-V Server 2012, a direct in-place upgrade is not possible.  However, the across-the-wire migration process we used below was straight-forward and worked very well.  A ton of work has been done by the product team on improving the virtual machine export/import process, and we definitely saw this area shine during our project. Here’s the migration steps we used:

Preparation Steps for New Target Hyper-V Server 2012

  1. Install and configure a new Hyper-V Server 2012 box. 
     
  2. Set up the same Virtual Networks as the source host in Hyper-V Manager using the “Virtual Switch Manager” host action.

Migration Steps for Existing Source Hyper-V Server 2008 R2

  1. Backup the original source Hyper-V Server 2008 R2 server as a precaution.  We won’t be making any changes to this box during the migration, but it never hurts to be safe! 🙂
     
  2. Shutdown running virtual machines on original source Hyper-V Server 2008 R2 server.
     
  3. Review each virtual machine for snapshots – any snapshots taken of a running virtual machine should be merged by using the “Delete Snapshot …” guest action in Hyper-V Manager.  Snapshots of running VM’s are not supported for migration due to hardware and software architectural differences on the source and target servers.
     
  4. Review each virtual machine and ensure that any Saved States are removed using the “Delete Saved State …” guest action in Hyper-V Manager. Saved states of VM’s are not supported for migration due to hardware and software architectural differences on the source and target servers.

    Important! If there are important changes saved in a VM’s saved state that you wish to capture, start and gracefully shutdown the VM rather than simply deleting it’s saved state.
     

  5. Set the MAC address option in the settings of each VM to “Static” prior to migrating.  This allows the guest OS to maintain a fixed relationship between virtual NIC and MAC address even after migrating to the target Hyper-V Server 2012 server and prevents you from needing to potentially reconfigure virtual NICs post-migration.
     
  6. Export each VM using the “Export …” action in Hyper-V Manager to an external storage location or network location that is reachable from both the new target Hyper-V Server 2012 box and your remote administration PC.

Migration Steps for New Target Hyper-V Server 2012

  1. Import each exported VM on the new target Hyper-V Server 2012 box using the “Import Virtual Machine …” host action in Hyper-V Manager.

    Important! When using the new Import Virtual Machine wizard, you will be prompted to “Register”, “Restore”, or “Copy” the virtual machine when importing.  You will want to select the “Restore” option and confirm the path on the new Hyper-V host to which the VM will be restored.
     

  2. Review the settings of each imported VM using the “Settings …” guest action in Hyper-V Manager.  Hyper-V Server 2012 provides the ability to assign more virtual processors (up to 64 per VM), more virtual memory (up to 1TB per VM) and new virtual hardware options, such as Virtual Fiber Channel HBAs and network offloading/security.  For some VMs, you may wish to take advantage of these new capabilities by adding virtual hardware resources.
     
  3. Start each VM using the “Start” guest action in Hyper-V Manager to confirm that the VM starts successfully.
     
  4. Connect to the console of each VM using the “Connect …” guest action in Hyper-V Manager to confirm successful guest OS boot.
     
  5. Login at the console of each VM and confirm that all services have started
     
  6. Update the Hyper-V Integration Services for each VM by using the “Action -> Insert Integration Services Setup Disk” option on the menu bar of each Virtual Machine Connection window.

Rinse and Repeat …

If you have multiple Hyper-V Server 2008 R2 hosts that you are migrating, you can perform this same set of migration steps for each host – one at a time – and, after each host is migrated, rebuild the old source host as a new Hyper-V Server 2012 box for migrating the VMs from your next Hyper-V Server 2008 R2 machine.

What If I’m Migrating Clusters of Hyper-V Hosts?

When migrating Hyper-V Server clusters ( or general Windows Server failover clusters, for that matter ), you can leverage our Migrate a Cluster Wizard included within the Failover Cluster Manager tool ( part of Windows Server 2012 and also included in the FREE Remote Server Admin Toolkit ).  This wizard steps through the end-to-end process of validating, testing and migrating clustered roles from old Cluster to new Cluster, providing a streamlined solution for a managed cross-Cluster migration and fallback process. 

Watch this step-by-step video for the details on leveraging this wizard for your migration strategy …

Download this video for offline viewing.

Ready to try this yourself?  Leverage this Step-by-Step Guide from our Cluster team to work through the process:

What If I’m Migrating from VMware?

If you’re migrating VM’s from a VMware host, rather than using the middle set of migration steps for exporting VMs, you can instead use the new FREE Microsoft Virtual Machine Converter solution accelerator tool.  This tool provides a streamlined conversion process that accomplishes the following tasks in the migration process:

  • Converts and deploys virtual machines from VMware hosts to Hyper-V hosts. As part of the machine conversion MVMC converts the virtual disks attached to the source virtual machine. It also migrates configuration such as memory, virtual processor and so on from the source virtual machine to the converted virtual machine deployed on Hyper-V. It adds virtual network interface cards (NICs) to the converted virtual machine on Hyper-V.
     
    • Supports conversion of virtual machines from VMware vSphere 4.1 and 5 hosts to Hyper-V.
       
    • Note   MVMC also supports conversion of virtual machines from VMware vSphere if the host is managed by vCenter 4.1 or vCenter 5. You have to connect to vCenter 4.1 or 5 through MVMC to convert virtual machines on vSphere.
       
  • Converts VMware virtual disks to Hyper-V based virtual hard disks (VHDs).
     
  • Uninstalls VMware tools prior to conversion to provide a clean way to migrate VMware-based virtual machines to Hyper-V.
     
  • Installs Hyper-V Integration Services on the converted virtual machine if the guest operating system is Windows Server 2003 SP2.
     
  • Has a wizard-driven GUI, making it simple to perform virtual machine conversion.
     
  • Offers fully scriptable command-line interfaces for performing virtual machine and disk conversions that integrates well with data center automation workflows and Windows PowerShell scripts.

Share Your Migration Tips!

These steps have worked well for me in migrating to Hyper-V Server 2012, but please feel free to share your migration tips in the comments below if you’ve migrated differently so that we can grow our set of migration “best practices” together.

Hope this helps!

Keith

 

Comments (26)
  1. KeithMayer says:

    Hi Sandheep,

    Hyper-V 2012 Manager can be used to only manage Windows Server 2012 and Hyper-V Server 2012 due to changes in the management stack. Hyper-V Server 2008 R2 is managed via Hyper-V 2008 R2 Manager.

    Hope this helps!

    Keith

  2. KeithMayer says:

    Hi Lukas,

    The Hyper-V Import Wizard can import virtual machines from Hyper-V Server 2008 and 2008 R2, so you can use the same process for migrating from either platform.

    HTH,

    Keith

  3. KeithMayer says:

    Hi Erik,

    I'd recommend leaving the MAC setting as Static after migrating the VM.  If you change it back to dynamic, the OS inside the VM may end up seeing it as a new NIC.

    Hope this helps!

    Keith

  4. KeithMayer says:

    Thanks for your feedback, Manzoor!

    In terms of migration from VMware to Hyper-V – I've actually found that the MVMC tool referenced above can convert VMs to Hyper-V faster than the P2V tools I was previously using.  But, as with many areas of IT, there may be unique configurations where a P2V migration process is possibly faster.

    Have you tried the MVMC tool for any migrations yet?  If not, please give it a try and let us know what you think.  If yes, which P2V tools are you finding to be best for VMware to Hyper-V conversions in your shop?

    Thanks!

    Keith

  5. KeithMayer says:

    Hi Edward,

    The export/import process does not automatically convert VHD to VHDX, as both virtual hard disk formats are supported by Windows Server 2012 and Hyper-V Server 2012.  However, you can use the Edit Disk action in Hyper-V Manager or the Convert-VHD PowerShell cmdlet to convert existing virtual hard disks to the new VHDX format.

    Best regards,

    Keith

  6. KeithMayer says:

    Thanks Ian!  Great added information on a 3rd party solution for cross-platform live migrations.

    Keith

  7. KeithMayer says:

    Hi Mike,

    Yes – In Windows Server 2012, the VM import process has been redesigned to also allow import of VM's that are copied or presented manually.  

    Best regards,

    Keith

  8. KeithMayer says:

    Hi Step,

    Server 2012 and Server 2008 R2 use very different formats for storing the state of VMs due to scalability and architecture enhancements in Server 2012.  As a result, you won't be able to import any VMs that have saved state information in the form of either being a saved VM or having VM snapshots.  You'll need to use Hyper-V Manager to remove and merge that information into the base VM prior to importing.

    In terms of using backup / restore to move the VMs to Server 2012 – as long as the backups are capturing the raw VM files ( VM configuration + VHDs ) in a state that doesn't include saved state information and you're using the same compatible backup tools on 2008 R2 and 2012, you should be able to use backup / restore to move the VMs as well – as long as Server 2012 gets a full copy of the VM without any saved state information sitting in a folder that it has permissions to, you should be able to successfully import the VM.

    Hope this helps!

    Keith

  9. KeithMayer says:

    Hi Nathan,

    To be safe, I recommend that you follow the steps above, as you'll need to make sure that the VMs are in a consistent state and do not have any saved states stored with them, such as snapshots or saved VMs, prior to exporting.  That said, you can certainly follow the steps through to exporting the VMs to external storage and then rebuild the same box with Hyper-V Server 2012 prior to importing.  This is essentially the same process that I've listed above, with the exception being that source and target servers are ultimately using the same physical server hardware.

    Hope this helps!

    Keith

  10. KeithMayer says:

    Hi Marius,

    Live Migration is supported between Hyper-V Server 2012 hosts – as many concurrent Live Migrations as hardware will permit – but because persistence of VM state is not supported across differing hypervisor versions, live migration is not supported from Hyper-V Server 2008 R2 to Hyper-V Server 2012.

    HTH,

    Keith

  11. KeithMayer says:

    Hi Jason,

    Make sure that you are using the Hyper-V export option first from the 2008 Hyper-V Host and that the export folder includes the XML VM configuration file, as well as the VHD.  If it still doesn't import, it could be an issue with the VM configuration possibly being corrupt – try creating a new VM on the 2008 host and attach the existing VHD to it and then export it again.  If all else fails, you can certainly copy just the VHD to the 2012 Hyper-V host and define a new VM with the appropriate settings, attaching the copied VHD to it.

    Hope this helps!

    Keith

  12. KeithMayer says:

    Hi J.R.,

    Prior the upgrade, check the original Server 2008 R2 "Startup and Recovery" settings to ensure that "Complete Memory Dump" isn't selected as the action to perform on system failures.  If "Complete Memory Dump" is selected, this will force the upgrade to attempt to create a pagefile large enough for dumping the entire memory contents, which would explain the results that you are seeing.

    Hope this helps!

    Keith

  13. Too bad that you need to shutdown the VM's first, no live migration ?

  14. Ian Masters says:

    Double-Take Move can be managed directly from Microsoft System Center Orchestrator, Virtual Machine Manager, and Service Manager to discover, configure, and migrate live Windows virtual machines in real-time from VMware ESX platforms to Windows Hyper-V.

    Double-Take Move and Microsoft System Center provide the most advanced technology to convert your VMware virtual machines to Hyper-V. IT organisations can take advantage of the efficient and powerful migration capability of Double-Take Move within the flexible and powerful management interfaces of Microsoft System Center to optimise their datacenters with Hyper-V virtualisation.

  15. mike h says:

    I've seen some other posts on the Internet where people did not perform an export of their VM from the 2008 R2 hosts.  They unmapped the CSV and re-mapped to the new 2012 server.  They then imported the VMs on the 2012 VH.  This radically improves the migration time so you do not have to copy/export over all of the VHD files.  Can you confirm if this is supported by Microsoft?

    Thanks!

  16. Lukas says:

    Hi there,

    are there big changes in scenario Server 2008 SP2 -> Server 2012??

  17. J.R. says:

    One issue I have seen is if you have a Hyper-V Server with a lot of memory (512GB for example), you better have a C: drive big enough to allow for a 512GB page file plus the OS. We have a manual 4GB page file on our Hyper-V server and a 64GB C: drive with 40+GB free. Server 2012 says I need 519GB free to do the upgrade… Not nice… Not nice at all…

  18. Andrew S. Baker (ASB) says:

    Thanks for this guide, Keith.   The import functionality under 2012 is much better than before.  It worked flawless for me with 3 VMs.

    Once I moved my critical VMs over to my new (already built) 2012 server, I did an in-place upgrade from 2008-R2 to 2012, and it was a dream.  🙂

    I've also tested some Live Migrations, and I'm loving it.  The only changes I think I'm going to make is to get another NIC for these servers to dedicate to Live Migrations.  

    -ASB: http://XeeMe.com/AndrewBaker

  19. SanDHeeP says:

    How caan we manage Hyper-V 2008 R2 Servers from Hyper-V 2012 Manager?

    When I tried to add the servers its returns the error "operation failed"

  20. Gary Emmerton says:

    @Sandheep, I have been able to manage a Hyper-V 2012 server from Hyper-V manager on 2008 R2.  Have not fully tested but certainly allows the common activities of creating/removing VMs, starting, stopping, connecting to the console, etc.

    Downside is that you can't use 2008 R2 server manager to connect to and manage a 2012 Hyper-V box.

  21. Edward Kelty says:

    Does the export/import process change all your existing VHD's to VHDX?  I'm going to be migrating eight guests from HV2008R2 to HV2012 and from old hardware to newer hardware and I'm wondering if it's really export/import or export/update vhd/import…?

    Thanks!

  22. Jason says:

    Hi Keith,

    I am trying to export -> import from Server 2008 to Server 2012 and when I go to import to Server 2012 in the Select Virtual Machine it says 'No virtual machine files found'.  I can import it file to another Server 2008 host.  Any insight?

  23. StepBP22 says:

    Keith,

    Thanks for article. I'm looking at migrating VMs from 2008 R2 to 2012 and was curious about step 3,4. If I delete the *.bin and *.vsv file after import and before starting VM on 2012, do I still need to merge snapshot? Also,' What is your opinion about using backup (from 2008 r2) and restore (to 2012) as one of the options for migration?

  24. ErikD says:

    Hi,

    Should I leave the MAC setting at static once the VM is migrated to the Hyper-V 2012 server?

    Or should I change it back to dynamic?

  25. Nathan W says:

    Hi Keith,

    Is there any technical reason why one couldn't…

    1. Export each VM using the "Export …" action in Hyper-V Manager to an external storage location or network location

    2. Perform a clean install of Hyper-V Server 2012 on the existing Windows Server 2008 R2 box

    3. Pick up with directions with: "Import each exported VM on the new target Hyper-V Server 2012 box using the "Import Virtual Machine …" host action in Hyper-V Manager." then carry on?

    Nathan

  26. Manzoor Ahmed says:

    Hi Keith,

    We can migrate the Windows VM's from VMware to Hyper-V by using P2V method with less down time of VM's.

    After migrating the VM to Hyper-V shutdown the VM on VMware and start the migrated VM from Hyper-V host and uninstall VMware tools from the VM which is now running on Hyper-V.

    Manzoor Ahmed

Comments are closed.