Export (0) Print
Expand All

Configure CSV backups

Updated: November 1, 2013

Applies To: System Center 2012 - Data Protection Manager, System Center 2012 R2 Data Protection Manager, System Center 2012 SP1 - Data Protection Manager

This section describes the required steps to back up Hyper-V virtual machines in a cluster that uses Cluster Shared Volumes (CSV) storage:

Before you start

Note the following before you start:

  • A single node shutdown in a CSV cluster causes all virtual machines in the cluster to be marked as inconsistent. This action starts consistency checks for all virtual machines.

  • If BitLocker Drive Encryption is enabled on the CSV cluster, to restart a server that is running Hyper-V, you must run a consistency check for Hyper-V virtual machines.

  • If you are running Hyper-V on Windows Server 2008 R2 and you’re backing up multiple clusters with DPM, you need to ensure that only one backup uses the same CSV at any one time. To do this, follow the instructions in Serialize virtual machine backups.

  • If you’re currently using the integrated software VSS and you want to move to a hardware VSS, follow the instructions in Migrate to a hardware VSS provider.

Step 1: Deploy the DPM protection agent

The DPM protection agent is software that you install on a computer to provide protection with Data Protection Manager (DPM) for the computer. For clusters that use CSV storage, you must deploy the DPM protection agent on each server that is running Hyper-V in the cluster. For more information, see Installing and Configuring Protection Agents

DPM protection agents can be installed as follows:

  • Automatic installation using the DPM console—The DPM console automatically detects a list of available computers in the same domain as the DPM server, so that you can select the computer on which you want to install the DPM protection agent. The use of this method enables you to install DPM protection agents on these computers in a synchronous fashion. This method can be used for computers that belong to the DPM server domain and do not have a firewall that blocks the installation of the DPM protection agent. For more information, see Installing Protection Agents on Computers Outside of a Firewall. Note that you must have domain credentials that have local administrative rights for all computers on which you want to deploy the DPM protection agent.

  • Manual installation—This method can be used to install the DPM protection agent on computers that are not domain members or that do not belong to the same domain as the DPM server. It can also be used if a firewall blocks automatic deployment of the DPM protection agent from the DPM console. For more information, see Installing Protection Agents Manually.

Step 2: Plan DPM storage requirements

It is essential to plan for DPM storage requirements to back up CSV storage. 800 virtual machines can be provisioned to each DPM server.

 

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)

For example, if your fully scaled Hyper-V cluster contains 1600 virtual machines, you must have 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.

To optimize the space that is used for backup storage, you can exclude the page file to prevent that incremental changes in the page file are transferred. For more information, see the following resources:

Step 3: Create protection groups

After the DPM protection agent is deployed to the servers that are running Hyper-V, you create protection groups and add the servers that are running Hyper-V to those groups. This action enables the backup and restore operations of the servers that are running Hyper-V, and the virtual machines that are running on these servers. The configuration settings for a protection group specify backup and recovery settings for all servers that are running Hyper-V in the group. They include:

  • The choice to perform backups by using tape or disk

  • The duration to retain backups on disk

  • The recovery point settings to use

  • The storage pool settings to assign to the protection group

  • The choice to collocate data in the storage pool

  • The choice to automatically increase the size of the volumes

  • The choice to perform initial replication of virtual machines that are located on servers that are running Hyper-V in the group over the network or manually offline

  • The choice of how consistency checks should be performed

Depending on the number of virtual machines that you want to protect and the backup policies for the different virtual machines, the user should create virtual machines by using the New Protection Wizard from the DPM console and keep the virtual machines that have same backup policy in the same group. The user should create smaller groups of 50-100 virtual machines per protection group, but this is not a restriction. Use collocation while you create the protection groups to optimize the replica volume and to avoid reaching the maximum number of volumes that are supported in a Windows Server.

For more information, see Creating Protection Groups.

Serialize virtual machine backups

If you’re using software VSS with Hyper-V on Windows Server 2008 R2, do the following

If you are protecting multiple Hyper-V clusters in Windows Server 2008 R2 with DPM, you can use the DPM merging and serialization tool to remove many of the manual steps associated with the scripts in this section. Download the tool from System Center Data Protection Manager CSV Serialization Tool on the Microsoft Download Center.

