I have a VirtualBox VM running an x86_64 Ubuntu 22.04. Whenever i try changing the date to a previous date (in my case 5 days ago), the date always reverts back to the current date a few seconds later.
Here's what i've done:
I disabled both network connections in the VM so it won't sync.
In the settings panel, i disabled all sync'ing.
I've tried:
- changing the date in the settings panel
sudo date +%d --set="21"sudo date -s "5 days ago"sudo timedatectl set-time 2022-04-21systemctl stop time-sync.targetsystemctl stop time-set.target
I've seen mentions of the hardware clock, but i get this:
hwclock --show
hwclock: Cannot access the Hardware Clock via any known method.
hwclock: Use the --verbose option to see the details of our search for an access method.
so i assume the VM isn't emulating one. I have no running processes or installed packages that match "*ntp*".
What is restoring my date?
Rebooting didn't help.
(FYI i have a Windows VM that has a similar behavior, also with network disconnected.)
Edit 1
I noticed this in /var/log/syslog after changing time:
Apr 26 14:18:36 myvm kernel: [ 5336.382332] 13:18:36.743879 timesync vgsvcTimeSyncWorker: Radical guest time change: 432 002 205 702 000ns (GuestNow=1 650 979 116 743 855 000 ns GuestLast=1 650 547 114 538 153 000 ns fSetTimeLastLoop=true )
followed by a bunch of anacron jobs, none apparently related to time...
Edit 2
This answer suggests that indeed VirtualBox is forcing the date, but disabling this, even with reboots, didn't help; the date always reverts.