key to guest backups

Our previous article looked at Hyper-V Server backups, and the differences between full server and guest only backups. In this article, we take a closer look at how to make a Hyper-V guest only backup.

Selecting the right data when doing a guest only backup is important because you need to ensure that you are backing up the guest’s VHDs as well as their configuration file, which may be on different volumes.

For this reason, understanding the data Selections step is the key to creating guest only backups.

The Selections screen

When creating a Hyper-V backup, the Selections screen is the first and the most important step. So let’s take a close look at what the different parts of the Selections screen are for, and what you should select for a guest only backup job.

Microsoft Hyper-V VSS

This part of the Selections screen displays the Hyper-V guests on the server. Selecting a guest in the left pane will display the data required to back up that guest in the right pane. The data displayed will be the guest’s VHD and configuration file/s.

In the example below, guest TECH-SRV212R2 has been highlighted and reveals that data on two different volumes is required to back up the guest.

The data required is as follows:

  • The guest’s VHDX image file, which is on the E:\ drive.
  • The guest’s XML configuration file, which is on the C:\ drive.

Windows Server 2012 R1 and later, allows you to use either VHD or VHDX.

guestbackups-1a

As we will explain later in this article, the VHD and XML files of each guest to be backed up should be on the same volume, and that volume should only contain data that is to be backed up.

Critical Volumes

This part of the Selections screen displays the volume(s) that Windows Server is installed on.

Note: You must select Critical Volumes if you want to be able to use the backup for a bare metal recovery.

Data and backup volumes

This part of the Selections screen displays the volumes that contain the guest VHDs. The VHD files (or virtual hard disk files) contain the virtual machine’s operating system, applications and data.

The guests’ files should have their own volume and that volume should not contain system files, such as the physical server’s swap file. This is important for performance and to remove conflicts. As we will explain later in this article, dedicated guest volumes are also important if you want to create guest only backups.

Full VSS mode and Copy VSS mode

Selecting Full VSS mode means that VSS will clean up log files in the guest after the backup has been created. For example, the logs of an Exchange Server on a guest. If Copy VSS mode is selected, VSS will not perform a post backup cleanup and the size of logs will continue to grow and take up disk space.

Guest volume configurations

The TECH-SRV212R2 example above shows guest VHDX and XML files on different volumes. This is not an ideal configuration but it does illustrate the importance of where guest data is stored. The separation of VHD and XML files occurs when only the guest VHD is configured for a different volume.

VHD and XML files often end up on separate volumes because:

  • One of the first steps in creating a Hyper-V virtual machine, the Specify Name and Location step, determines the virtual machine’s location, which defaults to the local system volume in C:\Program files\Microsoft\Windows\Hyper-V. It is common for this default to be accepted. Later in the Connect Virtual Hard disk step, you specify the virtual machine’s storage and where the VHD will go. If you select a different volume to the host, the VHD will be stored on a different volume but the XML files will still be stored on the system volume. This will result in the guest’s VHD and configuration files being on separate volumes.
  • We have also found that some administrators select the default local system volume on both steps and configure the virtual machine’s VHD for a different volume after it has been created. This will also leave the configuration files on the system volume.

We recommended configuring the guests so that their VHD and configuration files are on the same volume. To do this, the volume where the guest is to be stored should be selected in both steps – Specify Name and Location and Connect Virtual Hard disk.

It is also important to note that the guests to be backed up should not share a volume with data that is not to be backed up.

In the following sections, we will explain why these recommended configurations are important.

How to select Hyper-V guests

Guests must be selected under Microsoft Hyper-V VSS as follows:

  • To select all of the guests, tick the box next to Microsoft Hyper-V VSS.
  • To select some of the guest, tick the box next to the guest in the Microsoft Hyper-V VSS list.

Selecting any guest will select the volume that contains the guest’s VHD and volume that contains the guest’s configuration file(s). In a best practice configuration, the VHD and configuration files will be on the same volume.

The host component folder under Microsoft Hyper-V VSS does not need to be selected, because the whole volume has been selected.

guestbackups-2a

Note: If you do not select the guests using the Hyper-V Server’s VSS section, BackupAssist will not be able to restore the guest and the VSS writer will not be able to make an application-consistent backup of the guest and any VSS applications inside it.

Note: You can restore a guest without its configuration file(s) by creating a new guest and using a backup of a guest’s VHD. However, you still need to configure the backup job correctly using the Hyper-V Server’s VSS section so that the backup is application-consistent.

Using the Hyper-V Server’s VSS section, ensures that both the guest VHD and configuration files are included in the backup.

If the guest volume contains data that you do not want to back up, you can exclude that data using the process described in the next section.

To learn more about VSS and application-consistent backups, see our VSS resource page.

How to exclude non guest data

When you tick a guest in the Selections screen under Microsoft Hyper-V VSS, both the volume containing the guest VHD and the volume containing the guest’s configuration file(s) will be selected.

The entire volume is selected because the backup job does not know what backup destination you are using. Some backup destinations (like RDX) do not support individual file backups, which means they cannot be used to back up just the guest VHD and configuration file(s).

Destinations that support VSS:

  • Removable drives. For example an external USB drive.
  • A local drive.
  • A network location. For example an iSCSI Target, network share or a NAS device using a Data container.
  • An RDX drive using a data container.

If your backup destination supports VSS, you can de-select the data you don’t need AFTER the backup job has been created. Ideally, the guest volume will only contain guests to be backed up so the whole volume can be selected.

DO NOT use the Selections screen to de-select data.

How to select guest only data

A best practice guest backup job will back up a full volume that contains the guests’ VHDs and configuration files, and the volume will not contain data that is not to be backed up. Backing up a full volume (rather than selected files) is faster, more efficient and stores more backup history.

If you have data on the guest volume that you do not want to backup, or guest data on the system volume, you can deselect data after the backup job has been created, as long as the backup destination supports VSS.

De-select data as follows:

  1. Open the BackupAssist Manage
  2. Select the backup job.
  3. Select Files and Applications from the left menu.
  4. De-select the volumes under Critical Volumes and Data and Backup Volumes.
  5. The guest selections under Microsoft Hyper-V VSS will stay selected.
  6. Select Apply changes and the guest only selection will be saved.

Partially selected guest volumes

If you only selected some of the guests on the volume and have Full VSS Mode selected, you will receive an Implicit Selections Warning when you save the changes. This warning appears because VSS thinks the whole volume is being backed up, and may therefore clean up the logs of all guests on the volume, even guests that are not backed up. This could result in a VSS application losing data (truncating logs) on guests that were not backed up, and lead to a loss of data on those guests.

If you select Ignore to the warning message, the additional guests’ host data will be added to the backup so that the relevant guests are be backed up before data is lost.

Selecting Copy VSS Mode means that only your selections will be backed up and VSS applications will not clean up any data, so no data loss will occur. At least one Full VSS Mode backup must be performed on a regular basis, otherwise old data like Exchange log files will never be cleaned up.

To learn more, see our Hyper-V best practices article.

Still not clear on anything in this article?
Leave a comment below, tweet @BackupAssist or post to Facebook.
Share this article, and help those who want to protect guests only.

Posted by RickD

2 Comments

  1. Rosalino Castro July 15, 2016 at 9:20 pm

    It says:
    “the VHD and XML files of all guests to be backed up should be on the same volumen”
    Perhaps better:
    “the VHD and XML files of each guest to be backed up…”

  2. Hi Rosalino,

    Nice wording. We’ve updated the document as per your suggestion.

Leave a Reply