Serialize virtual machine backups per node

To serialize virtual machine backups per cluster node, on the DPM server navigate to HKLM\Software\Microsoft\Microsoft Data Protection Manager\2.0\Configuration\MaxAllowedParallelBackups and create a registry key with value: “Microsoft Hyper-V”, Data:1, and Type:DWORD.

This registry key setting ensures that only one backup job runs at a time on a server that is running Hyper-V.

Serialize virtual machine backups per CSV LUN

This form of serialization limits the number of virtual machine backups that occur on a single Cluster Shared Volumes (CSV) logical unit number (LUN). The serialization is performed as follows:

  1. Create the DataSourceGroups.xml file—This file provides DPM with information about the CSV virtual machine deployment configuration and distribution on the various CSV LUN for serialization of backups per CSV LUN.

  2. Generate the DataSourceGroups.xml file on a CSV cluster.

  3. Merge the DataSourceGroups.xml file from all CSV clusters—If you have multiple clusters, merge all the DataSourceGroups.xml files into a single file on the DPM server. Place the DataSourceGroups.xml file on the DPM server. You can skip this step and copy the file directly to %PROGRAMFILES%\Microsoft DPM\DPM\Config if the DPM server protects only one cluster.

  4. If a protection group has already been created for the virtual machines, perform the steps in the Modify Protection Group Wizard. If a protection group has not been created, create a new protection group, and the job serialization that is described in the previous section takes effect.

Create the DataSourceGroups.xml file

  1. Generate the DataSourceGroups.xml file by running the DSConfig.ps1 script on each node in a cluster that contains CSV. Repeat this step for each cluster that is protected by a DPM server.

Note the following:

  • The DataSourceGroups.xml file must be updated only when virtual machines are added, deleted, or modified in the cluster and when protection is configured for them.

  • Regenerate the DataSourceGroups.xml file from the CSV cluster and update the DataSourceGroups.xml file by replacing the existing groups for that cluster with the new groups.

DSConfig.ps1

The following DSConfig.ps1 script creates the DataSourceGroups.xml file by listing all the virtual machines that run on CSV in groups. Each group has the list of all virtual machines that are hosted on one CSV LUN. DPM permits only one backup from one such group at a time.

# DSConfig.ps1

$infoText = "This script will generate the DatasourceGroups.xml file in the current path. After this file is created, merge it with the same file name under %programfiles%\Microsoft DPM\DPM\Config directory on the DPM server. Read the documentation for more details."
echo $infoText

$header = "<?xml version=`"1.0`" encoding=`"utf-16`"?> `n <DatasourceGroup xmlns:xsi=`"http://www.w3.org/2001/XMLSchema-instance`" xmlns:xsd=`"http://www.w3.org/2001/XMLSchema`" xmlns=`"http://schemas.microsoft.com/2003/dls/GroupDatasourceByDisk.xsd`">"
$footer = "</DatasourceGroup>"

import-module -name FailoverClusters

$dir = [guid]::NewGuid()
md $dir

