Your cart is currently empty!
[SOLVED] Windows 7 virtual machine time syncing even with internet time switched off
I was trying to figure out why the time on a Windows 7 virtual machine was constantly changing, even after I turned off the internet time syncing. I ended up stumbling across an article on the VirtualBox forums, which I thought would be handy to include here to increase its chance of helping the community:
I’ll leave it here, maybe someone will need…
Recently I was creating a few different guest machines inside my VirtualBox host (Windows) and noticed an odd theme of APT not being able to update due to the resources obtained being from the future! (I am a time traveler). This usually screams out one thing:
Check the system time!
Upon checking my guest machine’s time, it was, in fact, days behind where it should be. This meant that even with the VirtualBox guest tools installed AND the “Hardware clock in UTC” option selected under Motherboard, the guest was still not getting the right time.
This also meant that the local NTP daemon was not syncing externally as it was purely relying on the host sync to be correct.
Luckily, the VirtualBox user manual, of all things, does contain a solution under the “Disabling the Guest Additions time synchronization” heading:
Once installed and started, the VirtualBox Guest Additions will try to synchronize the guest time with the host time. This can be prevented by forbidding the guest service from reading the host clock:
VBoxManage setextradata "VM name" "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 1
To run the above command, open CMD.exe as Administrator. Navigate to the VirtualBox folder on your machine:
cd C:\Program Files\Oracle\VirtualBox
Then enter the command as seen above (replacing “VM name” with the name of the virtual machine you wish to affect).
The guest will now not sync with the host and should have the right time/date set by the NTP daemon (as long as you have the right Region/Location set in Settings).
by
Tags:
Leave a Reply