Article ID: kb00360Last Modified: 14-Apr-2026

How to Prepare a Proxmox VM for MS SQL or MS Exchange Backup

This guide explains how to prepare a virtual machine running on Proxmox VE for application-consistent backups of Microsoft SQL Server or Microsoft Exchange.

To properly prepare a Proxmox VM for MS SQL or MS Exchange backup:

  1. Install and enable the QEMU Guest Agent
  2. Configure application-consistent backup (VSS for Windows)
  3. Adjust the VSS mode if other backup tools are used
  4. Validate the configuration and test backups

Prerequisites

Before proceeding, make sure you:

  • Have administrative access to the VM and the Proxmox host
  • Use a supported backup solution
  • Understand whether application-consistent backups are required

Refer to the following KB article for detailed information about the required permissions.

Step 1: Configure QEMU Guest Agent

What is QEMU Guest Agent?

The QEMU Guest Agent is a service installed inside the VM that enables communication between the host and guest OS.

It is required for:

  • Graceful VM shutdown
  • File system freeze/thaw during backups
  • Application-consistent snapshots

Enable Guest Agent on the Host

After installing the agent inside the VM, enable it in Proxmox:

  • GUI: *VM → Options → Enable QEMU Guest Agent

  • CLI:
qm set \<VMID\> \--agent 1

Install the Guest Agent Inside the VM

Linux

Install the guest agent using your package manager:

Debian/Ubuntu:

apt-get install qemu-guest-agent

RHEL/CentOS:

yum install qemu-guest-agent

Start and enable the service:

systemctl start qemu-guest-agent
systemctl enable qemu-guest-agent

Windows

  1. Download and attach the VirtIO ISO
  2. Install the virtio-serial driver
    • Open Device Manager
    • Locate PCI Simple Communications Controller

Update driver from ISO: \vioserial\<OSVERSION>\

  1. Install the Guest Agent:
    • Open the ISO → guest-agent folder
    • Run:
      • qemu-ga-x86_64.msi (64-bit)
      • or qemu-ga-i386.msi (32-bit)
  2. Verify the service:
Get-Service QEMU-GA

Ensure the service is running and is set to start automatically.

Verify Guest Agent Communication

Run on the Proxmox host:

qm agent \<vmid\> ping

If configured correctly, the command returns a response without errors.

Step 2: Prepare for Application-Consistent Backup

To ensure backup consistency, the system must flush all pending writes before a snapshot creation.

During the backup, Proxmox triggers:

  • fs-freeze
  • fs-thaw

This ensures:

  • File system consistency
  • Application consistency (via VSS on Windows)

Windows-Specific Configuration (VSS)

On Windows, the guest agent uses Volume Shadow Copy Service (VSS).

Default Behavior

  • Uses: VSS_BT_FULL

Issue

This may interfere with other backup tools inside the VM.

Recommended Configuration

  1. Switch to the copy mode:

The setting needs to be done via a Registry entry.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\QEMU Guest Agent VSS Provider\VssOption

  1. Set value: VSS_BT_COPY

If the VssOption entry does not exist, create it as 32bit DWORD. The following options are available with the corresponding numerical ID that needs to be configured in the VssOption registry entry:

VSS Options

Value Mode
1 VSS_BT_FULL
2 VSS_BT_INCREMENTAL
3 VSS_BT_DIFFERENTIAL
4 VSS_BT_LOG
5 VSS_BT_COPY

If there is no other backup solution involved, leaving it at the default value of 1 (VSS_BT_FULL) should be fine. As soon as another backup solution is used within the Windows guest, chances are high that it relies on VSS. To not interfere, the recommended option is to switch the Qemu-Guest-Agent to use the VSS_BT_COPY option.

Final Steps

  • Enable in the VM settings:
    • Guest Agent
    • Freeze/thaw file system on backup
  • Reboot the VM

Fix VSS Error 8194 (Access Denied)

If you see a VSS Event ID 8194:

  1. Run dcomcnfg

  2. Navigate to:

    • Component Services → Computers → My Computer → Properties
  3. Open the COM Security tab

  4. Edit Access Permissions

  5. Add:

    • NETWORK SERVICE → Allow Local Access
  6. Reboot the VM.

Linux: Advanced (Optional)

You can configure custom scripts during freeze:

  1. Generate config:
qemu-ga \-D \> /etc/qemu/qemu-ga.conf
  1. Add:
fsfreeze-hook=/etc/qemu/fsfreeze-hook
  1. Place scripts in:

/etc/qemu/fsfreeze-hook.d/

Use cases:

  • Database dumps before backup
  • Custom application handling

Best Practices

  • Enable the QEMU Guest Agent. If you plan do not use it by some reason, disable it in the VM options (in this case the backup cannot be application-consistent)
  • Always use application-consistent backups for databases
  • Avoid running another backup solutions with the conflicting VSS modes
  • Test the restore regularly.
https://git.cloudberrylab.com/egor.m/doc-help-kb.git
Production