[opensuse] Virtualbox: Linux guest machine is hours out of sync
Hi, I have a Leap 15.1 guest machine under virtualbox, but the clock is days out of sync, after restoring from "saved" state. What is the correct manner to get it to sync? I thought the guest tools would take care of that, there is no point in running a daemon to discipline the guest clock. It should just read the host clock. -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)
Am Montag, 17. Juni 2019, 12:08:14 CEST schrieb Carlos E. R.:
Hi,
I have a Leap 15.1 guest machine under virtualbox, but the clock is days out of sync, after restoring from "saved" state.
What is the correct manner to get it to sync? I thought the guest tools would take care of that, there is no point in running a daemon to discipline the guest clock. It should just read the host clock.
...check the time zone settings first before you dig any deeper.... Cheers MH -- gpg key fingerprint: 8029 2240 F4DD 7776 E7D2 C042 6B8E 029E 13F2 C102 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 17/06/2019 13.36, Mathias Homann wrote:
Am Montag, 17. Juni 2019, 12:08:14 CEST schrieb Carlos E. R.:
Hi,
I have a Leap 15.1 guest machine under virtualbox, but the clock is days out of sync, after restoring from "saved" state.
What is the correct manner to get it to sync? I thought the guest tools would take care of that, there is no point in running a daemon to discipline the guest clock. It should just read the host clock.
...check the time zone settings first before you dig any deeper....
Same as all my machines: Spain. -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)
Carlos E. R. schrieb am 17.06.19 um 12:08:
Hi,
I have a Leap 15.1 guest machine under virtualbox, but the clock is days out of sync, after restoring from "saved" state.
What is the correct manner to get it to sync? I thought the guest tools would take care of that, there is no point in running a daemon to discipline the guest clock. It should just read the host clock.
I don't know for virtualbox, but with VMWare, using the guest daemon to synchronize clocks is the best way to have the guest clock be broken. <https://kb.vmware.com/s/article/1006427> says "VMware recommends using NTP instead of VMware Tools periodic time synchronization." Maybe it's the same with VirtualBox. All my virtual boxes use ntp, anyway. Werner -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 17/06/2019 13.45, Werner Flamme wrote:
Carlos E. R. schrieb am 17.06.19 um 12:08:
Hi,
I have a Leap 15.1 guest machine under virtualbox, but the clock is days out of sync, after restoring from "saved" state.
What is the correct manner to get it to sync? I thought the guest tools would take care of that, there is no point in running a daemon to discipline the guest clock. It should just read the host clock.
I don't know for virtualbox, but with VMWare, using the guest daemon to synchronize clocks is the best way to have the guest clock be broken.
I know. But this machine now doesn't run VMWare and I'm forced to use VirtualBox.
<https://kb.vmware.com/s/article/1006427> says "VMware recommends using NTP instead of VMware Tools periodic time synchronization."
Maybe it's the same with VirtualBox. All my virtual boxes use ntp, anyway.
None of my VMware boxes used it. The documentation says to not use any such thing, just the guest tools to sync to the host. However, this machine is at default settings. It is using systemd timer-sync daemon, which says it is running and the time is synced, which is obviously false, it says today is 12th of June. -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)
On 2019-06-17 06:08 AM, Carlos E. R. wrote:
Hi,
I have a Leap 15.1 guest machine under virtualbox, but the clock is days out of sync, after restoring from "saved" state.
What is the correct manner to get it to sync? I thought the guest tools would take care of that, there is no point in running a daemon to discipline the guest clock. It should just read the host clock.
I have a couple of Windows 10 virtual machines, running on Linux. I just set the clocks on them to the local time zone and sync to the computer the VM is running on. IIRC, with previous versions of Windows, I didn't sync at all, relying on the hardware clock, which Linux synced. However, I don't know that option is still available in W10. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2019-06-17 08:58 AM, James Knott wrote:
On 2019-06-17 06:08 AM, Carlos E. R. wrote:
Hi,
I have a Leap 15.1 guest machine under virtualbox, but the clock is days out of sync, after restoring from "saved" state.
What is the correct manner to get it to sync? I thought the guest tools would take care of that, there is no point in running a daemon to discipline the guest clock. It should just read the host clock.
I have a couple of Windows 10 virtual machines, running on Linux. I just set the clocks on them to the local time zone and sync to the computer the VM is running on. IIRC, with previous versions of Windows, I didn't sync at all, relying on the hardware clock, which Linux synced. However, I don't know that option is still available in W10.
Forgot to mention, the VMs are VirtualBox. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 17/06/2019 14.58, James Knott wrote:
On 2019-06-17 06:08 AM, Carlos E. R. wrote:
Hi,
I have a Leap 15.1 guest machine under virtualbox, but the clock is days out of sync, after restoring from "saved" state.
What is the correct manner to get it to sync? I thought the guest tools would take care of that, there is no point in running a daemon to discipline the guest clock. It should just read the host clock.
I have a couple of Windows 10 virtual machines, running on Linux. I just set the clocks on them to the local time zone and sync to the computer the VM is running on.
How?
IIRC, with previous versions of Windows, I didn't sync at all, relying on the hardware clock, which Linux synced. However, I don't know that option is still available in W10.
Both host and guests are Linux Leap. It works on boot, but not on save and restore machine. It is still days off. Chrony says the clock is way off, that it is adjusting it, but nothing happens. Hits I find on google tell to not use a sync daemon, that the guest tools should do it. They don't. And I'm using chrony (default) and it doesn't work. -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)
On 2019-06-17 09:17 AM, Carlos E. R. wrote:
I have a couple of Windows 10 virtual machines, running on Linux. I just set the clocks on them to the local time zone and sync to the computer the VM is running on. How?
If you're running NTP on the Linux host, it's also a server. Just point the guest clock to it, as you would any other server. Since it's Linux, you can choose whether the clock is UTC or local time zone. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 17/06/2019 15.26, James Knott wrote:
On 2019-06-17 09:17 AM, Carlos E. R. wrote:
I have a couple of Windows 10 virtual machines, running on Linux. I just set the clocks on them to the local time zone and sync to the computer the VM is running on. How?
If you're running NTP on the Linux host, it's also a server. Just point the guest clock to it, as you would any other server. Since it's Linux, you can choose whether the clock is UTC or local time zone.
No. Documentation says not to use ntp or equivalent on the guest. I solved it by installing the specific VirtualBox guest tools, which Installation YaST did not install (virtualbox-guest-tools and virtualbox-guest-x11), then did: VBoxService --enable-timesync --timesync-set-start --timesync-set-on-restore That did it. -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)
On 2019-06-17 09:44 AM, Carlos E. R. wrote:
No. Documentation says not to use ntp or equivalent on the guest.
I solved it by installing the specific VirtualBox guest tools, which Installation YaST did not install (virtualbox-guest-tools and virtualbox-guest-x11), then did:
VBoxService --enable-timesync --timesync-set-start --timesync-set-on-restore
That did it.
I've been running VirtualBox for a few years and never had to do that. But yes, you do need those guest extensions for other things too. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 17/06/2019 15.49, James Knott wrote:
On 2019-06-17 09:44 AM, Carlos E. R. wrote:
No. Documentation says not to use ntp or equivalent on the guest.
I solved it by installing the specific VirtualBox guest tools, which Installation YaST did not install (virtualbox-guest-tools and virtualbox-guest-x11), then did:
VBoxService --enable-timesync --timesync-set-start --timesync-set-on-restore
That did it.
I've been running VirtualBox for a few years and never had to do that. But yes, you do need those guest extensions for other things too.
Of course that ntp works. But the instructions say "don't". It poses a extra load on the machine. -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)
On 2019-06-17 09:52 AM, Carlos E. R. wrote:
I've been running VirtualBox for a few years and never had to do that. But yes, you do need those guest extensions for other things too. Of course that ntp works. But the instructions say "don't". It poses a extra load on the machine.
Is it still possible to not use NTP? A quick glance at both openSUSE and W10 didn't show it was possible. Of course, I didn't look that hard. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 17/06/2019 16.05, James Knott wrote:
On 2019-06-17 09:52 AM, Carlos E. R. wrote:
I've been running VirtualBox for a few years and never had to do that. But yes, you do need those guest extensions for other things too. Of course that ntp works. But the instructions say "don't". It poses a extra load on the machine.
Is it still possible to not use NTP? A quick glance at both openSUSE and W10 didn't show it was possible. Of course, I didn't look that hard.
Certainly. I just disabled chrony on two virtual machines, and ntpd is not installed. I have not decided yet about systemd time-sync.target. The idea is just to use the host clock as is, not another clock. -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)
Carlos E. R. wrote:
Hi,
I have a Leap 15.1 guest machine under virtualbox, but the clock is days out of sync, after restoring from "saved" state.
What is the correct manner to get it to sync? I thought the guest tools would take care of that, there is no point in running a daemon to discipline the guest clock. It should just read the host clock.
On our xen hosts, each guest runs it's own ntp. There is some reason why a guest isn't just using the hosts clock, I just can't remember what it is. -- Per Jessen, Zürich (24.1°C) http://www.hostsuisse.com/ - virtual servers, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 06/17/2019 05:08 AM, Carlos E. R. wrote:
Hi,
I have a Leap 15.1 guest machine under virtualbox, but the clock is days out of sync, after restoring from "saved" state.
What is the correct manner to get it to sync? I thought the guest tools would take care of that, there is no point in running a daemon to discipline the guest clock. It should just read the host clock.
Carlos, That's strange. I have both openSuSE and Windows 7 guests running are an Arch host with Virtualbox and guests always have the correct time. Moreover, I don't ever recall doing anything special to set the time in the guests (other than choosing the timezone when I installed the guests) I would check for any bugs open related guest times are open with Vbox. The other thought is why not just set the timezone in the guests and then use timectl or windows time to set the guest clocks to current and see if they stay set? -- David C. Rankin, J.D.,P.E.
On 18/06/2019 20.01, David C. Rankin wrote:
On 06/17/2019 05:08 AM, Carlos E. R. wrote:
Hi,
I have a Leap 15.1 guest machine under virtualbox, but the clock is days out of sync, after restoring from "saved" state.
What is the correct manner to get it to sync? I thought the guest tools would take care of that, there is no point in running a daemon to discipline the guest clock. It should just read the host clock.
Carlos,
That's strange. I have both openSuSE and Windows 7 guests running are an Arch host with Virtualbox and guests always have the correct time. Moreover, I don't ever recall doing anything special to set the time in the guests (other than choosing the timezone when I installed the guests)
And I have been using VBox before and did not notice the problem. I just noticed it on 15.1 freshly installed, maybe because the guest tools were not automatically installed as I thought.
I would check for any bugs open related guest times are open with Vbox. The other thought is why not just set the timezone in the guests and then use timectl or windows time to set the guest clocks to current and see if they stay set?
No, it was the missing specific vbox guest tools. Only the generic guest tools were installed. -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)
participants (6)
-
Carlos E. R.
-
David C. Rankin
-
James Knott
-
Mathias Homann
-
Per Jessen
-
Werner Flamme