After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 674035 - gnome-boxes should set 'magic' clock parameters for kvm guests
gnome-boxes should set 'magic' clock parameters for kvm guests
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-04-13 09:37 UTC by Christophe Fergeau
Modified: 2016-03-31 14:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Set timer policies in libvirt configuration (1.30 KB, patch)
2012-05-31 12:40 UTC, Christophe Fergeau
committed Details | Review

Description Christophe Fergeau 2012-04-13 09:37:31 UTC
From https://bugzilla.redhat.com/show_bug.cgi?id=750773#c35 :

"Daniel Berrange 2012-04-12 10:43:27 EDT

It wouldn't surprise me if all the random hangs seen with Win7 and KVM are due
to clock timing issues. Windows 7 is particularly sensitive to inaccurate
interrupt delivery for PIT/RTC. To obtain stability mgmt apps should set the
following config params when running KVM guests:

<clock offset="utc">   (change 'utc' to 'localtime' for Windows)
   <timer name="rtc" tickpolicy="catchup"/>
   <timer name="pit" tickpolicy="delay"/>
</clock>

Although this is important for Windows, it doesn't harm other OS, so it is
reasonable to set these for all.

Unfortunately, AFAIK, none of virt-install, virt-manager or GNOME Boxes
currently set this."
Comment 1 Christophe Fergeau 2012-04-13 09:37:54 UTC
(this needs libvirt-glib work first)
Comment 2 Christophe Fergeau 2012-05-31 12:40:35 UTC
Created attachment 215328 [details] [review]
Set timer policies in libvirt configuration

Windows 7 is quite sensitive to the libvirt timer configuration while
other OSes don't care. Configuring the RTC timer to 'catchup' and
the PIT timer to 'delay' seems to help with some freezes during
Windows 7 boot that I'm seeing.
Comment 3 Marc-Andre Lureau 2012-05-31 13:08:50 UTC
Have you looked at a backtrace of qemu when it freezes?
Comment 4 Christophe Fergeau 2012-05-31 13:39:00 UTC
Nope, happened quite late yesterday, the symptoms were similar to https://bugzilla.redhat.com/show_bug.cgi?id=812313
I'll try to reproduce and get a backtrace.
Comment 5 Zeeshan Ali 2012-05-31 15:19:05 UTC
Review of attachment 215328 [details] [review]:

Looks good otherwise but please do test if this somehow breaks other OSs.

::: src/vm-configurator.vala
@@ -36,2 +36,5 @@
         else
             clock.set_offset (DomainClockOffset.UTC);
+
+        DomainTimer timer = new DomainTimerRtc ();
+        timer.set_tick_policy(DomainTimerTickPolicy.CATCHUP);

nitpick: "(" -> " ("

@@ +41,3 @@
+        clock.add_timer (timer);
+        timer = new DomainTimerPit ();
+        timer.set_tick_policy(DomainTimerTickPolicy.DELAY);

same here
Comment 6 Christophe Fergeau 2012-06-01 13:43:43 UTC
(In reply to comment #5)
> Review of attachment 215328 [details] [review]:
> 
> Looks good otherwise but please do test if this somehow breaks other OSs.

The fedora installer works as usual
Comment 7 Zeeshan Ali 2012-06-01 14:45:10 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > Review of attachment 215328 [details] [review] [details]:
> > 
> > Looks good otherwise but please do test if this somehow breaks other OSs.
> 
> The fedora installer works as usual

ACK then, assuming you corrected the nictpicks I pointed out.
Comment 8 Christophe Fergeau 2012-06-01 20:12:05 UTC
Attachment 215328 [details] pushed as e27ec72 - Set timer policies in libvirt configuration