Migrating Virtual Machines
From time to time, you will want to move data from one Hyper-V server to another, perhaps because your organization has purchased faster hardware or perhaps because you simply want to consolidate your VM infrastructure. Tools also exist to virtualize your existing traditionally deployed infrastructure, allowing you to migrate a server that runs on a traditional physical chassis so that it now runs as a VM.
Importing and Exporting Virtual Machines
You can import or export only VMs that are in a powered off state. You can export a VM from a specific snapshot by right-clicking on the snapshot in the Hyper-V Manager console and then clicking on Export. This displays the Export Virtual Machine dialog shown.
You might encounter problems when exporting and migrating between a Hyper-V host with a processor made by one vendor and a Hyper-V host with a processor made by a different vendor.
When you import a VM, you can choose to make a copy of the VM, allowing you to place it in a different location, or add the VM to the current Hyper-V server, allowing it to remain at its current location. If you want to import the VM again at a later stage or on another server, you need to select the Duplicate All Files so the Same Virtual Machine Can Be Imported Again option. If you don't do this, you won't be able to import the VM using the Hyper-V Manager console.
When you import a VM, you need to choose whether or not to use the existing virtual machine ID or have Hyper-V generate a new virtual machine ID. You need to create a new virtual machine ID if you are importing the VM back onto the same server that hosts the original. If you attempt to import a VM back onto the same server that hosts the original without changing the virtual machine ID, the import operation fails.
If you are migrating from a host running a newer processor to an older processor, you need to enable the processor compatibility option. You can do this under the Processor settings, by enabling the Migrate to a Physical Computer with a Different Processor Version option.
You can use Virtual Machine Manager 2012 to directly transfer VMs from one Hyper-V server to another one.
Using Physical to Virtual Migration
Physical to virtual (P2V) migration is the process of transferring a traditionally deployed server to a virtual machine while retaining all the properties of the original server except the platform on which it is deployed. For example, you might have a server deployed on traditional hardware running Microsoft Exchange Server 2010 that you want to virtualize. By performing a physical to virtual migration, you can create a virtualized copy of the server running Exchange Server 2010. When you have completed the migration, you can shut down the traditionally deployed server as its name, configuration, and functionality will now all be present in the virtualized copy.
To perform a physical to virtual migration, you need to use a tool such as System Center Virtual Machine Manager 2012. Virtual Machine Manager 2012 allows you to perform a conversion while the original server is online without disruption to the functionality of that original server. You can perform an online physical to virtual migration using Virtual Machine Manager 2012 of physical servers running the following OSes: Windows Server 2003 SP1 or later, Windows Server 2003 R2, Windows Server 2008, and Windows Server 2008 R2. An online P2V migration is wizard-driven, and you can perform this migration from the Virtual Machine Manager 2012 console.
You can perform an offline P2V migration by booting the source server off a specially configured boot device. It is possible to prepare a PXE boot image and perform an offline migration this way. Offline migrations are faster than online migrations.
Using Live Migration
Live migration moves a VM from one node in a failover cluster to another node without data loss or service interruption. You can use live migration only to move VMs between cluster nodes; it isn't possible to accomplish this service continuity when moving between stand-alone Hyper-V hosts. Windows Server 2008 R2 supports Hyper-V live migration on up to 16-node failover clusters.
Live migration is supported under the following conditions:
All nodes in the Hyper-V cluster are located on the same TCP/IP subnet.
All nodes in the Hyper-V cluster have access to shared storage.
All nodes in the Hyper-V cluster use the same processor model from the same vendor.
You can initiate live migration either through the Failover Cluster Manager console, through a WMI or PowerShell script, or through System Center Virtual Machine Manager 2012.
Remember that the different processor version option allows migration to earlier versions of th e same vendor's processor, not to Hyper-V hosts running processors from other vendors.