VirtualBox 6.1.32 with extension 6.1.32 -time sync does not work

Discussions related to using VirtualBox on Windows hosts.
Post Reply
OliverLi
Posts: 6
Joined: 4. Apr 2022, 14:15

VirtualBox 6.1.32 with extension 6.1.32 -time sync does not work

Post by OliverLi »

setting:
cd C:\Program Files\Oracle\VirtualBox
.\vboxmanage.exe guestproperty set "testlinux7" "/VirtualBox/GuestAdd/VBoxService/--timesync-interval" 10000
.\vboxmanage.exe guestproperty set "testlinux7" "/VirtualBox/GuestAdd/VBoxService/--timesync-min-adjust" 100
.\vboxmanage.exe guestproperty set "testlinux7" "/VirtualBox/GuestAdd/VBoxService/--timesync-set-on-restore" 1
.\vboxmanage.exe guestproperty set "testlinux7" "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold" 1000

when I save state, and after 1 min start vm, no time sync happens.
log:
00:00:02.523333 ShowBootMenu <integer> = 0x0000000000000002 (2)
00:00:02.523371 [/TM/] (level 1)
00:00:02.525659 CPUM: fXStateHostMask=0x7; initial: 0x7; host XCR0=0x7
00:00:02.532709 TM: GIP - u32Mode=3 (Invariant) u32UpdateHz=93 u32UpdateIntervalNS=10741500 enmUseTscDelta=2 (Practically Zero) fGetGipCpu=0x3b cCpus=16
00:00:02.532762 TM: GIP - u64CpuHz=1 696 814 476 (0x6523558c) SUPGetCpuHzFromGip => 1 696 814 476
00:00:02.532770 TM: GIP - CPU: iCpuSet=0x0 idCpu=0x0 idApic=0x0 iGipCpu=0xf i64TSCDelta=0 enmState=3 u64CpuHz=1696816310(*) cErrors=0
00:00:02.532779 TM: GIP - CPU: iCpuSet=0x1 idCpu=0x1 idApic=0x1 iGipCpu=0xe i64TSCDelta=0 enmState=3 u64CpuHz=1696814476(*) cErrors=0
00:00:02.532786 TM: GIP - CPU: iCpuSet=0x2 idCpu=0x2 idApic=0x2 iGipCpu=0xa i64TSCDelta=0 enmState=3 u64CpuHz=1696814435(*) cErrors=0
00:00:02.532794 TM: GIP - CPU: iCpuSet=0x3 idCpu=0x3 idApic=0x3 iGipCpu=0x9 i64TSCDelta=0 enmState=3 u64CpuHz=1696814438(*) cErrors=0
00:00:02.532801 TM: GIP - CPU: iCpuSet=0x4 idCpu=0x4 idApic=0x4 iGipCpu=0xb i64TSCDelta=0 enmState=3 u64CpuHz=1696814308(*) cErrors=0
00:00:02.532819 TM: GIP - CPU: iCpuSet=0x5 idCpu=0x5 idApic=0x5 iGipCpu=0x8 i64TSCDelta=0 enmState=3 u64CpuHz=1696814369(*) cErrors=0
00:00:02.532830 TM: GIP - CPU: iCpuSet=0x6 idCpu=0x6 idApic=0x6 iGipCpu=0xc i64TSCDelta=0 enmState=3 u64CpuHz=1696814467(*) cErrors=0
00:00:02.532838 TM: GIP - CPU: iCpuSet=0x7 idCpu=0x7 idApic=0x7 iGipCpu=0xd i64TSCDelta=0 enmState=3 u64CpuHz=1696814445(*) cErrors=0
00:00:02.532845 TM: GIP - CPU: iCpuSet=0x8 idCpu=0x8 idApic=0x8 iGipCpu=0x0 i64TSCDelta=0 enmState=3 u64CpuHz=1696814476(*) cErrors=0
00:00:02.532852 TM: GIP - CPU: iCpuSet=0x9 idCpu=0x9 idApic=0x9 iGipCpu=0x1 i64TSCDelta=0 enmState=3 u64CpuHz=1696816310(*) cErrors=0
00:00:02.532859 TM: GIP - CPU: iCpuSet=0xa idCpu=0xa idApic=0xa iGipCpu=0x4 i64TSCDelta=0 enmState=3 u64CpuHz=1696814110(*) cErrors=0
00:00:02.532867 TM: GIP - CPU: iCpuSet=0xb idCpu=0xb idApic=0xb iGipCpu=0x5 i64TSCDelta=0 enmState=3 u64CpuHz=1696814247(*) cErrors=0
00:00:02.532874 TM: GIP - CPU: iCpuSet=0xc idCpu=0xc idApic=0xc iGipCpu=0x6 i64TSCDelta=0 enmState=3 u64CpuHz=1696814262(*) cErrors=0
00:00:02.532881 TM: GIP - CPU: iCpuSet=0xd idCpu=0xd idApic=0xd iGipCpu=0x7 i64TSCDelta=0 enmState=3 u64CpuHz=1696814428(*) cErrors=0
00:00:02.532889 TM: GIP - CPU: iCpuSet=0xe idCpu=0xe idApic=0xe iGipCpu=0x3 i64TSCDelta=0 enmState=3 u64CpuHz=1696813825(*) cErrors=0
00:00:02.532896 TM: GIP - CPU: iCpuSet=0xf idCpu=0xf idApic=0xf iGipCpu=0x2 i64TSCDelta=0 enmState=3 u64CpuHz=1696809638(*) cErrors=0
00:00:02.532962 TM: cTSCTicksPerSecond=1 696 814 476 (0x6523558c) enmTSCMode=3 (Dynamic)
00:00:02.532964 TM: TSCTiedToExecution=false TSCNotTiedToHalt=false
00:00:03.021909 TM: TMR3InitFinalize: fTSCModeSwitchAllowed=true
00:00:03.022276 TMR3UtcNow: nsNow=1 649 073 449 438 647 500 nsPrev=0 -> cNsDelta=1 649 073 449 438 647 500 (offLag=0 offVirtualSync=0 offVirtualSyncGivenUp=0, NowAgain=1 649 073 449 438 647 500)
00:00:03.022371 TM - Therm. Monitor = 0 (0)
00:00:03.022377 TM2 - Terminal Monitor 2 = 0 (0)
00:00:03.022398 RTM - Restricted Transactional Memory = 0 (0)
00:00:03.022528 TM - Hardware Thermal Control (HTC) = 0 (1)
00:00:03.658396 TM: cTSCTicksPerSecond=0x6523558c (1 696 814 476) enmTSCMode=3 (Dynamic) (state load)
00:00:03.658451 TM: Switching TSC mode from 'Dynamic' to 'RealTscOffset'
any help appreciate.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: VirtualBox 6.1.32 with extension 6.1.32 -time sync does not work

