Protecting Hyper-V Machines

Applies To: System Center Data Protection Manager 2010

Procedure for Protecting a Hyper-V Virtual Machine

  1. Install the protection agent on the host computer.

  2. Protect the virtual machine by using the Create New Protection Group Wizard.

Things to Remember

  • You must turn on auto-mount on the host computer to enable virtual machine protection.

  • You must disable TCP Chimney Offload.

Caching

When you are protecting a large number (over 200 virtual machines) of virtual machines using cluster shared volumes (CSV), it may take a long time (>15 min) to populate the inquiry screen in the Create New Protection Group Wizard. You can avoid this by enabling caching on the primary DPM server. After you enable caching, when you expand the data source on the inquiry screen, DPM will refresh the resource groups under that node, but the virtual machines under each resource group will be populated from the cache. The default time-out for the cache is 48 hours. You can change this by editing the registry.

To enable caching, create a new registry key called CacheInquiryResults at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Data Protection Manager\Configuration. Under this key, create the DWORD InquiryResultsTimeoutInterval.

After you create the registry key, you will see the Clear Cache button on the inquiry page of the Create New Protection Group Wizard. Click this button when you want to force DPM to refresh the list of virtual machines.

Warning

When you click Clear Cache, DPM will refresh the entire cache, and not just the cache of the selected resource group.

Automatically Adding New Virtual Machines for Protection

One of the most common scenarios in a virtualized environment is creation of new virtual machines. While you will have a protection agent deployed on the host machine, you will still need to add the new machines to the protection groups manually. You can automate the process of adding new virtual machines to a protection group by using the following scripts:

Click the script name above to download the script.

Automatically Adding Stand-Alone Virtual Machines

The AddNewStandAloneVM.ps1 script does the following:

  1. Takes the FQDN of the protected server and the name of the protection group as input.

  2. Searches for the protected server and the protection group.

  3. Runs an inquiry on the Hyper-V host and obtains the list of unprotected virtual machines.

  4. Adds this list of virtual machines to the protection group.

  5. Saves the changes to the protection group and exits.

The script takes two parameters:

Parameter Description Example

Server Name

Fully Qualified Domain Name of the Hyper-V host server.

hyperv01.contoso.com

Protection Group

Name of the existing protection group to which we are adding the new virtual machines.

Protection Group 3

Automatically Adding Clustered Virtual Machines

The AddNewClusteredVM.ps1 script does the following:

  1. Takes the FQDN of the protected cluster and the name of the protection group as input.

  2. Searches for the protected cluster and the protection group.

  3. Runs an inquiry on the cluster to get the list of resource groups.

  4. Runs a parallel inquiry for each resource group and obtains the list of unprotected virtual machines under them.

  5. Adds the unprotected virtual machines to the protection group.

  6. Saves the changes to the protection group and exits.

The script takes two parameters:

Parameter Description Example

Server Name

Fully Qualified Domain Name of the Hyper-V host server.

hyperv01.contoso.com

Protection Group

Name of the existing protection group to which we are adding the new virtual machines.

Protection Group 3