Does backup job FS_FREEZE AGENT actually freeze the file system?

Please, describe the problem here and provide additional information below (if applicable) …

We’re using a backup job to a Restic datastore in which we set FS_FREEZE to AGENT. In this case we would expect FS quiescing with the guest’s QEMU Guest Agent. We’ve tried this with both an incremental and a full backup job.

I’ve changed the qemu-guest-agent.service on the VM to the following configuration to engage the fsfreeze and thaw hook:

# /lib/systemd/system/qemu-guest-agent.service
[Unit]
Description=QEMU Guest Agent
BindsTo=dev-virtio\x2dports-org.qemu.guest_agent.0.device
After=dev-virtio\x2dports-org.qemu.guest_agent.0.device

[Service]
ExecStart=-/usr/sbin/qemu-ga
Restart=always
RestartSec=0

[Install]

# /etc/systemd/system/qemu-guest-agent.service.d/override.conf
[Service]
ExecStart=
ExecStart=/usr/sbin/qemu-ga --fsfreeze-hook=/etc/qemu/fsfreeze-hook

That fsfreeze-hook (which by default exists on the Debian 13 VM) triggers the following hook in fsfreeze-hook.d:

#!/bin/bash

LOGFILE=/var/log/qemu-ga-fsfreeze.log

{
    printf '%s action=%s mounts=' "$(date --iso-8601=seconds)" "$1"
    findmnt -rn -t ext4,xfs,btrfs -o TARGET | paste -sd, -
} >> "$LOGFILE"

exit 0

This shows the following output in /var/log/qemu-ga-fsfreeze.log when a freeze or thaw is performed:

cat /var/log/qemu-ga-fsfreeze.log 
2026-08-12T07:12:04+00:00 action=freeze mounts=/
2026-08-12T07:12:27+00:00 action=thaw mounts=/

I can verify that performing virsh domfsfreeze vm-name and virsh domfsthaw vm-name on the hypervisor triggers this hook and freezes and thaws the VM filesystem.

However, when I start a backup job in Sunstone, the hook is never triggered and doesn’t show an fsfreeze and thaw. So my question is, does OpenNebula actually freeze and thaw the filesystem? And if it does that in a different way, where can I see that it does the freeze and thaw?


Versions of the related components and OS (frontend, hypervisors, VMs):

Frontend:

  • Tested with 7.0.1 and 7.4.0

KVM nodes:

  • Tested with 7.0.1 and 7.4.0

Steps to reproduce:

  1. Create a backup job (doesn’t matter if it’s incremental or full) with a Restic datastore
  2. Change the systemd unit with systemctl edit qemu-guest-agent.service to use the fsfreeze-hook
  3. Execute the backup job and see that no log entries are created for an fsfreeze or thaw

Current results:

  • No fsfreeze and thaws are performed according to the qemu-guest-agent hook in the VM

Expected results:

  • fsfreeze and thaw are performed according to the qemu-guest-agent hook in the VM

Hello,

Just a question, what is the driver for this datastore? There is a bug that didn’t activate the freeze on ceph.

Cheers

Hello Bruno,

It is indeed Ceph RBD we’re using as the datastore for the VMs. So that explains why we’re seeing what we’re seeing. Is there a bug for this on GitHub?

I think that is a problem in the file /var/lib/one/remotes/tm/ceph/prebackup_live

script = vm.backup_disks_sh(:disks       => disks,
                            :backup_dir  => backup_dir,
                            :ds          => ds,
                            :live        => false)

Setting :live => true should be enough. OpenNebula 7.4 should have it fixed

Cheers!

I’ve just looked at this with OpenNebula 7.4 and I can confirm that :live is true. But still, the FS in the VM isn’t frozen.

It looks like there is a bug related to freezing CEPH filesystems because the commands are executed in the BRIDGE_LIST host instead of the hypervisor running the VM.

Cheers

I’ve just tried it on 7.4.0 and indeed, with a Ceph RBD datastore, the fs freeze and thaw commands aren’t executed.

I’ve also tested this by putting the KVM host that the VM runs on as the only host in the BRIDGE_LIST and then executing the backup job. Even in that specific case, the file system is not frozen.

Just a question, did you sync the nodes with a

sudo -u oneadmin onehost sync --force 

I have executed this command and it sadly doesn’t resolve the issue. A manual virsh domfsfreeze --domain one-10 works perfectly, but the backup job itself doesn’t freeze the filesystem of the VM.

I’ve tried to set BRIDGE_LIST to a single hostname or IP address and to to multiple hostnames or IP addresses divided by a space and divided by a comma. All of these options don’t result in an fsfreeze being triggered on the VM. In all these cases, the KVM node on which the VM runs was last in the BRIDGE_LIST.

I’ve just updated the cluster to OpenNebula 7.4.1 and I can confirm that this version solves this issue.