Post by scottgus1 »

I haven't played with time sync myself, but one thing I know for certain:

Ain't no way to Sunday that's the whole log. :wink:

Please tart the VM from full normal shutdown, not save-state. Run until you see the problem happen, then shut down the VM from within the VM's OS if possible. If not possible, close the Virtualbox window for the VM with the Power Off option set.

Right-click the VM in the main Virtualbox window's VM list, choose Show Log. Save the far left tab's log, zip it, and post the zip file, using the forum's Upload Attachment tab.
OliverLi
Posts: 6
Joined: 4. Apr 2022, 14:15

Re: VirtualBox 6.1.32 with extension 6.1.32 -time sync does not work

Post by OliverLi »

Thanks scottgus1.
The sync time is just for save-state and then start. if I reboot the vm , the vm time is same with host, but what I want is after save state and then start it.
Say I put my notebook sleep 2 hours, and then open it, the host time is right, but vm time is 2 hours behind.

I think the vm is designed to meet this requirement.
such as "--timesync-set-on-restore" , is said to set time after restore from save-state.

When it does not happen as it is supposed to, there is not much way to analyze it.

Thanks for you time and kind help. :)
fth0
Volunteer
Posts: 5690
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: VirtualBox 6.1.32 with extension 6.1.32 -time sync does not work

Post by fth0 »

Did you restart the VBoxService after setting the Guest Properties? ;)
OliverLi
Posts: 6
Joined: 4. Apr 2022, 14:15

Re: VirtualBox 6.1.32 with extension 6.1.32 -time sync does not work

Post by OliverLi »

fth0 wrote:Did you restart the VBoxService after setting the Guest Properties? ;)
Thanks reply.
I did that, nothing happened.
I checked the log , save-state, and then start.
00:00:03.692672 Changing the VM state from 'LOADING' to 'SUSPENDED'
00:00:03.692754 Changing the VM state from 'SUSPENDED' to 'RESUMING'
00:00:03.692922 Changing the VM state from 'RESUMING' to 'RUNNING'
00:00:03.692943 Console: Machine state changed to 'Running'
00:00:03.726342 GUI: Machine-window #0 activated
00:00:03.726502 GUI: Capturing keyboard on focus in
00:00:03.726539 GUI: Machine-view #0 focused, reason=3
00:00:03.791429 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=000000000d230000 w=800 h=600 bpp=32 cbLine=0xC80 flags=0x1 origin=0,0
00:00:04.219753 GUI: UIMachineViewNormal::adjustGuestScreenSize: Adjust guest-screen size if necessary
00:00:04.222421 GUI: 2D video acceleration is disabled
00:00:04.222504 GUI: HID LEDs sync is enabled
00:00:04.234712 GUI: UIMachineLogicNormal::sltCheckForRequestedVisualStateType: Requested-state=0, Machine-state=5
00:00:04.914809 GUI: Capturing keyboard/mouse on mouse click
00:00:08.703841 AIOMgr: Async flushes not supported
00:00:29.325762 GUI: Releasing keyboard/mouse on Host Combo release
00:00:30.618598 GUI: Machine-window #0 deactivated
00:00:30.618641 GUI: Releasing mouse on focus out
00:00:30.618671 GUI: Releasing keyboard on focus out
00:00:30.624151 GUI: Machine-view #0 unfocused, reason=3
I can't find any information of time sync. So maybe there is a switch for "time sync" ,and it just has n't been triggered?
OliverLi
Posts: 6
Joined: 4. Apr 2022, 14:15

