[SOLVED] Wrong time after rollback - quick sync possible?

mstefan

Member
Jan 3, 2022
24
8
8
33
Hello, I am running Proxmox version 7.2.3 with an Ubuntu 22.04 VM.

The last few days I tried some things and therefore I made a snapshot everytime
and needed to rollback two times.

Because of the rollback the time of the VM is the time of the snapshot.
Measurements written to my influxdb got the old timestamp
and my services using TOTP did not work until the drift got corrected.

Is there any possibillity to strictly snc the VM time to the host time when a rollback or restore happens?

Is a rollback or backup handled like a reboot and a symple cronjob "@reboot" with a sync the time command would be all to do?
 
Because of the rollback the time of the VM is the time of the snapshot.
I suppose you did that with a memory snapshot and the behaviour is normal in this case. I would just create consistent snapshots while the VM is powered off and you will never have such problems again.

Doing memory snapshots have a lot of implications and will yield to data loss or inconsistencies (and other oddities). Therefore you would normally never do such things in a production environment - or for me anything.
 
Thank you for both replys.
I activated the option and will have a look on the next rollback.

And yes, i did it with memory.
I did not want to shut down my vm.
I will try with shutting down next time.
 
The issue isn't solved :)

With "RAM" enabled it should work and it works with windows.

It doesn't work for me (with Proxmox 8.0.3) and Debian 12 - installed from the latest cloud image including and enabled QEMU Agent.

I quote RH here:

https://access.redhat.com/documenta...ration_guide/chap-kvm_guest_timing_management

When a guest is resumed after a pause or a restoration process, a command to synchronize the guest clock to a specified value should be issued by the management software (such as virt-manager). This synchronization works only if the QEMU guest agent is installed in the guest and supports the feature. The value to which the guest clock synchronizes is usually the host clock value.

Anything I am doing wrong?

I would also go with a udev rule, if there is an "event" after resume. It looks like something - that should work - isn't working.
 
  • Like
Reactions: umeko

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!