Do regular VM snapshots trigger fsfreeze via guest agent?

Nov 19, 2024
9
2
3
Hi everyone,

When taking a regular VM snapshot in Proxmox (either from the web GUI or via CLI), and the QEMU Guest Agent is installed and running inside the VM — does Proxmox automatically trigger a fsfreeze (filesystem freeze) via the guest agent?

I’m asking because I do not want the guest filesystem to be frozen during snapshots, as it sometimes interferes with applications running in the VM.

If fsfreeze is triggered by default, is there a way to disable it while still having the guest agent enabled for other features?

Thanks a lot for your help!
 
Yes it does. You can monitor it via journalctl -fu qemu-guest-agent.service and then do a snapshot to see.
I don't recommend it but you can disable the freezing via Options > QEMU Guest Agent. What issues do you encounter?
 
Thanks for your reply!

My question is about the option in the VM settings:
"Freeze/thaw guest filesystems on backup for consistency" — it specifically mentions "on backup".

Does this also apply to regular snapshots (the ones created manually or via API/CLI, not backup jobs)?
Or is fsfreeze only triggered when running a backup (e.g., vzdump)?

Thanks again for clarifying!
 
I was hoping you use the instructions above to answer this yourself but good question. I only tested that you can see the freezing in the service logs.
I tested this with disabled freezing too now and a snapshot will still call fsreeze even if it's disabled in the options. I guess there's a reason backup was mentioned. Sorry for missing that aspect previously.
Perhaps you could create an issue on bugzilla so there's control to be had over that too.
 
Last edited:
Thanks for your clarification!

Currently, I'm using the automatic snapshot tool proxmox-autosnap, and it works well overall.
However, with hourly snapshots, the fsfreeze causes issues inside some Windows VMs — especially at the moment the snapshot is taken — and sometimes it takes longer than expected.

I'm now considering switching to native ZFS snapshots directly, instead of using this tool which relies on Proxmox's built-in snapshot command.

What do you think? Would this approach avoid the guest agent freeze and give me more control?

Thanks!
 
I'm now considering switching to native ZFS snapshots directly,

You'll get a stable snapshot of the filesystem. ZFS guarantees this. But if a user (inside the guest) wants to
  1. open a file manually, let's say in an editor
  2. copy the contents from one editor to an unsaved "New document.txt"
  3. delete the old file
  4. save the new one to disk
... then the approach without "help" from the inside and including RAM in the snapshot will destroy my data if the ZFS snapshot is done between my steps 3 and 4.

Yes, that a heavily constructed (and totally stupid!) example - nobody will program any application this way! Won't they? All real applications will be immune against this artificial scenario, right?

Good luck!
 
Thanks for your input!

In my environment, I have no intention or need to include RAM in snapshots. What I’m aiming for is simply to have hourly restore points in case something goes wrong within a short window (e.g. within the last hour).

That said, I think I found the actual reason behind the Windows VM freezing during snapshots: it's due to a 5TB qcow2 disk located on NFS storage. This appears to cause system hangs at snapshot time.

To address this, I considered disabling the QEMU guest agent entirely — but that's not ideal, especially since it's also used by Proxmox Backup Server (PBS) during backups.

Unfortunately, in Proxmox there’s no way to exclude a specific disk from a snapshot operation. So the snapshot applies to all disks attached to the VM, including the large NFS volume.

My current workaround:​

  • Since my main storage is ZFS, I now use Sanoid to create hourly ZFS snapshots directly.
  • I keep only the daily system-level Proxmox snapshots created using the tool proxmox-autosnap, which include guest-agent fsfreeze, to ensure at least one consistent restore point per day.
  • I can't remove the NFS disk because it's used for archival data inside the VM.
It would be a great feature if Proxmox allowed per-disk snapshot inclusion/exclusion, similar to what’s already available for replication and backup options.


Thanks again!