惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

爱范儿
爱范儿
腾讯CDC
博客园 - 司徒正美
A
About on SuperTechFans
H
Help Net Security
J
Java Code Geeks
C
Check Point Blog
B
Blog RSS Feed
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
MongoDB | Blog
MongoDB | Blog
U
Unit 42
Hugging Face - Blog
Hugging Face - Blog
Last Week in AI
Last Week in AI
MyScale Blog
MyScale Blog
V
Visual Studio Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
I
InfoQ
H
Hackread – Cybersecurity News, Data Breaches, AI and More
F
Fortinet All Blogs
博客园 - 聂微东
酷 壳 – CoolShell
酷 壳 – CoolShell
GbyAI
GbyAI
博客园 - 【当耐特】
雷峰网
雷峰网

Proxmox Support Forum

[SOLVED] - Github Auth for Mirrors-Kernel Repo? [Automation] Mass migration tool for MS Win11/Server Proxmox GUI hang - not response is it possible to reject or quarantine spam based on conditions I set ? The PVENode task list in PVE9 is partially obscured due to the terminal font being too large. About 100% error reporting due to pveproxy.service hooks Kubernetes overlay networking breaks when upgrading from PVE 9.1 to PVE 9.2.3 Zentraler Speicher No space left on device Combine datastore and direct file archival to tape Kernel panic VFS: Unable to mount root fs on unknown-block (0,0) sobald ein 7.x Kernel verwendet wird. How to migrate disk of a VM from one ZFS to another Windows Server 2025 fails to boot after PVE 9.2 / Linux 7.0 Kernel upgrade Cannot Install Proxmox on T610 Poweredge with H700 PERC card sdn Config. gateway not reachable How to safely change domain/FQDN? Welche Filterquote erreicht ihr? NFS Share status unknown on 2 of 5 nodes Can't connect to PVE9 consoles [solved] Can't connect to PVE9 consoles [solved] [SOLVED] - Use secondary network for PVE commands Created cluster, one node storage gone BUG: proxmox mail gateway FROM = null bypass spam filtering Moving existing PBS from VMWare workstation to PVE cluster Does eBGP SDN fabric support external peering? Bug: PDM 1.1 not recognizing valid license status Proxmox GUI hang - not response PVE crashes unexpectedly Proxmox Backup Server 4.2 released! Advice
Problem with time within vms
invalid@exam · 2025-05-29 · via Proxmox Support Forum

I have a Proxmox cluster with several Debian 12 virtual machines. These VMs use ntpd to synchronize time with local NTP servers. Under normal conditions, everything works correctly. However, when creating a disk-only snapshot, I observe that the VM’s internal time freezes for approximately 0.3–0.8 seconds. Shortly afterward, ntpd performs a time "step" to correct the offset, but I would prefer to avoid this issue entirely.

The problem occurs on VMs using both local-lvm and ceph storage. All VMs have the qemu-guest-agent installed, and no freeze-related messages appear during snapshot creation.

fiona

Proxmox Staff Member

Hi,
even when creating a disk-only snapshot, the VM needs to be paused, so that the state of the disks in the snapshots is from the same time.

Do you have the guest agent enabled in the configuration? It is recommended to freeze the file systems, otherwise it cannot be guaranteed that the raw disk state (which the storage snapshot represents) is consistent from a filesystem perspective.

Do you have any actual issue with the time? If the offset is corrected right away, that sounds to me like it works as intended.

Hi,

  • The guest agent is configured and working correctly. During backups, freeze and thaw operations are performed by the agent as expected.
  • When creating a snapshot, I see the message on the VM: qemu-ga: info: guest-fsfreeze called.
  • NTP does correct the time, but since it isn’t triggered by the guest agent, it can take quite a while—often several minutes.

I noticed this issue especially with database snapshots, where the "pause" in time causes the primary instance to see secondaries as being in the future.

It would be helpful to have an option to trigger an immediate time synchronization (e.g. via the guest agent) after a snapshot is taken.

This is still my best workaround:

Bash:

qm guest exec $VMID /usr/sbin/hwclock -- --hctosys || true

This is still my best workaround:

Bash:

qm guest exec $VMID /usr/sbin/hwclock -- --hctosys || true

Thanks. Have you any idea how to integrate it with proxmox snapshots gui? Is there something simmilar to /etc/vzdump.conf with "scripts" where such code could be executed during snapshots?

In Bugzilla, there is a described situation involving a rollback, where the time shift is understandable. However, in my case, I observe a time shift when creating a disk-only snapshot (without RAM) of the VM—which, in my opinion, should be completely transparent to the VM.

I would use QEMU Agent hook scripts instead, so you can run inside the VM which ever time sync command you need when the filesystem is thawed. Some details on [1] and [2].

Upstream really have to fix this :(

That's really sad that this bug is in Proxmox forever.

Hi everyone, just following up on this request.

I think I have a solution. But it's not nice

Proxmox has Hook Scripts:

```bash
qm set <vmid> --hookscript local:snippets/hookscript.pl
pct set <ctid> --hookscript local:snippets/hookscript.pl
```

Unfortunately there are no hocks for

```text
pre-snapshot
post-snapshot
pre-rollback
post-rollback
pre-restore
post-restore
post-resume
```

But that is easy to add for Proxmox Gmbh. Then you can run a script to set the clock.

Yeah, is not nice as for enterprise envs.

What does your "hookscript.pl"?

In my opinion you need to catch for VM snap with RAM, then if VM is running after rollback and QEMU Guest Agent is enabled and guest agent responds to ping
then call QGA guest-set-time with host time.

You could use NTP inside the VM.

What does your "hookscript.pl"?

It is not "my" hookscript. Hookscripts are a general supported thing in Proxmox. They are called e.g. after / before start/stop/backup etc.

Unfortunately not for suspend, resume etc (probably I am wrong here).

When we would have this, we can use "qm exec" to run a script in the VM to set the clock.

It is easy for Proxmox GmbH to add these events to the hookscript.

You could use NTP inside the VM.

Thank you.

This is a very friendly response.

We all know what NTP is. If that was a 100% solution, nobody would ask for a fix for 2-3 years.

You have to configure NTP to correct the time when the delta is large, else it won't correct this problem. How you do that varies by NTP server. For chrony you need something like "makestep 0.1 -1" in the config file.

Apparently you don't all know about that.

Last edited:

You have to configure NTP to correct the time when the delta is large, else it won't correct this problem. How you do that varies by NTP server. For chrony you need something like "makestep 0.1 -1" in the config file.

With all respect.

Don't lecture about NTP. We know what it is - we know how to so called "properly configure" it.

Proxmox is lacking of a feature that RedHat explicitly mentions in the qemu guest agent and VMware also has.

That is the point - not a Linux question about NTP.

We all have mitigations. It's still a not implemented feature.

Don't lecture about NTP. We know what it is - we know how to so called "properly configure" it.

Sorry if I accidentally stepped on your bad mood. Was just trying to solve the immediate problem.

Sorry if I accidentally stepped on your bad mood. Was just trying to solve the immediate problem.

This is a open ticket for many years - it has a Bug Report on Bugzilla with many ideas.

It's a bug / not implemented feature.

Not a perceived "mood issue". Not a tiny thing you can fix "in general" with NTP.

You can fix it with NTP in some situation - 1000% agreed with that. That's not the point not the question.

It's a bug / not implemented feature.

Not a perceived "mood issue". Not a tiny thing you can fix "in general" with NTP.

You can fix it with NTP in some situation - 1000% agreed with that. That's not the point not the question.

So, what is the question then?

I mean, your post isn't providing any concrete suggestions on how to fix it eitehr. And If it did, it would probably be better placed in the existing Bugzilla report.

Complaining, "nagging", and statements such as "That should be easy for Proxmox GmbH to fix" don't usually accomplish anything. They mostly just stir up emotions. In my experience, it's better to simply avoid such comments if you actually want something from the people you're directing them at. ;)

What you definitely shouldn't do, however, is take out your frustration on people who are trying to help. After all, this is a community support forum. Its main purpose is for users to help other users, which includes finding workarounds when a feature is missing or not working the way someone would like it to.

Last edited: