-
Notifications
You must be signed in to change notification settings - Fork 612
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
The Virtualization.framework does not provide an RTC device as /dev/rtc
when a VM is booted using a Linux kernel image.
#2905
Comments
I created PR #2894 to address the first issue mentioned above. |
So using kernel image is required only for qemu, but this issue is a about vz. Do we have a use case for using kernel image with vz? |
Do you know why this fails? Can we fix this instead of waiting for NTP? |
In the apple forum there is an interesting idea on how to synchronise time after sleep: Maybe we can add this to the guest agent, and synchronize the time during start and each time when the host wakes up from sleep? This will work in all case, even if the vm does not have access to the network. |
The guest agent checks for the existence of
If the guestagent retrieves the time from the hostagent and is installed and started earlier (currently done in |
Description
The Virtualization.framework does not provide an RTC device as
/dev/rtc
when a VM is booted using a Linux kernel image.When booted from a disk image,
rtc-efi
is available as/dev/rtc0
:However, when booting with a kernel image, no RTC devices (such as
rtc-efi
) are present, so the Linux kernel begins counting from the time configured at build:Reference: https://developer.apple.com/forums/thread/760344
The system clock remains inaccurate until
systemd-timesyncd.service
synchronizes with an NTP server.Known Issues Resulting from Lack of
/dev/rtc0
Delayed NTP Synchronization: The time required for
systemd-timesyncd.service
to sync with an NTP server in the background can be lengthy—up to 30 seconds in some cases. Ifcurl
orapt-get install
is executed in the foreground before synchronization completes, certificate validation fails, resulting in errors:Guest Agent Time Synchronization Failure:
fixSystemTimeSkew()
inpkg/guestagent/guestagent_linux.go
fails, preventing the guest OS from adjusting the time.Using a kernel image for booting allows specifying kernel command-line arguments, which has proven beneficial, e.g., in QEMU-based workarounds (#2541). Therefore, ensuring the system works as expected under these configurations is essential.
The text was updated successfully, but these errors were encountered: