Enterprise Bacula Hyper-v Plugin Quick Guide

This Quick Guide presents techniques and strategies for restoring Virtual Machines from the Microsoft Hyper-v service using the VSS Bacula Enterprise Plugin.

Bacula Systems provides a single plugin for Bacula Enterprise Edition that permits you to backup a number of different components on Windows machines. One of those components is Microsoft Hyper-V Server, which is the subject of this white paper.

Hyper-v Differential and Incremental backups should be supported for 2nd generation Virtual Machines. For 1st generation and other scenarios, data size and transfer reduction techniques rely on Bacula Global Endpoint Deduplication plugin.


The plugin must be installed in the Hyper-v Host machine and already contains a Bacula Client (bacula-fd) working service.

Download and execute the VSS installation package from the Enterprise Bacula customer repository, or contact us to receive them.


Restart the Windows bacula-fd service to load the installed plugin (service.msc).


As shown in Figure 1, the VSS Plugin for Hyper-v backup can be configured using bweb.

Enterprise Bacula Hyper-v Plugin Quick Guide 1

Figure 1. Hyper-v Machines FileSet Plugin Option

The “vss:/@HYPERV/” will try to backup all Hyper-v hosts virtual machines, and the “alldrives: snapshot” is important because the Hyper-v plugin requires to snapshot the VM disk volumes. Instead of using the alldrives plugin option, is it also possible to just Include any dummy file in the FileSet backup, such as an empty txt file like “C:/bacula_backup.txt”, one for each different Windows volume with Hyper-v disks.

It is also possible to include or exclude specific machines, using name filters:

vss:/@HYPERV/ cinclude="Host Component" cinclude=*/TestVM cexclude=*
alldrives: snapshot

Hyper-V uses one of two mechanisms to back up each VM. The default backup mechanism is called the “Saved State” or “Offline” method, where the VM is put into a saved state during the processing of the PrepareForSnapshot event, snapshots are taken of the appropriate volumes, and the VM is returned to the previous state during the processing of the PostSnapshot event.

The other backup mechanism is called the “Child VM Snapshot” or “Online” method, which uses VSS inside the child VM to participate in the backup. For the “Child VM Snapshot” method to be supported, see the conditions in the referenced white paper.


If everything is set up correctly as above then the backup will include the Hyper-V data. The VMs data will appear in bweb, bat or bconsole, under the following directory:


From the files selection, it is possible to select one or more machines for restore, as in the example:

$ lsmark
 *Microsoft Hyper-V VSS Writer/
  *Host Component/
        *resource types/
       *virtual machines/

If the where=/ (origin) restore option value is set, Bacula will overite an existant VM with the same machine when restoring, directly to the Hyper-v service. If the backed up machine does not exist anymore, it is necessary to restore the VM disk to a directory (e.g. where=C:/bacula-restores) and recreate the machine using the Hyper-v console.

Granular File-Level Restore

As shown in Figures 2 and 3, to restore a set of files from a Hyper-V VM backup without re-importing the entire VM, it is possible to restore VHD files in a directory using the without_vss plugin restore option and mount them in the system.

Enterprise Bacula Hyper-v Plugin Quick Guide 2

Figure 2. Windows VHD Attach/Mount Server Manager Option

Enterprise Bacula Hyper-v Plugin Quick Guide 3

Figure 3. Detach/Unmount Server Manager Option

Once mounted, the VHD image is accessible like other physical disks on the system. The Powershell Mount-VHD command can also be used:

Mount-VHD –Path c:testtestvhdx.vhdx -ReadOnly

More information about the Mount-VHD command can be found on https://technet.microsoft.com/en-us/library/hh848551.aspx.


Backup using the Windows Hyper-V Plugin Using Bacula Enterprise Edition Version – http://baculasystems.com


Disponível em: pt-brPortuguês (Portuguese (Brazil))enEnglishesEspañol (Spanish)

Leave a Reply