What is Hyper-V Live Migration
Maintaining business continuity is a critical concern especially for enterprises, and any VM downtime may bring considerable costs. So today, I will introduce a feature that can effectively reduce VM downtime, Hyper-V Live Migrations.
Hyper-V Live Migration is built in Windows Server, and allows you to move running VMs from one Hyper-V host to another without downtime.
Previously, performing Hyper-V Live Migrations required related technologies such as Failover Clustering and System Center Virtual Machine Manager. However, starting with Windows Server 2012, Hyper-V Live Migrations now can work without Failover Clustering as well.
How does Hyper-V Live Migration work
To summarize, Hyper-V Live Migrations minimizes the VM transfer time by pre-copying the VM memory to the destination server.
When initiating a Hyper-V Live Migration, the source server will first create a connection with the destination server, and transfer configuration files to set up a skeleton Hyper-V VM replica.
Then the memory assigned to the migrating VM will be copied to the destination server. During this process, if you changed the memory page on the running VM, they will be tracked and marked as modified.
The migration continues, now it’s time for copying the remaining modified memory pages. The more pages modified, the longer the migration will take, until there’s nothing to copy. In addition, the network bandwidth available between the source and destination servers is also critical to the speed of the Live Migration.
Now the last thing that need to be copied to the destination server is the source VM’s state. Powering off the VM and the Hyper-V Live Migration completes. Restoring the VM on the destination server, if it runs successfully, then all traces of the modified pages will be removed.
How to enable Live Migrations on Hyper-V hosts
1. Launch Hyper-V Manager, right-click on the name of the host and select Hyper-V Settings…
2. Navigate to Live Migrations from the left inventory, and then check the Enable incoming and outgoing live migrations option.
3. Specify Simultaneous live migrations, and select Use any available network for live migration or Use these IP addressed for live migration.
4. Expand Live Migrations and select Advanced Features from the left inventory, select what protocol you want to use to authenticate live migrations.
Use Failover Cluster Manager to perform Hyper-V Live Migration
1. Launch Failover Cluster Manager from Server Manager, navigate to Roles from the left inventory.
2. Right-click on the name of the source VM and select Move > Live Migration > Select Node…
3. Select the destination node for the live migration in the pop-up window, click OK to confirm. You can check the progress in Information.
Perform Hyper-V Live Migrations without Failover Clustering
In this section, I will introduce 2 ways to move Hyper-V VM to another server without using Failover Clustering.
How to use Hyper-V Manager to live migrate a VM
1. Launch Hyper-V Manager, and select the source host from the left inventory.
2. Right-click on the name of the source VM and select Move to open the Move Wizard.
3. Select Move the virtual machine option and click Next to continue.
4. Specify the name of the destination node.
5. Review the settings on Summary page, and then click Finish to start live migration.
How to Move a running VM via PowerShell
Using the Move-VM cmdlet you can also move a running VM to a destination server, and move the virtual hard disks and other files with it.
Here is an example of moving a running VM called MyVM to a destination server called Host1, and moving the virtual hard disks and other files such checkpoints and Smart Paging files, to the D:\MyVM directory on the destination server.
PS C:\> Move-VM MyVM Host1 -IncludeStorage -DestinationStoragePath D:\MyVM
An easier & affordable way to protect your Hyper-V VM in time
Performing Hyper-V Live Migrations can assure unexpectable VM failover and minimizes downtime. However, it is not economical as it represents at least 2 servers and storage costs, especially if your downtime costs are much lower than this.
Therefore, VM backups are still cannot be replaced by live migrations. Here I recommend you AOMEI Cyber Backup to help you with Hyper-V VM backups for the following benefits:
✦ Multiple VMs Backup: with 3 easy steps you can create a complete automatic backup task of multiple, or even all VMs on the host.
✦ Auto Execution: capable of backing up multiple VMs automatically, and cleaning old backup files that exceed the specified retention period.
✦ Role Assignment: allows one administrator to create sub-accounts with limited privileges, effectively avoid errors caused by others’ mis-operations.
✦ Offsite Restore: capable of restoring backups to new VMs on original or another datastore, host within LAN.
✦ Affordable Pricing: reasonable charges only base on the number of bound devices, regardless of how many VMs are on the host.
You can click the following button to start a free trial.
3 easy steps to create automatic backup tasks of multiple VMs
1. Bind Devices: Access to AOMEI Cyber Backup web client, navigate to Source Device > Hyper-V > + Add Hyper-V to add a host. And then click … > Bind Device.
2. Create Backup Task: Navigate to Backup Task > + Create New Task, and then set Task Name, Backup Type, Device, Target, Schedule, and Cleanup.
- Device: using AOMEI Cyber Backup you can backup multiple, or even all VMs on the host at once.
- Target: You can select to back up to a local path, or to a network path. Used paths will be saved in Favorite Storage for handy selection.
- Schedule: You can choose to perform full or incremental backup, and automate execution daily, weekly or monthly according to the frequency you specified.
- Cleanup: You can specify a retention period, and the old backup files that exceed the period will be automatically deleted.
3. Start Backup: You can select Add the schedule and start backup now, or Add the schedule only.
Created backup tasks will be listed and monitored separately, for progress checking and schedule changing.
Hyper-V Live Migrations minimizes downtime by pre-copying VM memory to another server. In this article, I introduced what is Hyper-V Live Migrations feature, with detailed steps of 3 ways to move Hyper-V VM to another server.
However, it is still not a good replacement for VM backups for its server and storage costs. Maybe VM backups suit you more if your downtime costs are much lower than this.