Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo Virtualbox client clock drifts when guest hibernates
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
xavier10
Guru
Guru


Joined: 19 Jan 2004
Posts: 485
Location: Paris, France

PostPosted: Wed Mar 02, 2016 8:07 am    Post subject: Gentoo Virtualbox client clock drifts when guest hibernates Reply with quote

I have installed a new Gentoo virtual machine, under Virtualbox on a Mac laptop. However, when I hibernate the guest, the clock of the VM stays where it was (even if I do not hibernate the client). The only solution I found so far is to re-run ntpd, but that is just a workaround. I installed the latest virtualbox-guest-additions.
Not sure what else I could look at.
Any idea ?
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3846
Location: Austro Bavaria

PostPosted: Wed Mar 02, 2016 10:48 am    Post subject: Reply with quote

rc-update add ntpd (or what it is called) it will run itself and sync.

in the past some kernels version caused a big clock skew for myself which was fixed later. was on my other notebook and some 3.x.x kernels.
Back to top
View user's profile Send private message
xavier10
Guru
Guru


Joined: 19 Jan 2004
Posts: 485
Location: Paris, France

PostPosted: Wed Mar 02, 2016 9:36 pm    Post subject: Reply with quote

Thanks, I tried, but sadly it does not improve the situation.
At startup, it synced the time. Then I did put the host to sleep for one hour, and when I came back, the guest was still at the previous time...
I am confused, on other VMs that I maintain (including an old Gentoo one), this issue does not occur.

Are there some specific options to set into the kernel ?

Thanks!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54234
Location: 56N 3W

PostPosted: Wed Mar 02, 2016 9:40 pm    Post subject: Reply with quote

xavier10,

Is it OK when you suspend and restore the entire Virtualbox VM rather than the guest?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3134

PostPosted: Wed Mar 02, 2016 9:45 pm    Post subject: Reply with quote

Check options regarding emulated real time clock. AFAIR qemu allows you to pick one of 3 or 4 modes, VB can provide similar features. Perhaps changing the mode would let you keep the guest in sync with host.
Back to top
View user's profile Send private message
xavier10
Guru
Guru


Joined: 19 Jan 2004
Posts: 485
Location: Paris, France

PostPosted: Wed Mar 02, 2016 10:01 pm    Post subject: Reply with quote

I did some more testing, and clock drift occurs when either of the following occurs:
- the host goes to sleep (with the VM running) which is quite annoying actually, as I do this often;
- I save the VM state and reopen it later;
- the guest goes to sleep...
Back to top
View user's profile Send private message
xavier10
Guru
Guru


Joined: 19 Jan 2004
Posts: 485
Location: Paris, France

PostPosted: Sun Mar 06, 2016 2:43 pm    Post subject: Reply with quote

I recompiled a kernel with RTC settings similar to those of some old, well-behaved Virtualbox host, and it does not solve the problem (in particular with HCTOSYS and SYSTOHC off, as in the other system).

Any other idea would be welcome...
Back to top
View user's profile Send private message
xavier10
Guru
Guru


Joined: 19 Jan 2004
Posts: 485
Location: Paris, France

PostPosted: Sat Apr 23, 2016 12:45 pm    Post subject: Reply with quote

I have been searching for information on the virtualbox forum, and that did not seem to solve the issue. Some relevant questions arose though.

First, the link to the thread on the virtualbox forum:

https://forums.virtualbox.org/viewtopic.php?f=8&t=76625&p=360052#p360052

Now, it seems the issue is related to the guest additions not functioning properly.
I upgraded the virtualbox executable so that it is at least as recent as the version of the guest additions (we are not supposed to run guest additions newer than a virtualbox executable apparently).
Another thing one poster observed that the version of the guest additions installed by gentoo shows up in the logs with an "OSE" suffix which means it is not a standard version from VB itself, but with some add-ons in the gentoo package so that they cannot help much.

Any feedback would be greatly appreciated...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum