Veeam Backup & Replication: Migrate VM from Hyper-V 2008 R2 to 2012 R2

One of the most important feature of Hyper-V, present in Windows Server 2012, is the Replica. This feature allows to create a copy of VM from host to another faster and easier. Over the classic Disaster Recovery scenario, Replica can be used to migrate your VMs to a new infrastructure or to different domain.
But what happen if the old server is based on Windows Server 2008 R2? How we can move our VMs from Hyper-V 2008 R2 to new host based on Hyper-V 2012 R2? If we don’t want pay, we can use the classic procedure export/import, but this operation may require few minutes for each VM, depends by the speed of disks where the data are exported.
The second way is use Veeam Backup & Replication, the software that allows you to create a Replica Job of VMs also if the OS versions are different between source and destination.
The first step is deploy the “agent” in each hosts, after that will be possible create the new job for the Replication, as showed in figure 1. Keep in mind that Veeam is agentless so the agent is really a driver to enable Transportation and Change Blocking Tracking or CBT.


Figure 1 – New Replication Job
Insert a name, figure 2, and select the VM that you want copy from the old server; in the screen Destination, figure 3, select the machine, and the disk, where the VM will be copied.
Figure 2 – Replication Job Name

Figure 3 – Destination and Path
Choose the suffix and the restore point, this value must not be too high because the final goal of this replica is the migration, not Disaster Recovery. After this step, select if enable the VSS Mode, as showed in figure 4.

Figure 4 – Enabling VSS
Set the scheduling and start the replica. The VM will be available in the new host after few minutes (depends by the VM’s dimension and host’s performance). That’s it! You can turn off the VMs into the old host, disable the Replica Job and turn on the VMs in the new host.
The Perfect Replica
It’s clear that the classic replica is not enough, because this activity cannot made during the Business hour, so it’s very important plan the right strategy. My suggestion is to implement two replica task, one in the mid-morning and the other one during the night: this gives you the possibility to reduce the replica time. Remember that this kind of operation must be made out-of business hour and, maybe, during the weekend, when you should have more time to resolve unexpected issues.
Replica vs Backup/Copy
Why replica is better than copy or backup, for this activity? Personally just because the replica create a perfect “copy” of VM in the new host and this could be great when you plan to change all the main infrastructure (hosts and SAN). The replica give also the possibility to reduce the operation time because the job must add only the delta blocks, otherwise the backup/copy require the restore time into new host.
Automate the Job
Another great feature in Veeam Backup & Replication are the Windows PowerShell snap-in that allows you to automate different processes without use the UI. This tool is very important in a scenario where there are many jobs or when there are repetitive tasks. Remember that the component must be installed, if is not present do that with the classic setup, as showed in figure 5.

Figure 5 – Install PowerShell Snap-in
With PowerShell we can create a great script to make automatically all the previous operations. It’s possible turn off the VMs, starting the replica job, start the VMs on the new host and disable the replica job….all without use the console or “touch” the hypervisor. Remember that you need PowerShell’s modules for Hyper-V installed in the same server where is Veeam B&R and that you should use the same OS versions for Veeam and the new Hyper-V host (for example Windows Server 2012 for Veeam and Windows Server 2012 R2 for the new host).
Remember also to enable PowerShell into Hyper-V 2008 R2 and to import the module that you can find into CodePlex web site at this link http://pshyperv.codeplex.com. Very important is follow also these requirements:
My script, that you can find from this link, will give you the possibility to execute these tasks:
  • Turn Off VM from Hyper-V 2008 R2
  • Start Replica Job from Veeam B&R
  • Turn On VM from Hyper-V 2012 R2
  • Disable Replica Job
Script is made to make questions to simplify the operations; there are also a cmdlets, disabled by default, to replicate more then one VM from old host to the new one.
Remember that to manage Windows Server 2012 R2 is necessary use Veeam Backup & Replication v7 R2!
This is why I like Veeam Backup & Replication v7: one software with all the most important features! PowerShell snap-in give also the possibility to extend the functionalities. Are you interested to try Veeam Backup & Replication? Download the trial version from http://www.veeam.com/downloads/.
S