<

Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x

HOW TO: Migrate a Windows Server 2008 R2 Hyper-V Virtual Machine (VM) to a Windows Server 2012 Hyper-V host server

Published on
19,213 Points
8,013 Views
2 Endorsements
Last Modified:
Andrew Hancock (VMware vExpert / EE MVE^2)
MVE^2, Expert of the Year 2016-2011, Scribe 2016-2012, Author of the Year 2016,2013-2012 VMware vExpert 2016-2011 27 years of experience.
In my previous 24 VMware Articles, most featured Intermediate VMware Topics. My next series of articles concentrated on topics for the VMware Novice;  

If you would like to read the VMware Novice series of articles,  they are listed here for your convenience.

Part 1: HOW TO: Install and Configure VMware vSphere Hypervisor 5.1 (ESXi 5.1)

Part 2: HOW TO: Connect to the VMware vSphere Hypervisor 5.1 (ESXi 5.1) using the vSphere Client

Part 3: HOW TO: Create an ISO CD-ROM/DVD-ROM image (*.iso), and MD5 checksum signature, for use with VMware vSphere Hypervisor 5.1 (ESXi 5.1)

Part 4: HOW TO: Upload an ISO CD-ROM/DVD-ROM image to a VMware datastore for use with VMware vSphere Hypervisor 5.1 (ESXi 5.1) using the vSphere Client, and checking its MD5 checksum signature is correct.

Part 5: HOW TO: Enable SSH Remote Access on a VMware vSphere Hypervisor 5.1 (ESXi 5.1)

Part 6: HOW TO: Create your first Linux Virtual Machine on a VMware vSphere Hypervisor 5.1 (ESXi 5.1) Host Server

Part 7: HOW TO: Create your first Windows Virtual Machine on a VMware vSphere Hypervisor 5.1 (ESXi 5.1) Host Server

Part 8: HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 5.1 (ESXi 5.1) Host Server

We are taking a short break from writing the VMware Novice  HOW TO: articles series, do not be concerned if you have been following them, we will return to them shortly.  

In this article we will show you HOW TO: Migrate a Windows Server 2008 R2 Hyper-V Virtual Machine (VM) to a Windows Server 2012 Hyper-V host server using the tools which are included with Windows Server 2008 R2 and Windows Server 2012, no additional or third party tools are required, other than Hyper-V manager.

1. Logon to the Windows Server 2008 R2 Hyper-V server

Logon or connect to the Windows Server 2008 R2 Hyper-V server which is hosting the guest virtual machine, which you need to migrate to the Windows Server 2012 Hyper-V server. In this tutorial, we will connect to the Windows Server 2008 R2 Hyper-V server using a Remote Desktop Connection via RDP (Remote Desktop Protocol). You could login via the console on the server, or execute the Hyper-V manager from your Administrator Workstation, with the correct permissions and connect to the Windows Server 2008 R2 Hyper-V server, just ensure that your workstation has the correct amount of storage space, and sufficient network bandwidth to complete the migration task.Start the Remote Desktop Connection AppletStart the Remote Desktop Connection applet on your workstation, and specify the servers name. The server we need to connect to, is the Windows Server 2008 R2 Hyper-V server, which is currently hosting the guest virtual machine, which we need to migrate to Windows Server 2012 Hyper-V server. In this tutorial the server name is hypervhost1 which contains the virtual machine we need to migrate.

Start Hyper-V Manager on the serverOnce connected to the server, start Hyper-V Manager on the server.Hyper-V Manager

2. Pre-flight checks of the source virtual machine to be migrated

Backup the original source virtual machine as a precaution.
Shutdown the running virtual machine on Windows Server 2008 R2 Hyper-V server.
Delete ALL Snapshots or Checkpoints on the virtual machine to be migrated.
Delete ANY virtual machine Saved State.
Ensure the MAC address option in the settings of the virtual machine is set to "Static" before migrating.
Ensure the RAM setting for the virtual machine is set to "Static", rather than Dynamic.

3. Preparing and Creating the Export Share on the Windows Server 2012 Hyper-V server

Exporting of a virtual machine can be exported to a local disk or network share. We prefer to Export the virtual machine to a network share on the actual Windows Server 2012 Hyper-V server, which will be hosting the virtual machine, this avoids the manual copy of the virtual machine across the network, so the export is completed in a single operation.

We have seen many issues with configuring this network share, and many Windows Administrators get into difficulty, and receive the following error message 'General access denied error' (0x80070005). , when trying to Export to a network share, this is because the LocalSystem account does not have access to network resources.

Proceed as follows, the permissions need to be set correctly on the share
Explicitly grant Full Control NTFS permissions to the User account performing the export.
Explicitly grant Full Control NTFS permissions to the Computer account of the host where the VM is being exported.
Explicitly grant Full Control Share permissions to the User account performing the export.
Explicitly grant Full Control Share permissions to the Computer account of the host where the VM is being exported.

if the user account is missing from the above the Export will fail.Share PermissionsNTFS Permissions

4. Export the virtual machine

In Hyper-V manager, select the virtual machine to be migrated (exported), Right Click the virtual machine and select Export. If there is no Export option, check the virtual machine has been shutdown.

Specify where you want to save the Export virtual machine files. In this tutorial we have specified the server name and share to export the virtual machine files. vmhost1 is the server name of our Windows Server 2012 Hyper-V host, we want to migrate the guest virtual machine to, and ExportVM is the share we created in 3 above. Export VMClick Export to export the virtual machine. There is no progress indicator, the Cancel Exporting option disappears when the Task has been completed! A 50GB virtual machine took 6 minutes to export.
 

5. Logon to the Windows Server 2012 R2 Hyper-V server

Logon or connect to the Windows Server 2012 R2 Hyper-V server which will host the migrated guest virtual machine. In this tutorial, we will connect to the Windows Server 2012 Hyper-V server using a Remote Desktop Connection via RDP (Remote Desktop Protocol). You could login via the console on the server, or execute the Hyper-V manager from your Administrator Workstation, with the correct permissions and connect to the Windows Server 2012 Hyper-V server, just ensure that your workstation has the sufficient network bandwidth to complete the migration (import) task.Remote Desktop ConnectionStart the Remote Desktop Connection applet on your workstation, and specify the servers name. The server we need to connect to, is the Windows Server 2012 Hyper-V server, which will be hosting our new migrated virtual machine. In this tutorial the server name is vmhost1.Hyper-V Manager 2012Once connected to the server, start Hyper-V Manager on the server.Hyper-V Manager 2012

6. Import (Migrate) the Virtual Machine to be Migrated

Select the host VMHOST1, Right Click the Host and select Import Virtual Machine...
Import Virtual Machine...At the Import Virtual Machine wizard, select Next to continue
Import Virtual MachineSpecify the folder containing the virtual machine to import, followed by Next to continue
Specify the folder containing the virtual machine to importSelect the virtual machine to import, followed by Next to continue
Select the virtual machine to import, followed by nextSelect Restore the virtual machine (use the existing unique ID), followed by next
Select Restore the virtual machine (use the existing unique ID)The configuration will be loaded from the virtual machine files, and then Choose Folders for Virtual Machine Files, followed by Next to continue
Choose Folders for Virtual Machine Files, followed by Next to continueThe location specified in this tutorial, is the default location for our clustered shared volume, C:\ClusterStorage\Volume1\ExportVM\
Choose Folders to Store Virtual Hard Disks followed by Next to continueChoose Folders to Store Virtual Hard DisksThe location specified in this tutorial, is the default location for our clustered shared volume, C:\ClusterStorage\Volume1\ExportVM\At the Completing the Import Wizard page, check the Summary and Click Finish to Import (Migrate) the virtual machine.At the Completing the Import Wizard page, check the Summary and Click Finish to Import (Migrate) the virtual machine. The files are coped and imported...Files are copied....Files are copied.... Once the virtual machine has been imported (migrated), select the virtual machine in Hyper-V manager, and start the virtual machine.Virtual Machine MigratedVirtual Machine MigratedCongratulations, you have successfully Migrated a Windows Server 2008 R2 Hyper-V Virtual Machine (VM) to Windows Server 2012 Hyper-V host server
****************************************************************************
Thank you for reading my article, please leave valuable feedback. If you liked my VMware article and would like to see more Articles from me, please click the Yes button near the: Was this article helpful? at the bottom of this article just below and to the right of this information. Thank You. Do not forget if you have a question about this article or another VMware, Virtualisation, Windows Server 2012 question, why not post a Question for me and the other Experts Exchange Experts in the VMware, Virtualisation, Windows 2008, Windows 2012 Zones. I look forward to hearing from you. - Andy :- twitter @einsteinagogo
****************************************************************************
2
Comment
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
0 Comments

Featured Post

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

Join & Write a Comment

This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
This tutorial will walk an individual through the process of installing of Data Protection Manager on a server running Windows Server 2012 R2, including the prerequisites. Microsoft .Net 3.5 is required. To install this feature, go to Server Manager…

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month