Bug 727096

Summary: Failed to shutdown RHEL6 guest after resume from S4
Product: Red Hat Enterprise Linux 6 Reporter: Qunfang Zhang <qzhang>
Component: qemu-kvmAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2CC: juzhang, michen, mkenneth, virt-maint, xwei
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-02 01:56:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Screenshot of shutdown none

Description Qunfang Zhang 2011-08-01 10:15:23 UTC
Description of problem:
Boot a RHEL6.1 guest with ide block and e1000 NIC, and then do S4/resume. After guest resume successfully, shutdown guest. But failed. (Screenshot will be attached.)

Version-Release number of selected component (if applicable):
kernel-2.6.32-174.el6.x86_64
qemu-kvm-0.12.1.2-2.175.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1.Boot a RHEL guest.
/usr/libexec/qemu-kvm -m 2G -smp 2 -cpu cpu64-rhel6,+x2apic -usbdevice tablet -drive file=/home/RHEL6.1-32.qcow2,format=qcow2,if=none,id=drive-ide0-0-0,werror=stop,rerror=stop,cache=none -device ide-drive,drive=drive-ide0-0-0,id=ide0-0-0 -netdev tap,id=hostnet0,script=/etc/qemu-ifup -device e1000,netdev=hostnet0,mac=00:10:2a:25:1a:50,bus=pci.0,addr=0x6 -boot dc -uuid e1345e5b-af68-443d-b29a-9d6b3928ac3a -rtc-td-hack -no-kvm-pit-reinjection -monitor stdio -qmp tcp:0:4444,server,nowait -name RHEL6.1 -vnc :10

2.do S4 inside guest.
#echo disk > /sys/power/state

3.Resume guest by boot again with the same command line.

4.After guest resumes, shutdown guest by:
#shutdown -h now
  
Actual results:
Guest stops at the shutdown screen.

Expected results:
Guest should shutdown successfully.

Additional info:
Same problem happens with RHEL6.1-32 and RHEL6.1-64 guest. I will try RHEL5 guest later.
Test windows 2k8-r2 guest, have not meet this issue.

Comment 1 Qunfang Zhang 2011-08-01 10:16:52 UTC
Created attachment 516108 [details]
Screenshot of shutdown

Comment 3 Xiaoqing Wei 2011-08-01 10:58:04 UTC
According to my tests,this is a timer device issue , append "-kvmclock" to -cpu
 option and it will shutdown
without problem 

Best Regards,
Xiaoqing.

Comment 4 Xiaoqing Wei 2011-08-01 11:00:03 UTC
(In reply to comment #0)
> Description of problem:

> Additional info:
> Same problem happens with RHEL6.1-32 and RHEL6.1-64 guest. I will try RHEL5
> guest later.

RHEL5.7-64 guest works when append "clock=pmtmr" to kernel option at booting.

Best Regards,
Xiaoqing.

Comment 5 Xiaoqing Wei 2011-08-02 01:41:31 UTC
(In reply to comment #3)
> According to my tests,this is a timer device issue , append "-kvmclock" to -cpu
>  option and it will shutdown
> without problem 

 -cpu cpu64-rhel6,+x2apic,-kvmclock

 
Best Regards,
Xiaoqing.