Page 1 of 1

VM guest's time is not in-sync with host

Posted: 4. Aug 2019, 10:26
by floki
Host (16GB RAM): Windows 10 x64 1903 Build 18362.267
Guest (4GB RAM): Windows 10 x64 1803 Build 17134.885
Virtualbox Version 6.0.10 r132072 (Qt5.6.2)
VirtualBox Guest Additions 6.0.10r132072 installed in guest

Brand new to virtualbox, impressed with the product so far but I am having a small issue where my Win 10 1803 guest is not syncing time correctly with it's Win 10 1903 host, the guest is typically a minute behind the host. The VM was originally provisioned using VMware workstation and was imported into virtualbox. I've reviewed existing posts but failed to find one that seemed to address this issue.

Any assistance would be greatly appreciated.

Re: VM guest's time is not in-sync with host

Posted: 4. Aug 2019, 17:31
by mpack
The VM will get time from the host on startup. We know this works because people who don't want time sync complain about it. Thereafter it's up to the guest OS to keep time. Generally speaking it will access a network time server during or quite soon after boot.

You only allocated one core - Windows 10 hates that, which may explain why background tasks are not keeping up. You have a 4 core host, so I'd give two to the guest.

Re: VM guest's time is not in-sync with host

Posted: 4. Aug 2019, 18:44
by scottgus1
floki wrote:The VM was originally provisioned using VMware workstation and was imported
Might check that all VMware tools are uninstalled, too:

Re: VM guest's time is not in-sync with host

Posted: 5. Aug 2019, 10:52
by floki
Thanks for the responses. @mpack I've provisioned an extra vCPU, overall the VM seems happy but no progress in relation to the time drift. @scottgus1 good call, VMTools was still installed, I've uninstalled and rebooted but no luck.

I'll try re-installing Guest Additions, any other ideas?

Thanks.

Re: VM guest's time is not in-sync with host

Posted: 5. Aug 2019, 12:04
by mpack
I would live with it until the Windows guest has finished whatever is taking up CPU time. As mentioned earlier, a Windows 10 PC is under no obligation to sync its time with another PC you own. About a minute off seems normal to me.

Re: VM guest's time is not in-sync with host

Posted: 5. Aug 2019, 12:37
by floki
The problem is that I'm running an app that can't function correctly with a clock-skew. As you mentioned the guest should sync time with the host at startup which isn't happening, can you think of any reason why that is the case?

Thanks,

Re: VM guest's time is not in-sync with host

Posted: 5. Aug 2019, 12:58
by mpack
floki wrote:As you mentioned the guest should sync time with the host at startup which isn't happening
It definitely is happening. The guest OS doesn't have any access to wall clock time except what the virtual hardware tells it on startup: if the guest OS was getting nothing at all you'd know. It would be harder for the VM to get the time wrong than to get it right - and in any case we know every other VM gets the correct time (a PC's hardware is not changed by the OS you install), meaning that the problem is with the guest OS.

Re: VM guest's time is not in-sync with host

Posted: 5. Aug 2019, 14:30
by floki
Got it, so the guest is syncing time with the host at startup but the problem is that the guest's clock is running slow. After watching the host and guest clocks together for a few minutes it is very evident that the guest's clock is losing around a second every 10 seconds, this continues for around 5 minutes then the guest's clock visibly speeds up (the seconds start counting very quickly) and it corrects itself to within ~20 seconds of the host.

Average CPU utilization of the guest is 30% with memory utilization at 65%.

Is this expected behavior?

Re: VM guest's time is not in-sync with host

Posted: 6. Aug 2019, 00:19
by fth0
floki wrote:any other ideas?
Some random ideas, in descending order of probability (from a layman's point of view ;)):
  • In your guest, disable anything Power Management related (waking up after sleeping needs extra time catch-up provisions).
  • Install the VirtualBox Extension Pack (I don't know if this has anything to do with your problem, but it is a deviation from the typical VirtualBox installation and therefore a less common setup).
EDIT:
Removed inappropriate ICH9/PIIX3 chipset suggestion.

Re: VM guest's time is not in-sync with host

Posted: 14. Aug 2019, 07:55
by socratis
fth0 wrote:Change the Chipset from ICH9 to PIIX3.
Actually no, ICH9 is not a good idea, unless you're running an OSX VM. Just hover over the control and read the tooltip... ;)

Re: VM guest's time is not in-sync with host

Posted: 15. Aug 2019, 01:31
by fth0
socratis wrote:Actually no, ICH9 is not a good idea, unless you're running an OSX VM.
I'm not so sure any more that the OP is using ICH9: In my own VMs run by VirtualBox 5.2.x, I have /Devices/ich9pci/ when using ICH9 and /Devices/pci/ when using PIIX3, and the OP has a VM run by VirtualBox 6.0.x with /Devices/pci/. I've been misled by the fact that the OP has the following line in his VBox log file:
VBox log file wrote:00:00:04.574899 IOAPIC: Using implementation 2.0! Chipset type ICH9
@socratis:
In your VMs run by VirtualBox 6.0.x, does this message occur in all VBox log files, independent on the chipset?

Re: VM guest's time is not in-sync with host

Posted: 15. Aug 2019, 06:17
by socratis
@floki
I want you to try with a new VM using a fresh Win10 ISO from Microsoft (https://www.microsoft.com/en-us/softwar ... ndows10ISO). Since you're going to be visiting their site using your Win10 host, you'll be presented with the "Create Win10 installation media" tool. If you want to just get the ISO, let me know and I can get you the link (24hrs of life). Or you could visit the site with a Linux VM. ;)

Create a new VM using the defaults, except maybe with 2 CPUs and 4 GB RAM for better performance. Let's see what happens...

@fth0
Here's what I get for the four different combinations (but let's not get sidetracked in this thread):
5.2.x / PIIX3 -> IOAPIC: Using implementation 2.0!
5.2.x / ICH9  -> IOAPIC: Using implementation 2.0!

6.0.x / PIIX3 -> IOAPIC: Using implementation 2.0! Chipset type ICH9
6.0.x / ICH9  -> IOAPIC: Using implementation 2.0! Chipset type ICH9