canonical / multipass

Multipass orchestrates virtual Ubuntu instances
https://multipass.run
GNU General Public License v3.0
7.53k stars 632 forks source link

Windows - VirtualBox time drifts inside virtual machine #1742

Open Ecno92 opened 3 years ago

Ecno92 commented 3 years ago

Describe the bug

The time inside the virtualbox based machine starts to drift. This results in issues connecting to other services which are time sensitive.

To Reproduce How, and what happened?

  1. Create a primary multipass vm
  2. Use it for some time
  3. Execute the date command and see that the time is different from your Host OS.

Expected behavior I expect that the time is synced with the host.

Logs

N/A

Additional info

Additional context

the logging of systemd-timesync reports the status "Connecting to time server ... (ntp.ubuntu.com" and the logging shows "Timed out waiting for reply ...". So it may be related to (local) networking. However connectivity to the ip/port seems to be ok.

Ecno92 commented 3 years ago

I've done some more debugging this morning and I was able to solve the issue by connecting to a different network which does not seems to block ntp updates.

What kind of time synchronization is considered to be in scope of the multipass project? systemd-timesyncd should just do it's work for most of the users, but it may be considered to adopt the time synchronization from host to guest as supported by virtualbox.