Configure settings for the system VSS provider

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

If you do not use a hardware Volume Shadow Copy Services (VSS) provider from your storage area network (SAN) vendor to back up Hyper-V virtual machines with Cluster Shared Volumes (CSV) storage, you can use software snapshots to back up your virtual machines. We recommend that virtual machines that are deployed on CSV should be backed up serially by the following actions:

  • Serialize virtual machine backups per node

  • Serialize virtual machine backups per CSV LUN

If you use the default system VSS provider and want to start using the hardware VSS provider, see Migrate from the system software VSS provider to a hardware VSS provider.

Serialize virtual machine backups per node

To serialize virtual machine backups per cluster node, create the following registry key on the System Center 2012 – Data Protection Manager (DPM) server:

Key

HKLM\Software\Microsoft\Microsoft Data Protection Manager\2.0\Configuration\MaxAllowedParallelBackups

Value

Microsoft Hyper-V

Data

1

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 files 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=`"https://www.w3.org/2001/XMLSchema-instance`" xmlns:xsd=`"https://www.w3.org/2001/XMLSchema`" xmlns=`"https://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.

    Tip

    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="https://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="https://www.w3.org/2001/XMLSchema" xmlns="https://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

Note

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="https://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="https://www.w3.org/2001/XMLSchema" xmlns="https://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 from the system software VSS provider 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.
-----