-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
macOS guest time becomes out of sync #4644
Comments
Could you please add more information about the issue? Especially need the guest configuration file:
How long after you turn on the VM does it take until the issue occurs? Are all of your macOS VMs affected or only a specific configuration? (please provide!) |
I only have this VM. This happened to me a few times, and it seems to be fixing itself after a while. Definitely not an easy 1/1 repro, but it does happen and it was happening before 4.1.0. |
Thanks. Config looks good to me. You could potentially test this further by turning off "Set date and time automatically" in the guest's System Settings. That would in theory prevent the guest time from fixing itself by using the internet time, and force it to rely on the time information it receives from the Apple virtualization backend. |
Done. Monitoring the issue. |
@conath since I wrote the above comment the time slipped 3 minutes today. So with the time sync set to off in the guest, it is continuously slipping. |
Having the same issue here with macOS 13 host and guest. I've noticed the VM time slips when the host is suspended due to no activity (i.e. "falls asleep"). An easy way to force the issue is pausing the VM for a few minutes. When you resume, the time will be out of sync. |
Seems like something we'll have to report to Apple: FB11815959 |
Using latest release 4.1.5, it's also happening while actively using a MacOS guest VM. |
I regularly hit a similar issue, maybe the same issue. I'm a first-time UTM user as of a couple weeks ago on my new M2 laptop, using UTM 4.4.4 and MacOS Ventura 13.5.2. My guest VM's time constantly falls days behind when not in use despite the Date & Time settings being configured to set the time automatically from the Apple time server. I can reset the clock to the exact time by opening Date & Time settings and toggling "Set time and date automatically" off and then back on. The time is correct for as long as I am actively using the VM, and then it falls behind again. |
I observe the same issue, has been ongoing for about a year for me, currently with this config.
Guest system is Ubuntu 23.04 (lunar). |
Fixed for Qemu, no APIs from Apple for Virtualization.framework |
I checked the binary
with the 0x34bc method:
|
No clue about how the host macOS send such an IOKit notification to the guest macOS |
I do not know if my comment helps or not, but I noticed that the time drift certainly appears with Ubuntu guests (many versions tested) but does not seem to appear if the guest is openSUSE LEAP 15.5 |
maybe you are running the openSUSE guest with QEMU (which time sync is supported) |
Finally found a way to solve this, a macOS LaunchAgent with the swift code like the fix for QEMU, but to make the VM aware of the drift => a Wake On LAN magic packet (reading the UTM config.plist) |
Microsoft solves this issue on their Hypervisor with a RTC device |
guest time can desync from the host os. this issue is valid for a few versions back.
The text was updated successfully, but these errors were encountered: