Opened 10 years ago
Last modified 10 years ago
#14605 new defect
Date and time on Linux guests is not updated after a session restoration
Reported by: | Panos Kavalagios | Owned by: | |
---|---|---|---|
Component: | other | Version: | VirtualBox 5.0.4 |
Keywords: | Cc: | ||
Guest type: | Linux | Host type: | Linux |
Description
When you save the machine state and then restoring it on Linux Guest operating systems after some time the date continues to display the last one before saving and not the current date and time. The problem is not reproduced on Windows Guest, where the clock is refreshed automatically.
It might be in the way that Linux system works to retrieve the time from the hardware clock during boot process and then it is maintained by the OS, but if there is any work around would be great to cause the guest to refresh the date like issuing "hwclock --hctosys" automatically.
Attachments (2)
Change History (7)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
You are right. It works as expected on a Fedora 22 guest that I have tried, where it sets the time from the host after restoring. The issue was observed on a Gentoo guest. You may find attached the requested log files VBox.log and VBox.log.1, where the issue was reproduced.
by , 10 years ago
Attachment: | VBox.log.1 added |
---|
by , 10 years ago
comment:3 by , 10 years ago
According to your log, VBoxService is not running inside the guest. VBoxService is the process which is responsible for time synchronizatation. VBoxService is started from vboxadd-service (I believe it's installed in /etc/init.d but I'm not sure about Gentoo) and a file /var/run/vboxadd-service would contain the PID of the running process.
comment:4 by , 10 years ago
It is confirmed. I have run manually "/etc/init.d/vboxadd-service start", save session and then restore and it worked fine. The time has been sync'd to the host clock. I have tried to added it with "rc-config add vboxadd-service default" to the default runlevel, but it is not running after a reboot. It used to run in the past, but it seems that the latest OpenRC version does not execute the startup script.
I think it is an issue in the installation of the VirtualBox Guest Additions then. They should correctly support Gentoo init scripts.
comment:5 by , 10 years ago
Let me know if you have a fix for the script. Gentoo is not an officially supported guest but nevertheless we want to fix the problem.
This should be properly handled by the VirtualBox Guest Additions. In the case you described, the time should be correctly synchronized to the host time. Please attach two VBox.log file, one from a session which you saved and one from a session where you restored the saved session.