From owner-freebsd-virtualization@FreeBSD.ORG Wed Dec 4 21:28:54 2013 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 63D2F615 for ; Wed, 4 Dec 2013 21:28:54 +0000 (UTC) Received: from hub.org (hub.org [200.46.208.146]) by mx1.freebsd.org (Postfix) with ESMTP id 365C31281 for ; Wed, 4 Dec 2013 21:28:54 +0000 (UTC) Received: from maia.hub.org (unknown [200.46.151.189]) by hub.org (Postfix) with ESMTP id 5346D702634; Wed, 4 Dec 2013 17:28:53 -0400 (AST) Received: from hub.org ([200.46.208.146]) by maia.hub.org (mx1.hub.org [200.46.151.189]) (amavisd-maia, port 10024) with ESMTP id 10480-03; Wed, 4 Dec 2013 21:28:53 +0000 (UTC) Received: from [10.5.250.186] (remote.ilcs.sd63.bc.ca [142.31.148.2]) by hub.org (Postfix) with ESMTPA id 564C9702633; Wed, 4 Dec 2013 17:28:52 -0400 (AST) Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1822\)) Subject: Re: time drift w/virtualbox: FreeBSD Host -> FreeBSD guest w/ guest additions active From: Marc Fournier In-Reply-To: Date: Wed, 4 Dec 2013 13:28:51 -0800 Message-Id: References: <059857EF-534E-4366-BD11-924AB3ED7C31@openstudent.ca> To: Mikhail Tsatsenko X-Mailer: Apple Mail (2.1822) Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.17 Cc: freebsd-virtualization@freebsd.org X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 21:28:54 -0000 Done: =3D=3D=3D :~ # sysctl kern.eventtimer.idletick=3D1 kern.eventtimer.idletick: 0 -> 1 :~ # ntpdate time.nist.gov 4 Dec 14:02:11 ntpdate[30137]: step time server 128.138.141.172 offset = 239.820647 sec :~ #=20 =3D=3D=3D And, already 6 secs off: # ssh ruralcatholicradio.com date ; date Wed Dec 4 14:03:09 EST 2013 Wed Dec 4 19:03:15 UTC 2013 On Dec 4, 2013, at 10:50 , Mikhail Tsatsenko = wrote: > 2013/12/4 Marc Fournier : >>=20 >> Why is this such a difficult thing to keep in sync? :( >>=20 >> I have a FreeBSD Host running 4.2.18 =85 Guest FreeBSD Host has = Additions 4.2.18 installed .. >>=20 >> On the Host, I believe all the kernel modules are loaded properly: >>=20 >> # kldstat|grep vb >> 6 3 0xffffffff80c59000 59da0 vboxdrv.ko >> 8 2 0xffffffff80e20000 29f1 vboxnetflt.ko >> 11 1 0xffffffff80e2e000 3f8a vboxnetadp.ko >>=20 >> On the Guest, again, I believe everything is loaded: >>=20 >> # kldstat|grep vb >> 2 1 0xffffffff80c12000 26585 vboxguest.ko >>=20 >> And the VB processes are started: >>=20 >> # ps aux | grep VB >> root 606 0.0 0.1 32244 2144 ?? Ss 6:06PM 2:09.26 = /usr/local/sbin/VBoxService >>=20 >> I don=92t have ntpd running on the Guest, but have tried it with it = running also ... >>=20 >> But, my time is already drifting: >>=20 >> # ssh ruralcatholicradio.com date ; date >> Wed Dec 4 12:01:34 EST 2013 >> Wed Dec 4 17:03:17 UTC 2013 >>=20 >> So, I login and run ntpdate to bring it back in sync: >>=20 >> # ntpdate time.nist.gov >> 4 Dec 12:04:02 ntpdate[71827]: step time server 66.219.116.140 offset = 102.233151 sec >>=20 >> Note that the below is run from the FreeBSD Host that the Guest is = running on =85 same physical machine =85 we are perfectly in sync: >>=20 >> # ssh ruralcatholicradio.com date ; date >> Wed Dec 4 12:04:32 EST 2013 >> Wed Dec 4 17:04:32 UTC 2013 >>=20 >> An hour later, we=92ve now drifted by almost 2 minutes: >>=20 >> # ssh ruralcatholicradio.com date ; date >> Wed Dec 4 13:07:18 EST 2013 >> Wed Dec 4 18:09:16 UTC 2013 >>=20 >>=20 >> Its hard to believe that anyone would be using VirtualBox if it time = drifted like this regularly, so I figure it has to be something that I=92m= doing wrong in my configuration =85 >>=20 >>=20 >> Thoughts? > Please try setting sysctl kern.eventtimer.idletick=3D1 on the guest = machine. >=20 > --=20 > Mikhail