Set up protection for live migration
Updated: May 13, 2016
Applies To: System Center 2012 SP1 - Data Protection Manager, System Center 2012 R2 Data Protection Manager
DPM can protect Hyper-V virtual machines V during live migration in the following scenarios:
Live migration within a cluster—When a virtual machine is migrated within a cluster, DPM detects the migration and backs up the virtual machine from the new cluster node without user intervention. Because there are no changes to storage, DPM continues with express full backups. If two DPM servers protect a cluster, a virtual machine that is protected by the first DPM server continues to be protected by the same DPM server after the migration, no matter where it is located.
Live migration outside a single cluster—When a virtual machine is migrated outside a single cluster, you can perform live migration between two standalone servers, between a standalone server and a cluster node, or between two nodes from different clusters. In this scenario, DPM detects the migration and can perform backups without user intervention.
Support—DPM protection for live migration is only available on servers that are running Windows Server 2012.
Live migration outside a cluster—If you want to do live migration outside a single cluster the following is required:
The virtual machines are managed in a VMM cloud on a VMM server running at least running System Center 2012 SP1.
DPM must be connected VMM server that contains the cloud.
All servers running Hyper-V are connected to all DPM servers.
With these prerequisites in place, DPM communicates with VMM to locate where the virtual machine currently runs, and can then create a backup from the new server that is running Hyper-V. DPM can communicate with the new server that is running Hyper-V because all servers that are running Hyper-V are connected to all DPM servers. If this connection cannot be established, the backup fails with a message that the DPM protection agent is unreachable.
Storage migration—If a live migration transfers storage, DPM performs a full consistency check of the virtual machine, and then continues with express full backups. If there is no storage migration involved, for example if the source and target locations both use the same server message block (SMB) 3.0 file server, then DPM continues to perform express full backups without the consistency check.
When live migration of storage occurs, Hyper-V reorganizes the virtual hard disk (VHD) or VHDX and therefore there is a one-time spike in the size of DPM backup data.
Tape backup—Live migration protection does not support backup to tape.
Consistency check—DPM performs a one-time consistency check for all live migrations that include storage migration.
Settings—Turn on auto-mount on the virtual machine host to enable virtual protection.
Disable the feature TCP Chimney Offload.
Active Directory—All DPM servers, VMM servers, and servers that are running Hyper-V should be located in the same domain.
Port—If you want to change the default port of 6070 used by DPM to host DPM-VMM Helper Service, in the registry navigate to
HKLM\Software\Microsoft\Microsoft Data Protection Manager\Configuration. Create a 32-bit DWORD value:
DpmVmmHelperServicePort, and write the updated port number as part of the registry key.
Open <Install directory>\Microsoft System Center 2012\DPM\DPM\VmmHelperService\VmmHelperServiceHost.exe.config and change the port number from 6070 to the new port. For example: <add baseAddress="net.tcp://localhost:6080/VmmHelperService/" />
Restart the DPM-VMM Helper service and restart the DPM service.
Deploy DPM—Verify that DPM is installed and deployed correctly. If you haven’t see:
Set up storage—Check that you have storage set up. Read more about your options in:
Learn about short-term storage to disk and storage pools in Plan for disk backups
For storage to Azure with Azure Backup, see Plan for Azure backups
For long-term storage to tape, Plan for tape-based backups
Use the following capacity sizing for virtual machine protection.
Average virtual machine size 100 gigabytes (GB) Number of virtual machines per DPM server 800 Total size of 800 virtual machines 80 terabytes (TB) Required space for backup storage 80 terabytes (TB)
As an example, if your fully scaled Hyper-V cluster contains 1600 virtual machines, you’ll need two DPM servers, and double the provisioning that is summarized in the table. The total storage requirement for 1600 virtual machines is greater than 160 TB. Read about optimizing space in Optimize virtual machine protection.
Set up the DPM protection agent—The agent needs to be installed on the Hyper-V server, or on each server in the Hyper-V cluster. On the remote SMB file server, if SMB is deployed in a cluster, install the DPM protection agent on all SMB file server cluster nodes.Read Plan for protection agent deployment, and then Set up the protection agent.
Install the VMM console—Install the VMM console as the VMM client component on all DPM servers to enable the DPM server to communicate with and track the VMM server. Note the following:
The DPMMachineName$ account should be a read-only administrator account on the VMM management server.
Ensure that the VMM console is of the same version as the VMM management server that is used in the deployment.
Connect servers—Run the the Set-DPMGlobalProperty PowerShell command to connect all the servers that are running Hyper-V to all the DPM servers. The cmdlet accepts multiple DPM server names. For more information see Set-DPMGlobalProperty.
Set-DPMGlobalProperty -dpmservername <dpmservername> -knownvmmservers <vmmservername>
Set up a protection group—In the Select Group Members page of the Create New Protection Group wizard you can select the Hyper-V host servers on which the virtual machines you want to back up are located. Note that automatic consistency check should be enabled at the protection group level for protection under virtual machine mobility scenarios.
Enable the DPM VMM communication first. All virtual machines on servers that are running Hyper-V should be discovered before you configure the protection groups. Otherwise, live migration does not work as expected, and the user has to stop to protect data with Retain Data, and then reconfigure protection for the same computer.
Read about protection groups in:
Then follow the instructions in Create and manage protection groups.
Verify settings—After settings are configured, when a virtual machine migrates from one cluster to another, all backups continue as expected. You can verify live migration is enabled as expected as follows:
Check the DPM-VMM Helper Service is running. If it isn’t start it.
Open Microsoft SQL Server Management Studio and connect to the instance that hosts the DPM database (DPMDB). On DPMDB run the following query:
SELECT TOP 1000 [PropertyName] ,[PropertyValue] FROM[DPMDB].[dbo].[tbl_DLS_GlobalSetting]
This query contains a property, called
KnownVMMServer. This value should be the same as the value that you provided with the
Note that if you upgrade the VMM management server, you must also upgrade the VMM console on the DPM server to maintain protection.
Run the following query to validate the
VMMIdentifierparameter in the
PhysicalPathXMLfor a particular virtual machine. Replace Replace
VMNamewith the name of the virtual machine.
select cast(PhysicalPath as XML) from tbl_IM_ProtectedObject where DataSourceId in (select datasourceid from tbl_IM_DataSource where DataSourceName like '%<VMName>%')
Open the .xml file that this query returns and validate that the
VMMIdentifierfield has a value.
Run manual migration—After you’ve completed the steps migration is enabled after the DPM Summary Manager job runs. By default, this job starts at midnight and runs every morning. If you want to run a manual migration in the meantime to check everything is working as expected, do the following:
Open SQL Server Management Studio and connect to the instance that hosts DPMDB.
Run the following query:
select * from tbl_SCH_ScheduleDefinition where JobDefinitionID=’9B30D213-B836-4B9E-97C2-DB03C3EB39D7’. Note that the query returns the ScheduleID.
In SQL Server Management Studio, expand SQL Server Agent, and then expand Jobs. Right-click the ScheduleID that you noted, and select Start Job at Step.
Note that backup performance is affected when the job runs. The size and scale of your deployment determines how much time the job takes to finish.
Recover data—After settings are configured, when a virtual machine migrates from one cluster to another, all backups continue as expected. You can recover data as required. If you need to recover backed up data see Recover backed up data [DPM2012_Web]. Note the following behavior for restoring virtual machines.
Virtual machine recovery Details Recover to original location The original VHD is deleted. DPM will recover the VHD and other configuration files on the original location using Hyper-V VSS writer. At the end of the recovery process, virtual machines will still be highly available.
The resource group must be present for recover. If it isn’t available recover to an alternate location and then make the virtual machine highly available.
Recover to alternate location DPM supports alternate location recovery (ALR), which provides a seamless recovery of a protected Hyper-V virtual machine to a different Hyper-V host, independent of processor architecture. Hyper-V virtual machines that are recovered to a cluster node will not be highly available. Item-level recovery (ILR) DPM supports item-level recovery (ILR), which allows you to do item-level recovery of files, folders, volumes, and virtual hard disks (VHDs) from a host-level backup of Hyper-V virtual machines to a network share or a volume on a DPM protected server. The DPM protection agent doesn’t have to be installed inside the guest to perform item-level recovery.