torsdag 8 juli 2010

Enabling Serialized backup of Hyper-V CSV Cluster

One feature that is really great about the Hyper-V role in Windows Server 2008 R2 is the CSV cluster service. DPM2010 has the function of backup this cluster type. By design DPM2010 will use the function of VSS hardware providers, this can simply be explained as letting the hardware (SAN) manage the VSS snapshot instead of the operating system. The advantage is that DPM2010 can make a parallel backup of, by default, 3 virtual servers.



A few week ago I ran into a little challenge regarding the VSS hardware provider. The customer bought a ISCSI storage solution that didn’t have any VSS hardware provider. So when I ran the backup DPM2010 alerted me that there was an issue with the VSS hardware provider.


Failed to prepare a Cluster Shared Volume (CSV) for backup as another backup using the same CSV is in progress. (ID 32612 Details: Back up is in progress. Please wait for backup completion before trying this operation again (0×8007173D)



To solve this problem I had to enable serialized backup of the Hyper-V cluster. This is a four-step process. First you must modify a registry entry and second you must share a folder and third modify a script called ListVMsOnClusterForDPM and finally you must create a scheduled task. You can download the script here.


1. Modify the registry of the DPM server
a. Go to Start > Run and type in regedit
b. Navigate to HKLM\SOFTWARE\Microsoft\Microsoft Data Protection Manager\2.0\Configuration\MaxAllowedParallelBackups
c. Edit the Microsoft Hyper-V key and change the Value from 3 to 1
d. You must reboot your DPM server for the new registry entries to take effect


2. Share the config folder on the DPM server
The next part we must do is to share the config folder on the DPM server. From a security perspective it’s recommended that you use alternative accounts also called service accounts that is used for one purpose only in your domain.


You will locate the folder at the C:\Program Files\Microsoft DPM\DPM\Config. Share this folder with the shared name DPMConfig. In this step you can determine if you want to use your service account or for test purpose use the domain admin, not recommended for a permanent solution.


3. ListVMsOnClusterForDPM.ps1
Download the PowerShell script called ListVMsOnClusterForDPM, you must extract it to a folder on one of your CSV nodes, for example “C:\Scritps”. Replace the value $DPMServerName with a FQDN name of your DPM server. Now you must configure the execution policy of the node in the CSV cluster. To do so open PowerShell in administrative rights and type Set-ExecutionPolicy RemoteSigned. Now your CSV node will be able to execute the PowerShell script. The last thing you must do is to execute the ListVMsOnClusterForDPM.ps1 script from the folder you formerly extracted to the CSV node. After executing the PowerShell script an XML file called DataSourceGroups.XML will be created in the config catalogue at your DPM server. If the XML file isn’t created verify your NTFS and shared rights on the share and the config catalogue.


4. Create a scheduled task
The last thing we must fix is to keep the information in the DataSourceGroups.XML updated. We will do this by making a scheduled task that runs the ListVMsOnClusterForDPM.ps1 script. Go to Start\Administrative Tools\Task Scheduler. Click on the Create Task… link. On the General Tab. Name the task ListVMsOnClusterForDPM, enable the security feature of letting the task run whether the user is logged on or not by clicking the “Run Whether user is logged on or not” radio button. Also check the check box “Run with highest privileges”. Go now to the Triggers tab. Click New… and make your configuration as the picture below.







On the Action tab click New… make your configuration as the picture below. Note that you should use your script library =)





When you click OK you will be prompted for credentials for the account. After entering the password and clicking OK run the scheduled and verify that the file DataSourceGroups.XML is created on the DPM server.

Now you can create a protection group for your CSV resources or if you already have one just modify it.

3 kommentarer: