From owner-freebsd-virtualization@FreeBSD.ORG Wed Dec 4 18:50:10 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 64B524D0 for ; Wed, 4 Dec 2013 18:50:10 +0000 (UTC) Received: from mail-vc0-x233.google.com (mail-vc0-x233.google.com [IPv6:2607:f8b0:400c:c03::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1F68316DB for ; Wed, 4 Dec 2013 18:50:10 +0000 (UTC) Received: by mail-vc0-f179.google.com with SMTP id ie18so12047567vcb.10 for ; Wed, 04 Dec 2013 10:50:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=QvpKlP2gIkjeH+fMUhDDURgDpqWZfO3EplrTA3t3K8o=; b=fLBUAh9sTKXCV2c+ugT32HXGhLLZPfP+/299zx93bhV0f96inSqpfiAdniAVFWtGA4 TbPEAZU+/w+MKLFlafYGZ/T6kWT9hx2G7oZsOFtMmMs3PeKzHqWSEpevlsa75/HS9N+p q+sN2Tbcd510CVVsNJZRtyso0ETE1frsTwmrsQtSyWHITQ4Bglw7MucBdt+raDR2XAu8 1EId+uvGORSkzIRq6O7mXTvPMXafyCjyH13S7YQx5Ra893RR29Keoqahsi17AcAYT2Li Q+LnoX6kt8F1IFS9AGISEUKRkQI1qwnNNFdQFMQzHanDg4dg1lUfen0LulISyZoQzeo9 QDjg== MIME-Version: 1.0 X-Received: by 10.220.194.133 with SMTP id dy5mr60294100vcb.3.1386183009162; Wed, 04 Dec 2013 10:50:09 -0800 (PST) Received: by 10.58.164.36 with HTTP; Wed, 4 Dec 2013 10:50:09 -0800 (PST) In-Reply-To: <059857EF-534E-4366-BD11-924AB3ED7C31@openstudent.ca> References: <059857EF-534E-4366-BD11-924AB3ED7C31@openstudent.ca> Date: Wed, 4 Dec 2013 22:50:09 +0400 Message-ID: Subject: Re: time drift w/virtualbox: FreeBSD Host -> FreeBSD guest w/ guest additions active From: Mikhail Tsatsenko To: Marc Fournier Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable 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 18:50:10 -0000 2013/12/4 Marc Fournier : > > Why is this such a difficult thing to keep in sync? :( > > I have a FreeBSD Host running 4.2.18 =85 Guest FreeBSD Host has Additions= 4.2.18 installed .. > > On the Host, I believe all the kernel modules are loaded properly: > > # kldstat|grep vb > 6 3 0xffffffff80c59000 59da0 vboxdrv.ko > 8 2 0xffffffff80e20000 29f1 vboxnetflt.ko > 11 1 0xffffffff80e2e000 3f8a vboxnetadp.ko > > On the Guest, again, I believe everything is loaded: > > # kldstat|grep vb > 2 1 0xffffffff80c12000 26585 vboxguest.ko > > And the VB processes are started: > > # ps aux | grep VB > root 606 0.0 0.1 32244 2144 ?? Ss 6:06PM 2:09.26 /usr/lo= cal/sbin/VBoxService > > I don=92t have ntpd running on the Guest, but have tried it with it runni= ng also ... > > But, my time is already drifting: > > # ssh ruralcatholicradio.com date ; date > Wed Dec 4 12:01:34 EST 2013 > Wed Dec 4 17:03:17 UTC 2013 > > So, I login and run ntpdate to bring it back in sync: > > # ntpdate time.nist.gov > 4 Dec 12:04:02 ntpdate[71827]: step time server 66.219.116.140 offset 10= 2.233151 sec > > Note that the below is run from the FreeBSD Host that the Guest is runnin= g on =85 same physical machine =85 we are perfectly in sync: > > # ssh ruralcatholicradio.com date ; date > Wed Dec 4 12:04:32 EST 2013 > Wed Dec 4 17:04:32 UTC 2013 > > An hour later, we=92ve now drifted by almost 2 minutes: > > # ssh ruralcatholicradio.com date ; date > Wed Dec 4 13:07:18 EST 2013 > Wed Dec 4 18:09:16 UTC 2013 > > > Its hard to believe that anyone would be using VirtualBox if it time drif= ted like this regularly, so I figure it has to be something that I=92m doin= g wrong in my configuration =85 > > > Thoughts? Please try setting sysctl kern.eventtimer.idletick=3D1 on the guest machine= . --=20 Mikhail