From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54954) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTGh7-0004RC-Hb for qemu-devel@nongnu.org; Thu, 27 Mar 2014 16:14:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WTGh0-0007Vc-3U for qemu-devel@nongnu.org; Thu, 27 Mar 2014 16:14:33 -0400 Received: from moutng.kundenserver.de ([212.227.126.130]:59093) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTGgz-0007VQ-QN for qemu-devel@nongnu.org; Thu, 27 Mar 2014 16:14:26 -0400 Message-ID: <5334869D.50707@rdsoftware.de> Date: Thu, 27 Mar 2014 21:14:21 +0100 From: Erik Rull MIME-Version: 1.0 References: <5333E41E.2050803@rdsoftware.de> <5333F2C5.4020301@redhat.com> In-Reply-To: <5333F2C5.4020301@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Missing guest clock-sync on Host clock change List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laszlo Ersek , "qemu-devel@nongnu.org" Laszlo Ersek wrote: > On 03/27/14 09:41, Erik Rull wrote: >> Hi all, >> >> I would like to have the guest "drifting" to a new set clock on the host. >> >> My problem is the following: >> >> - Host System (Linux) starts up, hwclock and kernel time are synced, >> guest starts up with -rtc clock=host,driftfix=slew (which I assume >> should fix any drift issue on ACPI compatible guest OSes) >> - Host System kernel time drifts against the hwclock (jiffies timer due >> to no other available useful timer on SMP systems - core2duo has no hpet!) >> - calling "hwclock -s" on the host resyncs the kernel time with the >> hwclock, so "date" and "hwclock" show the same again >> - the guest stays at the "old" kernel time before the sync - also after >> 1 hour the delta is still the same, so no sync or slew is done :-( >> >> My guest OS is Windows 8, which must have ACPI enabled, otherwise it >> will not work. >> >> Any ideas how to proceed? Maybe some command line parameters are wrong? >> >> I need this resync for the guest due to external synchronization - it >> must not be millisecond-precise, but a 9 seconds shift during a run >> overnight is too much! > > My take: the hardware clock (the RTC) in the guest has correct value, > but the guest OS system time os not refreshed from it. Install the guest > agent in Windows, and call its "guest-set-time" command (with virsh > qemu-agent-command, or otherwise). Do not pass any argument for the > optional "time" parameter; this way the guest will sync its kernel time > from its RTC. > > See: > - qga/qapi-schema.json, "guest-set-time", > - qga/commands-win32.c, qmp_guest_set_time() > > In any case this is just a guess. > > Laszlo > Hi Laszlo, thanks, I will try that, but might take some time, because the changes for the qemu-ga are bigger to activate. Is there a possiblity to set the RTC of the guest automatically in sync with the host hardware RTC? I didn't find a parameter for that. Best regards, Erik