Guest time gets updated on boot (but not reboot) despite GetHostTimeDisabled 1 and uninstalled guest additions

Discussions about using Windows guests in VirtualBox.
Post Reply
______________
Posts: 3
Joined: 4. Mar 2022, 08:14

Guest time gets updated on boot (but not reboot) despite GetHostTimeDisabled 1 and uninstalled guest additions

Post by ______________ »

I'm using VirtualBox 6.0.12 r133076 on a Windows 10 64-bit host with a Windows 7 64-bit guest.
I have a live-Snapshot created some time in 2019. I already had GetHostTimeDisabled set to 1 when I created the snapshot and currently,

Code: Select all

VBoxManage.exe getextradata "Win 7 SW Comp" VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled
returns 1.
The guest has a network adapter, but its set to "not connected".

I need to shut down the guest to increase the RAM, VRAM and processor core settings. But every time I do, the time is updated, which is not what I want.
Updating VirtualBox is also not really possible, because the live snapshots will stop working.

Here is what I tried already:
Attempt 1:
  • Start live snapshot from manager
  • Reboot from start menu
  • Time stays at 2019
  • Reboot from msconfig changef
  • Time stays at 2019
  • Shutdown from start menu
  • Boot from manager
  • Time is updated
Attempt 2:
  • Start live snapshot from manager
  • Close VM window without returning to snapshot
  • Boot from manager
  • Time is updated
Attempt 3:
  • Discard live-data in manager
  • Boot from manager
  • Time is updated
Attempt 4:
  • Start live snapshot from manager
  • Uninstall guest additions
  • Reboot from setup
  • Time stays at 2019
  • Reboot from start menu
  • Time stays at 2019
  • Shutdown from start menu
  • Boot from manager
  • Time is updated
Attempt 5:
  • Start live snapshot from manager
  • Uninstall guest additions
  • Reboot from setup
  • Time stays at 2019
  • Close VM window without returning to snapshot
  • Boot from manager
  • Time is updated
Attempt 6:
  • Start live snapshot from manager
  • Reboot from setup
  • When VirtualBox BIOS logo is visible, close VM window without returning to snapshot
  • Boot from manager
  • Time is updated
Attempt 7:
  • Start live snapshot from manager
  • Uninstall guest additions
  • Reboot from setup
  • When VirtualBox BIOS logo is visible, close VM window without returning to snapshot
  • Boot from manager
  • Time is updated
Everything I found just says to execute

Code: Select all

VBoxManage.exe setextradata "Win 7 SW Comp" VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled 1
or to uninstall the guest additions, but that clearly isn't working.

How do I shut down and then boot the guest without its time being updated?

A workaround is this:
  • Set host time to 2019
  • Start live snapshot from manager
  • Shutdown from start menu
  • Change RAM, VRAM and cores
  • Boot from manager
  • Time is still updated, but to 2019
But this is less than ideal. Not sure if it's a problem with my specific version, but it seems that the documentation is wrong, or missing some caveat about shutting down and booting.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Guest time gets updated on boot (but not reboot) despite GetHostTimeDisabled 1 and uninstalled guest additions

Post by mpack »

I would address you by name, but your chosen handle makes that impossible. Just so you know: I for one am instinctively uninclined to help someone who chooses such an unhelpful handle. A handle is already a psuedonym, there is no sense in obfuscating it.

It's unfortunate that the sign up form neglects to check for this.

If I was you I would rejoin using a different email and spellable handle with more thought put into it. Then your questions might get more willing answers.
fth0
Volunteer
Posts: 5678
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Guest time gets updated on boot (but not reboot) despite GetHostTimeDisabled 1 and uninstalled guest additions

Post by fth0 »

______________ wrote: 3. Jun 2023, 18:16 Not sure if it's a problem with my specific version, but it seems that the documentation is wrong [...]
No, it's neither a problem with your specific VirtualBox version nor the documentation. What's wrong is your interpretation of the term Time Synchronization. ;) Let me elaborate:

Just like a physical PC has a Real Time Clock (RTC) and the host OS reads the (physical) RTC to initialize its wall clock time, VirtualBox provides a virtual RTC to the VM, initialized corresponding to the physical RTC, and the guest OS reads the (virtual) RTC to initialize its wall clock time. Afterwards, the Guest Additions Time Synchronization is used to synchronize the wall clock times of the guest OS and the host OS, to prevent them from drifting apart. Disabling the time synchronization does not influence the wall clock initialization.
______________
Posts: 3
Joined: 4. Mar 2022, 08:14

Re: Guest time gets updated on boot (but not reboot) despite GetHostTimeDisabled 1 and uninstalled guest additions

Post by ______________ »

fth0 wrote: 6. Jun 2023, 02:02 Disabling the time synchronization does not influence the wall clock initialization.
Oh, OK, that explains why there is so much confusion about that topic. (A note saying something like "Note that this does not influence how the virtual RTC is initialized, see <insert link here> for details about that" would be awesome.)
Thank you for the explanation!
From the little information I found, it seems that there is currently no way of influencing the virtual RTC. Would be a nice-to-have for the future.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Guest time gets updated on boot (but not reboot) despite GetHostTimeDisabled 1 and uninstalled guest additions

Post by scottgus1 »

User "FredBarbarossa" has a 3rd-party app "Time Machine for VirtualBox" which purports to adjust the Virtualbox time settings to a desired time when starting the VM. I haven't tried it or know if it will work in your circumstances.

viewtopic.php?t=100959
Post Reply