Introduction

Windows Server 2008 provides a built-in backup solution called Windows Server Backup (WSB). Windows Server Backup uses the Volume Shadow Copy Service (VSS) to backup and restore your server. WSB provides the normal backup and restore features of an enterprise backup program: operating system, volumes, folders and files. In addition WSB supports backup and restore at an application level if the application provides a VSS compatible “writer”. In this article you will learn how to configure WSB with the support for Hyper-V VSS writer.

Windows Server Backup

Windows Server Backup is a “feature” in Windows Server 2008, but by default it is not installed. To install WSB so that you can configure it to support Hyper-V do the following:
  1. Launch Server Manager
  2. Select the Features node
  3. Click the Add Features option, the Add Features wizard will launch (Figure 1)

Figure 1
  1. Expand the Windows Server Backup Features node (Figure 2) and select Windows Server Backup. Optionally select the Command-Line tools.

Figure 2
  1. Click Next
  2. Click Install to begin the installation

Configuring for Hyper-V

Windows Server Backup can support additional VSS writers, but it does not have an ability to import or register the VSS writer, you must do that by hand. When you install Windows Server Backup it has no additional VSS writers registered. To add support for the Hyper-V VSS writer you must create the Windows Server Backup registry locations and register the GUID for the applications VSS writer. This can be done using REGEDIT or using a .REG file.

Finding the Hyper-V VSS Writer GUID

Before you can add a VSS writer to Windows Server Backup you need to know the Writer ID GUID. You can use the VSSADMIN tool to list all currently installed VSS writers . the machine and see their GUIDs. To use VSSADMIN to find the GUID, do the following:
  1. Launch a command prompt as administrator
  2. At the command prompt, type the following: VSSADMIN List Writers >C:\TEMP\VSSWriters.txt
  3. After a few seconds the list of all VSS writers that are installed and registered with the VSS service will be written to the C:\TEMP\VSSWRITERS.TXT file.
  4. Open up the C:\TEMP\VSSWRITERS.TXT file with notepad and search for Microsoft Hyper-V VSS Writer
  5. Under that Writer name you will find the Writer ID GUID {66841CD4-6DED-4F4B-8F17-FD23F8DDC3DE}
Making the Changes Using REGEDIT
To make the changes using REGEDIT, do the following:
  1. Launch REGEDIT (Figure 3)
  2. Traverse to the following key

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WindowsServerBackup
  3. Create a key called WindowsServerBackup

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WindowsServerBackup
  4. Select Windows ServerBackup key and create a key under it called Application Support

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WindowsServerBackup\Application Support
  5. Now create a key under Application Support for the Hyper-V VSS writer GUID 66841CD4-6DED-4F4B-8F17-FD23F8DDC3DE

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WindowsServerBackup\Application Support\66841CD4-6DED-4F4B-8F17-FD23F8DDC3DE
  6. Under Hyper-V VSS GUID key, create a value of REG_SZ called “Application Identifier” and set the value to “Hyper-V VSS Writer”

Figure 3
Making the Changes Using a .REG file
While using REGEDIT is easy enough to do, if you need to make this change . multiple servers or if you want to minimize errors it is better to create a .REG file for import. Creating a .REG file requires a standard ASCI text editor like Notepad. You can create it by hand or you can make the modifications . a single machine using the REGEDIT approach and then export the registry key and it will create a .REG file for you.
The .REG file needs to contain the registry changes that you need to make. This includes both the keys and values that need to b created or modified. In this situation, you need to create three registry keys and .e value. The following shows the .REG file that is required to make the configuration changes to support the Hyper-V VSS writer.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WindowsServerBackup]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WindowsServerBackup\Application Support]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WindowsServerBackup\Application Support\{66841CD4-6DED-4F4B-8F17-FD23F8DDC3DE}] "Application Identifier"="Hyper-V VSS Writer"
Copying these lines and placing them into Notepad and save into a file called WSB-Hyper-V.REG.
Once you have the .REG file, you can copy this to another Hyper-V server, install Windows Server Backup and then right click the WSB-Hyper-V.REG file and select Merge (Figure 4).

Figure 4
An optional approach to creating the .REG file is exporting the information from a configured server. Create the registry entries using the REGEDIT approach, .ce you are done you can right click the WindowsServerBackup key and select Export (Figure 5).

Figure 5
Use the name WSB-Hyper-V.REG in the Export Registry File dialog and click Save (Figure 6).

Figure 6

Hyper-V Backup Considerations

Now you have Windows Server Backup configured to support Hyper-V, there are some things you need to know when creating backups of the Hyper-V host and virtual machines.
  1. When backing up the Host you must backup the C: drive at a minimum to get the Hyper-V configuration information.
  2. You cannot backup specific virtual machines, you can .ly backup volumes.
  3. If you want to ensure that you have backed up specific virtual machines, you must backup each volume that contains pieces of the virtual machine. If you keep configuration files in the default location . C:, but you store the virtual machine hard disk files . a different drive, you must backup both volumes to be able to restore the virtual machines.
  4. When you restore you must select Application based “restore”.
  5. Restoring virtual machines is an all or nothing approach. You cannot restore files within a virtual machine, just the entire virtual machine. .ce the virtual machine is restored, you can mount it and copy files out.

Conclusion

Windows Server Backup is an inbox solution for backing up and restoring Hyper-V hosts and virtual machines. It is not installed by default, but installation is a simple process that does not require a reboot. By default, Windows Server backup does not support the Hyper-V VSS writer but can be configured to support Hyper-V by registering the Hyper-V VSS writer in the registry. Registration can be accomplished by hand using REGEDIT or in an automated fashion by importing a .REG file. Using the .REG file is the recommended approach to configuring Hyper-V VSS writer support to eliminate errors and automate the process.