Re: VirtualBox 6.1.32 with extension 6.1.32 -time sync does not work

Post by OliverLi »

I checked this post viewtopic.php?t=90233
and noticed I didn't install additional pack on client.
after I installed the pack on client (CentOS 7.9), I can find some sync information, but got error like
Apr 05 23:01:47 mysql06 kernel: 15:01:47.829394 timesync Error: vgsvcTimeSyncWorker: VbglR3GetHostTime failed; rc2=VERR_NOT_SUPPORTED
I attached the log file for reference.

Thanks.
Attachments
192.168.56.16-mysql06-2022-04-05-23-02-49.log
(84.49 KiB) Downloaded 4 times
OliverLi
Posts: 6
Joined: 4. Apr 2022, 14:15

Re: VirtualBox 6.1.32 with extension 6.1.32 -time sync does not work

Post by OliverLi »

Maybe I got the answer, my host is Windows 11, it's not on the support list.
ref: viewtopic.php?f=3&t=55757&p=257652&hili ... me#p257652
Windows hosts (64-bit):

Windows 8.1

Windows 10 RTM (1507 / 2015 LTSB) build 10240

Windows 10 Anniversary Update (1607 / 2016 LTSB) build 14393

Windows 10 Fall Creators Update (1709) build 16299

Windows 10 April 2018 Update (1803) build 17134

Windows 10 October 2018 Update (1809 / 2019 LTSC) build 17763

Windows 10 May 2019 Update (19H1 / 1903) build 18362

Windows 10 November 2019 Update (19H2 / 1909) build 18363

Windows Server 2012

Windows Server 2012 R2

Windows Server 2016

Windows Server 2019
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: VirtualBox 6.1.32 with extension 6.1.32 -time sync does not work

Post by mpack »

I have deleted your cross post of this problem. Cross posting is against the forum rules.
fth0
Volunteer
Posts: 5690
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: VirtualBox 6.1.32 with extension 6.1.32 -time sync does not work

Post by fth0 »

192.168.56.16-mysql06-2022-04-05-23-02-49.log wrote:
00:00:02.943726 Extradata overrides:
00:00:02.943744   VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled="1"
[...]
00:00:25.572988 VMMDev: Guest Log: 15:01:17.801933 main     VBoxService 6.1.32 r149290 (verbosity: 0) linux.amd64 (Jan 13 2022 20:10:27) release log
00:00:25.598147 VMMDev: Guest Log: 15:01:17.827111 timesync Error: vgsvcTimeSyncWorker: VbglR3GetHostTime failed; rc2=VERR_NOT_SUPPORTED
00:00:35.599221 VMMDev: Guest Log: 15:01:27.828191 timesync Error: vgsvcTimeSyncWorker: VbglR3GetHostTime failed; rc2=VERR_NOT_SUPPORTED
00:00:45.600088 VMMDev: Guest Log: 15:01:37.829027 timesync Error: vgsvcTimeSyncWorker: VbglR3GetHostTime failed; rc2=VERR_NOT_SUPPORTED
Well, everything works just like you've configured it: You've forbidden VirtualBox to synchronize the guest time with the host time, and then configured the time synchronization to take place at certain times. Works perfectly. :D

Seriously, see 9.11.4. Disabling the Guest Additions Time Synchronization. Use the documented command without the trailing "1" to remove this setting.
OliverLi
Posts: 6
Joined: 4. Apr 2022, 14:15

Re: VirtualBox 6.1.32 with extension 6.1.32 -time sync does not work

Post by OliverLi »

Thank you very much.
Finially it's fixed.

Just a weird thing, I changed the parameters wth the vboxmanage.exe guestproperty set command,
and I checked the .vbox file, it has been changed.

BUT when I start the virtual machine, the .vbox file was replaced with a wrong one, the one before I change .

I unregistered the virtual machine, edit the .vbox file manually, and then register it. Then it used the right .vbox file, and everything is OK.

After I reboot my notebook (windows 11), the weird thing disappeared.

SO, after started the virtual machine, make sure to check the .vbox file, if it is still the right one. That's very important. maybe reboot the notebook is a must thing.
Thanks again.
Post Reply