Compartilhar via


Hyper-V: Migration Options

 

Applies To: Windows Server 2012 R2

When you migrate virtual machines from the Windows Server 2012 operating system to the Windows Server 2012 R2 operating system, you have various options on how to migrate your virtual machines. You now can select the migration options that meet the requirements of your environment.

Hyper-V migration options

Depending on your requirements and service level agreements that must be maintained, you can use one migration option or a combination of migration options. For example, if you have virtual machines that either must be running all the time or that only have a short maintenance period for you to shut them down, you might select to use cross-version live migration to move the virtual machines from Windows Server 2012 to Windows Server 2012 R2. For other virtual machines that are not as critical, have a long maintenance period, or might take too long to move by using live migration, you can use the Copy Cluster Roles Wizard or Export and Import, which depends on your environment.

The following table shows the benefits and disadvantages of the various migration options.

Migration option Benefits Disadvantages
In-place upgrade - No new hardware required. - Virtual machines must be shut off during the upgrade.
Cross-version live migration - Virtual machines continue running during migration.
- If the virtual hard disk is stored on a Scale-out File Server share that is accessible from both servers, the virtual hard disks do not have to be copied.
- Moves virtual machines from one Hyper-V cluster to another cluster without any downtime.
- Migrates individual virtual machines that are part of the Hyper-V cluster.
- Requires additional hardware or extra capacity in the existing cluster to create the destination cluster.
- The amount of time it takes to migrate a virtual machine depends on various factors, for example, the size of memory that is configured for the virtual machine and the network configuration. If the virtual hard disks are not stored on a Scale-out File Server, additional time is required to move the virtual hard disk.
- The virtual machine must be removed from the existing cluster before it is moved to the new cluster. After the virtual machine has successfully moved to new cluster node, high availability is added to the virtual machine. During the move process, the virtual machine is not protected by the cluster services.
Copy Cluster Roles Wizard - Easily migrates a Hyper-V cluster from Windows Server 2012 to Windows Server 2012 R2.
- Tests the Copy Cluster Roles process without affecting production.
- Reverses the process if you encounter any issues.
- Copies roles on test clusters to production clusters.
- All virtual machines on the same Shared Clustered Volume are migrated at the same time.
- Virtual machines must be shut down for a short period of time.
- The Copy Cluster Wizard does not copy the Hyper-V replication settings when it copies a virtual machine to a new failover cluster. Hyper-V replication must be re-enabled on the virtual machine after it is copied. For the Initial Replication Method, select Use an existing virtual machine on the Replica server as the initial copy.
- Requires additional hardware.
Export and Import - Migrates one virtual machine at a time.
- Controls the method of copying the virtual machine to the new server.
- The virtual machine is shut down during the Export / Import process.
- Requires additional hardware.
- The Import of a virtual machine removes any Hyper-V Replica configuration settings for a virtual machine. Hyper-V replication must be re-enabled on the virtual machine after it is imported. For the Initial Replication Method, select Use an existing virtual machine on the Replica server as the initial copy.

The following table shows the available options to use in different deployments of Hyper-V.

Scenario / Migration option In-place upgrade Export / Import Cross-version live migration Copy Cluster Roles Wizard
Standalone host Yes Yes Yes No
Hyper-V Cluster with Cluster Shared Volumes (CSV) No Yes Yes, the virtual machine must be removed from the cluster first, and the virtual hard disks must be copied as part of the live migration. Yes
Hyper-V Cluster with a separate Scale-out File Server for storage No Yes Yes, the virtual machine must be removed from the cluster first. Yes

Important

When Hyper-V Replica is enabled, we recommend that you migrate the virtual machines on the Replica site first, and then migrate the primary site.

Cross-version live migration

The upgrade to a new version of Windows Server no longer requires downtime of the virtual machines. In Windows Server 2012 R2, Hyper-V live migration has been updated to support the migration of virtual machines in Windows Server 2012 to Windows Server 2012 R2. If the virtual hard disk files are stored on an SMB 3.0 share that is accessible from both the source and destination server, you only must move the virtual machine configuration and memory files, but not the virtual hard disk files. If the virtual hard disk files are not stored on an SMB 3.0 share, or if the share is not accessible to the destination server, you can use the Shared Nothing Live Migration to migrate the virtual hard disk files, virtual machine configuration files, and the running virtual machine with no downtime.

Hyper-V Replica

Hyper-V Replica was introduced in Windows Server 2012 and provides asynchronous replication of Hyper-V virtual machines between two hosting servers. It is simple to configure and does not require either shared storage or any particular storage hardware. Any server workload that can be virtualized in Hyper-V can be replicated. Replication works over any ordinary IP-based network, and the replicated data can be encrypted during transmission. Hyper-V Replica works with standalone servers, failover clusters, or a mixture of both. The servers can be physically co-located or widely separated geographically. The physical servers do not have to be in the same domain or even be joined to any domain at all.

Consider the following factors for the move from Windows Server 2012 to Windows Server 2012 R2 when you use Hyper-V Replica:

  • You must upgrade the Replica server first. A Windows Server 2012 R2 Replica server can accept replication from a primary server that runs Windows Server 2012. However, a Windows Server 2012 Replica server cannot accept replication from a primary server that runs Windows Server 2012 R2.

  • When you upgrade the Replica server, consider the following factors:

    • When you perform an in-place upgrade on the Replica server, the post-upgrade of the Replica server to Windows Server 2012 R2 replication continues from the primary server that runs Windows Server 2012 at the default replication frequency of 5 minutes.

    • When you move the virtual machines to a new server that runs Windows Server 2012 R2, you must update the virtual machine replication settings on the primary server with the name of the new Replica server or Hyper-V Replica Broker. Until the Replica server name is updated, replication does not resume.

    • You can start to use new Hyper-V Replica features, such as extended replication from the Replica server.

    • You can add new virtual machines to the primary server that runs Windows Server 2012 and start replication to a Replica server that runs Windows Server 2012 R2.

    • In case of emergency, you can fail over your virtual machines from the primary server to the Replica server. You cannot start reverse replication because replication is not supported from Windows Server 2012 R2 to Windows Server 2012.

      Note

      At this point, the virtual machine is no longer protected by Hyper-V Replica. You can configure extended replication by using another server running Hyper-V in Windows Server 2012 R2. After the primary server has been upgraded to Windows Server 2012 R2, you can reverse replication back to the primary server. When you reverse replication, you can select to use an existing virtual machine to limit the amount of replication that must be transmitted over the network.

    • Migration cancels a test failover that currently runs for a Replica virtual machine and deletes the test virtual machine.

  • When you upgrade the primary server, consider the following factors:

    • The Replica server has already been upgraded to Windows Server 2012 R2. If the Replica server has not been upgraded to Windows Server 2012 R2, replication fails until the Replica server is upgraded to Windows Server 2012 R2.

    • Replication continues at the default frequency of 5 minutes, which can be modified if it is required.

    • When you use certificate-based authentication for Hyper-V Replica, after you move the primary virtual machine to a new server, you must update the certificate thumbprint for the virtual machine.

      You can update the certificate thumbprint in the Hyper-V Manager console by editing the Replication settings of the virtual machine, or you can use the following Windows PowerShell cmdlet, Set-VMReplication.

      Set-VMReplication –VMName <virtual machine name. –CertificateThumbprint <thumbprint>  
      

See also

Hyper-V Replica

Live migration

Deploy Hyper-V over SMB

Failover Clustering

Migrating Clustered Services and Applications to Windows Server 2012