Open norio-nomura opened 1 week ago
I created PR #2894 to address the first issue mentioned above.
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.
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?
2. Guest Agent Time Synchronization Failure:
fixSystemTimeSkew()
inpkg/guestagent/guestagent_linux.go
fails, preventing the guest OS from adjusting the time.
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: https://developer.apple.com/forums/thread/760344?answerId=805675022#805675022
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.
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.