Hyper-V: Stand-alone Migration
Applies To: Windows Server 2012 R2
This scenario describes how to migrate a single server running the Hyper-V role in Windows Server 2012 to Windows Server 2012 R2.
Migration options
When you migrate a single server, you have the following migration options available:
Export and Import (not covered in this guide)
In-place upgrade
This scenario describes how to use the existing hardware that runs the Windows Server 2012 operating system and to perform an in-place upgrade of the operating system to Windows Server 2012 R2. This scenario does not require any additional hardware; however, during the upgrade process, all of the virtual machines must be turned off or be in a saved state.
Note
Perform an in-place upgrade
Use the following steps to perform an in-place upgrade.
Note
If Hyper-V Replica has been enabled on any of the virtual machines, we recommend that you upgrade the Replica server first. During the upgrade of the Replica server, the primary server continues to send updates to the Replica server, and you might see warning messages about the health of the replication. After the Replica server has successfully upgraded, the replication should continue normally.
Log on to the server by using a user account with local Administrator rights.
Insert media for Windows Server 2012 R2 and run Setup.exe if the installation program did not start automatically.
Review the upgrade report and fix any blocking warning messages.
After the host has restarted, confirm that the server successfully upgraded.
Install the latest updates.
Start each of the virtual machines that were running before the upgrade.
Confirm that each virtual machine operates as expected.
Upgrade the integration services for each virtual machine. A restart might be required to complete the integration services update.
Cross-version live migration
The upgrade to a new version of the Windows Server operating system no longer requires downtime of the virtual machines. In Windows Server 2012 R2, live migration has been updated to support the migration of Hyper-V virtual machines in Windows Server 2012 to Hyper-V in Windows Server 2012 R2. If the virtual hard disk (VHD) files are stored on an SMB 3.0 file share, you must only move the virtual machine, but not the storage.
This scenario requires additional hardware for a destination server. Ensure that the destination server has the capacity to run the virtual machines that you are currently running and has room for future expansion.
Use the following steps to move a virtual machine from Windows Server 2012 to Windows Server 2012 R2.
Prepare the new server hardware
Install Windows Server 2012 R2 on the new server hardware.
Install the Hyper-V role on the server.
Configure the following Hyper-V settings, for example:
The default location for virtual hard disks and virtual machine configuration files.
NUMA settings.
Live migration settings. Even if live migration was not previously configured, you must enable and configure live migration on both servers.
Replication settings if Hyper-V Replica is used. If certificate-based authentication is configured, an appropriate certificate must be installed on the new server.
Virtual switches.
Hyper-V Administrators local group membership.
Install the latest updates.
Move a virtual machine from Hyper-V in Windows Server 2012 to Windows Server 2012 R2
In this section, you move a virtual machine from Hyper-V in Windows Server 2012 to Hyper-V in Windows Server 2012 R2.
Perform this procedure on the source server running Hyper-V in Windows Server 2012.
To move the virtual machine to Hyper-V in Windows Server 2012 R2
On the source server running Hyper-V in Windows Server 2012, open the Hyper-V Manager console, and then select the virtual machine that you want to move.
From the Actions pane, click Move. This action opens the Move Wizard.
On the Choose Move Type page, select Move the virtual machine.
On the Specify Destination Computer, specify the name or server that is running Windows Server 2012 R2.
On the Choose Move Options page, select Move only the virtual machine.
You can also use the Windows PowerShell cmdlet Move-VM. The following example shows a virtual machine
test VM
that is moved to a remote computerNewServer
where the virtual machine is stored on an SMB share.PS C:\> Move-VM –Name "Test VM" -DestinationHost NewServer
Modify the Hyper-V Replica settings
Note
Perform the following procedure on the primary server after moving a virtual machine on the Replica server.
[Optional] To modify Hyper-V Replica settings
On the primary server, open the Hyper-V Manager console, and then select the virtual machine whose Replica virtual machine was just moved.
Right-click the virtual machine to select Settings.
Select Replication and update the value for Replica server with the name of the destination Replica server.
Confirm that replication has successfully started.
You can also use the Set-VMReplication cmdlet to update the name of the Replica server.
Verify that the virtual machine runs correctly
This procedure describes how to confirm that the virtual machine that was moved runs correctly on the destination server running Hyper-V in Windows Server 2012 R2.
Note
Skip this step when you move a virtual machine on a Replica server. Replica virtual machines are in an off state until the virtual machine is failed over by the administrator.
To verify that virtual machine runs correctly
Open the Hyper-V Manager console on the destination server.
Verify that the virtual machine is running. If the virtual machine is not running, attempt to start it. If the virtual machine does not start, check the event log to see why it failed to start.
[Optional] - Run some basic operations that change the state of the virtual machine.
Run the necessary application-specific tests to ensure that the application on the virtual machine can provide the same service levels as it provided before the virtual machine was migrated. Although the virtual machine was moved while it was running the services that the virtual machine provides, the services should not have been interrupted.
Verify that you can connect to the virtual machine by using Remote Desktop or Virtual Machine Connection.
Upgrade the integration services on the virtual machine. Because the virtual machine was never shut down during the migration, you can update the integration services silently without a restart. The update occurs the next time that the virtual machine is restarted during its scheduled maintenance period.
Modify the settings of the virtual machine and specify the following media to be used for the CD/DVD drive,
%Systemroot%\System32\Vmguest.iso
.Run the following command from an elevated command prompt in the virtual machine:
For 64-bit Windows Server operating systems,
drive:\Support\Amd64\Setup.exe /quiet /norestart
For 32-bit Windows Server operating systems,
drive:\Support\X86\Setup.exe /quiet /norestart
See also
Configure Live Migration and Migrating Virtual Machines without Failover Clustering