Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1519610 - The rtc time of guest can't stop when pausing guest if set clock=vm from config file
Summary: The rtc time of guest can't stop when pausing guest if set clock=vm from conf...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.5
Hardware: All
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Marcelo Tosatti
QA Contact: Sitong Liu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-12-01 02:25 UTC by Xujun Ma
Modified: 2018-01-17 18:45 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-01-17 18:45:21 UTC


Attachments (Terms of Use)

Description Xujun Ma 2017-12-01 02:25:21 UTC
Description of problem:
The rtc time of guest can't stop when pausing guest if set clock=vm from config file

Version-Release number of selected component (if applicable):
kernel-4.14.0-7.el7a.ppc64le 
qemu-kvm-rhev-2.10.0-9.el7.ppc64le 
How reproducible:
100%

Steps to Reproduce:
1.cat a.cfg
[rtc]
  base = "utc"
  clock = "vm"
[device "tablet"]
  driver = "usb-tablet"
2.Boot up guest with commands:
/usr/libexec/qemu-kvm \
 -smp 4 \
 -m 4096 \
 -vnc :59 \
 -vga std \
 -nodefaults \
 -device nec-usb-xhci,id=xhci \
 -device usb-kbd,id=kbd \
 -device virtio-scsi-pci,bus=pci.0 \
 -device scsi-hd,id=scsi-hd0,drive=scsi-hd0-dr0,bootindex=0 \
 -drive file=rhel75-64-virtio-scsi.qcow2,if=none,id=scsi-hd0-dr0,format=qcow2,cache=none \
 -monitor stdio \
 -readconfig a.cfg \
3.show the time in guest
# timedatectl 
      Local time: Fri 2017-12-01 10:19:49 CST
  Universal time: Fri 2017-12-01 02:19:49 UTC
        RTC time: Fri 2017-12-01 02:19:49
       Time zone: Asia/Shanghai (CST, +0800)
     NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
      DST active: n/a

4.stop vm a moment in hmp
(hmp)stop
5.resume vm then check rtc time in guest
(hmp)c
# timedatectl 
      Local time: Fri 2017-12-01 10:19:49 CST
  Universal time: Fri 2017-12-01 02:19:49 UTC
        RTC time: Fri 2017-12-01 02:20:21
       Time zone: Asia/Shanghai (CST, +0800)
     NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
      DST active: n/a


Actual results:
The rtc time of guest can't stop when pausing guest if set clock=vm from config file

Expected results:
The rtc time of guest can stop when pausing guest if set clock=vm from config file

Additional info:

The same issue on x86 platfo

Comment 2 Xujun Ma 2017-12-01 04:54:33 UTC
Reproduced this bug on x86 platform with qemu-kvm-rhev-2.10.0-6.el7.x86_64

Comment 3 Xujun Ma 2017-12-01 08:21:44 UTC
(In reply to Xujun Ma from comment #2)
> Reproduced this bug on x86 platform with qemu-kvm-rhev-2.10.0-6.el7.x86_64

Host kernel:3.10.0-792.el7.x86_64
Guest kernel:3.10.0-782.el7.x86_64

Comment 4 Sitong Liu 2017-12-01 13:38:33 UTC
Hi,

Tested in my host, this issue didn't occur when booting a guest with qemu command:
/usr/libexec/qemu-kvm \
-smp 4 \
-m 4096 \
-vnc :59 \
-vga std \
-nodefaults \
-device nec-usb-xhci,id=xhci \
-device usb-kbd,id=kbd \
-device virtio-scsi-pci,bus=pci.0 \
-device scsi-hd,id=scsi-hd0,drive=scsi-hd0-dr0,bootindex=0 \
-drive file=/home/kvm_autotest_root/images/rhel75-64-virtio.qcow2,if=none,id=scsi-hd0-dr0,format=qcow2,cache=none \
-rtc base=utc,clock=vm \
 ^^^^^^^^^^^^^^^^^^^^^^
-device usb-tablet \
-monitor stdio \ 

And occured when booting with commands:

/usr/libexec/qemu-kvm \
 -smp 4 \
 -m 4096 \
 -vnc :59 \
 -vga std \
 -nodefaults \
 -device nec-usb-xhci,id=xhci \
 -device usb-kbd,id=kbd \
 -device virtio-scsi-pci,bus=pci.0 \
 -device scsi-hd,id=scsi-hd0,drive=scsi-hd0-dr0,bootindex=0 \
 -drive file=rhel75-64-virtio-scsi.qcow2,if=none,id=scsi-hd0-dr0,format=qcow2,cache=none \
 -monitor stdio \
 -readconfig a.cfg \
 ^^^^^^^^^^^^^^^^^

My test env:
qemu-kvm-rhev-2.10.0-9.el7.x86_64
host kernel: 3.10.0-757.el7.x86_64
guest kernel: 3.10.0-757.el7.x86_64

Comment 8 Marcelo Tosatti 2018-01-17 18:45:21 UTC
The realtime clock of a physical server does not stop if the machine is suspended or powered off, therefore i dont see why the emulated RTC should stop.

So closing this bug as wontfix unless someone can give a reason as to why RTC should stop when guest is stopped


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