Bug 705254 - Time drift on rhel5.7 guest when savevm/loadvm
Time drift on rhel5.7 guest when savevm/loadvm
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kvm (Show other bugs)
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Virtualization Maintenance
Virtualization Bugs
Depends On:
Blocks: Rhel5KvmTier1
  Show dependency treegraph
Reported: 2011-05-17 03:12 EDT by Mike Cao
Modified: 2011-07-17 08:48 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2011-07-17 08:48:36 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Mike Cao 2011-05-17 03:12:01 EDT
Description of problem:

Version-Release number of selected component (if applicable):
Host info
# uname -r
[root@t1 ~]# rpm -q kmv
package kmv is not installed
[root@t1 ~]# rpm -q kvm

Guest info:
# uname -r

How reproducible:

Steps to Reproduce:
1.sync host's clock with ntpserver
2.start VM
/usr/libexec/qemu-kvm -M rhel5.6.0 -m 2G -smp 4,sockets=4,cores=1,threads=1 -name VM -uuid 02b8079c-cca0-ae65-c63a-a2aa4119497d -monitor stdio -no-kvm-pit-reinjection -rtc-td-hack -usbdevice tablet -startdate now -boot c -drive file=/home/rhel5_7_64.qcow2,if=virtio,format=qcow2,werror=stop,cache=none,boot=on -net nic,macaddr=54:52:40:33:4c:58,vlan=0,model=virtio -net tap -usb -vnc :1 -k en-us -balloon virtio -notify all -no-hpet
3.check clock drift in the guest 
  ---->Actual Result of this step:no time drift
4.(qemu)savevm  ,after that check clock drift of guest  
  ---->Actual Result of this step: no time drift
5.(qemu)loadvm 1 ,after that check clock drift of guest
Actual results:
after step5,
# ntpdate -q clock.redhat.com
server, stratum 1, offset 3443.028276, delay 0.31119
17 May 02:04:43 ntpdate[3474]: step time server offset 3443.028276 sec

Expected results:
time drift should less than 5 secs

Additional info:
1.guest use kvm clocksource
2.Tried with clock=tsc in the guest ,hit the same issue.
3.Host use TSC clocksource
4.Not sure whether this one is same as Bug 703335, reported in case of missing bug.
Comment 2 Mike Cao 2011-05-17 05:16:00 EDT
Windows 2003R2sp2 64 bit guest hit the same issue .
Comment 3 Zachary Amsden 2011-05-17 12:11:08 EDT
This absolutely need to be investigated, it's not a RHEL 5.X bug, it's a problem with time keeping in the hypervisor instead - using KVM clock, guest time should stay caught up to real time.

Windows guests and TSC based timekeeping problems are interesting and possibly related, but most definitely not the same bug.  Windows may not immediately catch back up to real time, and TSC based timekeeping may fail for a number of reasons to catch back up the real time.

This should remain open to track why guests using kvm-clock are not catching back up to real time immediately, which is supposed to be the advantage of KVM clock over other clocksources to begin with.
Comment 4 Mike Cao 2011-05-18 02:52:14 EDT
(In reply to comment #2)
> Windows 2003R2sp2 64 bit guest hit the same issue .

in comment #0 step4
for linux guest ,no time drift occurs
for windows guest ,time drift occures 

So windows guest time drift related to guest (qemu)stop instead of (qemu)savevm
more info ,referring to Bug 705686
Comment 5 Zachary Amsden 2011-06-21 21:22:50 EDT
This is almost certainly a dup of 694398, although it may need to be tracked separately to get the fix into a different release.
Comment 7 Ronen Hod 2011-07-17 08:48:36 EDT
There are other time-drift bugs, and this one saveVm+loadvm is not critical, nor it is reported by a customer, so I close it.

Note You need to log in before you can comment on or make changes to this bug.