Disaster Recovery for Hyper-V (Part 3)

by [Published on 28 July 2009 / Last Updated on 28 July 2009]

There is a lot more to backing up a Hyper-V server than just taking snapshots. In this article, we will discuss some ways of making traditional backups of a virtualized environment.

If you would like to read the next parts of this article series please go to:

Introduction

So far in this series, I have spoken about creating virtual machine snapshots, and about the advantages and disadvantages of doing so. As you may recall from my previous article, the biggest problem with virtual machine snapshots is that they do not offer the same amount of protection as a traditional backup, and they can really hurt a virtual machine’s performance. That being the case, I want to turn my attention to more traditional backup options for Hyper-V.

When it comes to backing up a virtualized environment, you really have two choices. You can run a backup at the host server level, or you can run a backup within the guest operating system. Of course some organizations use a combination of the two methods.

Backing Up the Host Machine

One of the easiest ways of backing up a Hyper-V environment involves running a backup at the host level. Hyper-V is designed in such a way that you can create VSS based backups of guest machines by running a backup at the host machine level. There are however some things that you need to know if you are going to be using this approach.

The method that you will have to use in making the backup really just depends on whether the virtual machines are running or not. If the virtual machines are all shut down, then you do not have to do anything special. You can simply back up the .VHD files using a standard backup. Of course, if the virtual machines are shut down, then they are inaccessible to the users until they are brought back online.

You can perform a backup even if the guest machines are up and running, but there are a few restrictions that you will have to be aware of. For starters, each virtual machine must have the integration services installed, and the Backup integration service must be enabled. This rules out performing host level backups of virtual machines that are online if the virtual machine is running a non Windows OS, or if it is running an older version of Windows that is not compatible with the integration services.

The second requirement is that the guest operating systems must use volumes that are formatted as NTFS. FAT, FAT-32, and other file systems are not supported. Furthermore, the guest machines cannot be configured to use dynamic disks. The backup will only work if the guest machines use basic disks. Keep in mind that I am not referring to the volume that the .VHD file is stored on. The volume containing the .VHD file can be basic or dynamic. I am talking about whether the guest operating system sees the .VHD file as being a basic disk or a dynamic disk.

Finally, the Volume Shadow Copy Service must be enabled for all volumes that contain VM components. Each volume must be configured to store its own shadow copy data. In other words, the shadow copies for C: must reside on C:. Therefore, each volume must have enough free space to comfortably accommodate shadow copy data.

The Advantages and Disadvantages of Backing Up the Host Server

Now that I have mentioned the basic requirements in performing a host level backup, I want to talk about some of the advantages and disadvantages of backing up the host server. By far the biggest advantage to using this backup method is that it is a catch all backup solution.  As such, you can back up the host operating system, the configuration settings for each virtual machine, all of your virtual hard drives, and any virtual machine snapshots that may exist. 

The nice thing about this type of backup (besides the convenience) is that it allows you to backup the configuration settings for the virtual machines. When Hyper-V first came out, I backed up some individual virtual machines, but I did not create any host level backups. One day, the host operating system died and I had to rebuild the server. Even though I did not end up losing anything, it was a royal pain having to manually reconfigure the settings for each of my virtual machines. If I had not documented all of my virtual machines I would have been in trouble.

One thing that surprises a lot of people about host level backups is that they are not completely comprehensive. Being that these types of backups include the host operating system, the virtual hard drives, the virtual machine settings, and snapshot data, you would probably assume that you have all of the basics covered. However, there is one major component that does not get backed up; virtual networks.

As far as I know, there is no way to backup your virtual networks. If you ever have to restore the entire server, then you will have to manually recreate any virtual networks that you might have been using. You will also have to manually reattach each virtual machine to the virtual network. That being the case, I strongly recommend that you thoroughly document any virtual networks that you may be using so that you have all of the information that you need should you ever have to recreate them.

The Backup Application

As I mentioned earlier, performing a host level backup of a Hyper-V server requires the use of the Hyper-V VSS Writer. This means that you will have to use a backup application that is compatible with this particular VSS writer. Although Windows Server Backup (Windows Server 2008’s built in backup application that replaced NTBACKUP) is designed to create VSS backups, it is not designed to work with the Hyper-V VSS writer.

If you really want to use Windows Server Backup, then you can register the Hyper-V VSS Writer with Windows Server Backup by creating a registry key. Please remember that editing the registry is dangerous, and that making a mistake can destroy Windows, your applications, or both. Normally I would tell you to create a full system backup before attempting a registry modification, but in this case all you can really do is just be really careful (unless you want to shut down your virtual machines and then make a full backup).

To create the necessary registry key, open the Registry Editor in the host operating system, and then navigate through the registry tree to: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT \CurrentVersion\WindowsServerBackup\Application Support\{66841CD4-6DED-4F4B-8F17-FD23F8DDC3DE}. Keep in mind that you will have to manually create the Windows Server Backup container and all subsequent containers. Once the necessary structure is in place, create a new Reg_SZ key named Application Identifier, and assign it a value of Hyper-V. This will register the Hyper-V VSS writer for use with Windows Server Backup.

Conclusion

Although making host level backups of your Hyper-V server is a fairly good backup solution, there are some major limitations to using it that go beyond what I have already discussed. It is critical that you familiarize yourself with these issues, or you could find yourself facing some serious problems if you ever have to perform a restoration. I will explain these issues and much more in Part 4 of this series.

If you would like to read the next parts of this article series please go to:

Advertisement

Featured Links