$cluster = get-Cluster
$FQDN = $cluster.Name + "." + $cluster.Domain
$res = get-clusterresource | where-object { $_.ResourceType.Name -eq "Virtual Machine Configuration"}
foreach ($r in $res)
{
$VmObj = Get-ClusterParameter -inputobject $r | where {$_.Name -eq "VmStoreRootPath"} # Identifies the CSV volume on which the VM is hosted.
$VmName = Get-ClusterParameter -inputobject $r | where {$_.Name -eq "VmId"}
$vol = $vmobj.Value.Split("\")[2] # $vol will return to us the Volume<number> of the CSV on which the VM resides.
$line = "<Datasource DatasourceName=`"" + $VmName.Value +"`"" + " ProtectedServerName=`"" + $r.OwnerGroup.Name + "."+ $FQDN +"`"" + " WriterId=`"66841cd4-6ded-4f4b-8f17-fd23f8ddc3de`" />"
echo $line >> $dir\$vol # File VolumeX will contain entries for all VMs hosted on CSV VolumeX
}

echo $header > DataSourceGroups.xml
$filelist = dir $dir\Volume*
$GroupEndString = "</Group>"
foreach ($file in $filelist)
{
   $GroupBeginString = "<Group GroupName=`"" + $file.Name + "-" + $FQDN + "`">" # Group name is kept VolumeX itself
   echo $GroupBeginString >> DataSourceGroups.xml
   type $file >> DataSourceGroups.xml # Consolidating groups pertaining to all the volumes. 
   echo $GroupEndString >> DataSourceGroups.xml
}

Remove-Item -Force -Recurse $dir

echo $footer >> DataSourceGroups.xml

Generate the DataSourceGroups.xml file on a CSV cluster

  1. Copy the DSConfig.ps1 file to any one node of a CSV cluster.

  2. Run this script in a Windows PowerShell session with elevated privileges and locate the DataSourceGroups.xml file that is generated in the same folder C:\MyFolder\>DSConfig.ps1

  3. This script generates the DataSourceGroups.xml file in the current path. After this file is created, copy it to the %programfiles%\Microsoft DPM\DPM\Config directory on the DPM server.

    TipTip
    If you upgraded from DPM 2010, copy the file to the %PROGRAMFILES%\Microsoft DPM\DPM\Config folder. If you install DPM as a new installation, copy the file to %PROGRAMFILES%\System Center 2012\DPM\DPM\Config.

  4. You can verify the groupings by opening the XML file that is generated. The following code shows the expected format:

    <?xml version="1.0" encoding="utf-16"?>
    <DatasourceGroup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/2003/dls/GroupDatasourceByDisk.xsd">
    <Group GroupName="Group1">
    <Datasource DatasourceName="EA24071A-7B7B-42CF-AB1D-BBAE49F50632" ProtectedServerName="SCVMM VM-Vol7-03 Resources.CSVSCALE.SCALEDPM01.LAB" WriterId="66841cd4-6ded-4f4b-8f17-fd23f8ddc3de" />
    </Group>
    </DatasourceGroup>
    
    

Merge the DataSourceGroups.xml files from all CSV clusters

noteNote
You can skip this step if the DPM server protects only one CSV cluster. The generated DataSourceGroups.xml file can be used directly on the DPM server.

  1. Copy any one of the DataSourceGroups.xml files that was generated to the folder %Programfiles%\Microsoft DPM\DPM\Config on the DPM server.

  2. Open the file to edit it.

    <?xml version="1.0" encoding="utf-16"?>
    <DatasourceGroup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/2003/dls/GroupDatasourceByDisk.xsd">
    <Group GroupName="Group1">
    <Datasource DatasourceName="EA24071A-7B7B-42CF-AB1D-BBAE49F50632" ProtectedServerName="SCVMM VM-Vol7-03 Resources.CSVSCALE.SCALEDPM01.LAB" WriterId="66841cd4-6ded-4f4b-8f17-fd23f8ddc3de" />
    </Group>
    </DatasourceGroup>
    
  3. Copy the <Group> tags from all the DataSourceGroup.xml files that were generated and add the text between the <DataSourceGroup> tags. The DataSourceGroups.xml file now contains one <header> tag, one <DataSourceGroup> tag, and <Group> tags from all CSV clusters.

  4. Close the DataSourceGroups.xml file on the DPM server. It is now ready to use.

Migrate to a hardware VSS provider

If you use the default system VSS provider and want to start using the hardware VSS provider, you must do the following:

  1. Install the hardware VSS provider on the host computer and ensure that your Storage Area Network (SAN) is configured for hardware snapshots.

  2. Delete the %Programfiles%\Microsoft DPM\DPM\Config\DataSourceGroups.xml file from the DPM server.

  3. Open the Registry Editor and navigate to HKLM\Software\Microsoft\Microsoft Data Protection Manager\2.0\Configuration\MaxAllowedParallelBackups.

  4. Set the following values:

    • Value: Microsoft Hyper-V

    • Data: 3

    • Value: DWORD

  5. To complete this process, you must run the Modify Protection Group Wizard for each protection group that protects the virtual machines on this cluster.

-----
For additional resources, see Information and Support for System Center 2012.

Tip: Use this query to find online documentation in the TechNet Library for System Center 2012. For instructions and examples, see Search the System Center 2012 Documentation Library.
-----
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft