Bug 888694

Summary: [virtio-win][vioser]Windows guest agent service has to be restarted to make it work again after resume from S3/S4
Product: Red Hat Enterprise Linux 7 Reporter: Qunfang Zhang <qzhang>
Component: virtio-winAssignee: Gal Hammer <ghammer>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: acathrow, amit.shah, areis, bcao, bsarathy, ghammer, jcody, juzhang, lnovich, michen, mkenneth, qzhang, rhod, shyu, sluo, virt-maint
Target Milestone: rc   
Target Release: 7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: virtio-win-prewhql-0.1-75 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 11:15:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 923626, 1073208    

Description Qunfang Zhang 2012-12-19 09:25:32 UTC
Description of problem:
Install windows guest agent and start the service and then implement S3 or S3, the guest agent is not available any more. No response after send command to guest agent. I have to restart the qemu-ga service to make it work again.
Tried RHEL guest, this issue does not exist.

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

Guest:
Win7-32 and win2012, installed the executable from qemu-guest-agent-win32-0.12.1.2-2.346.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Boot a guest
 /usr/libexec/qemu-kvm -M rhel6.4.0 -enable-kvm -m 2048 -smp 2,sockets=2,cores=1,threads=1 -enable-kvm -name t2-rhel6.4-32 -uuid 61b6c504-5a8b-4fe1-8347-6c929b750dde -k en-us -rtc base=localtime,clock=host,driftfix=slew -no-kvm-pit-reinjection -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device usb-tablet,id=input0 -drive file=/home/win7-32.qcow2,if=none,id=disk0,format=qcow2,werror=stop,rerror=stop,aio=native -device ide-drive,bus=ide.0,unit=1,drive=disk0,id=disk0  -drive file=/home/en_windows_7_ultimate_with_sp1_x86_dvd_619077.iso,if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,drive=drive-ide0-1-0,bus=ide.1,unit=0,id=cdrom -netdev tap,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=44:37:E6:5E:91:85,bus=pci.0,addr=0x5 -monitor stdio -qmp tcp:0:6666,server,nowait -chardev socket,path=/tmp/isa-serial,server,nowait,id=isa1 -device isa-serial,chardev=isa1,id=isa-serial1 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x8 -chardev socket,id=charchannel0,path=/tmp/serial-socket,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.rhevm.vdsm -chardev socket,path=/tmp/foo,server,nowait,id=foo -device virtconsole,chardev=foo,id=console0 -chardev spicevmc,id=charchannel1,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,id=channel1,name=com.redhat.spice.0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x9 -spice port=5930,disable-ticketing -vga qxl -global qxl-vga.vram_size=67108864 -k en-us -boot c -chardev socket,path=/tmp/qga.sock,server,nowait,id=qga0 -device virtserialport,bus=virtio-serial0.0,chardev=qga0,name=org.qemu.guest_agent.0  -global  PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0

2. Install the qemu-guest-agent-win32-0.12.1.2-2.346.el6.x86_64 on a rhel host and get the executable.

3. Install the qemu-ga.exe inside windows guest.
#c:\qemu-ga>qemu-ga.exe --service install

4. In guest:
In guest, open "services.msc" and check if qemu-ga service is started. If not, start the qemu-ga service.

5. Suspend guest to mem or disk.
# nc -U /tmp/qga.sock 
{ "execute": "guest-ping"}
{"return": {}}
{ "execute": "guest-sync-delimited", "arguments": { "id": 123456 } }
�{"return": 123456}
{ "execute": "guest-suspend-ram" } or { "execute": "guest-suspend-disk" } 


6. After guest resume, send command to guest agent again.
# nc -U /tmp/qga.sock 
{ "execute": "guest-ping"}
{ "execute": "guest-sync-delimited", "arguments": { "id": 123456 } }

  
Actual results:
After step 6, no response. Need to restart qemu-ga service inside guest to make sure the guest agent works again.

Expected results:
After step 6, guest agent should still work.

Additional info:
If disable guest agent and start qemu-ga.exe manually, after resume from guest, there's some error print out. In the meanwhile, guest agent has no response after send some command to it. Need to interrupt the qemu-ga.exe and re-start again.

c:\qemu-ga>qemu-ga.exe -m virtio-serial
1355965843.421875: critical: channel error, removing source

Comment 2 RHEL Program Management 2012-12-24 06:47:55 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 10 Gal Hammer 2013-10-01 14:12:29 UTC
Which version of the virtio-serial driver is used?

Comment 11 Qunfang Zhang 2013-10-09 09:15:45 UTC
(In reply to Gal Hammer from comment #10)
> Which version of the virtio-serial driver is used?

Gal,

I can not rem which version of the virtio-serial driver was used at that time, so I re-test again with the latest virtio-serial in virtio-win-prewhql-72. And the problem still exist. 

Host version:
[root@localhost ~]# uname -r
2.6.32-422.el6.x86_64
[root@localhost ~]# rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.411.el6.x86_64

Guest:
(1) virtio-serial: From virtio-win-prewhql-72
(2) qemu-ga: Use the qemu-ga.exe extracted from qemu-kvm-389 because can not use the latest qemu-ga Yan provided in bug 971141.

CLI:

#  /usr/libexec/qemu-kvm -M rhel6.5.0 -enable-kvm -m 2048 -smp 2,sockets=2,cores=1,threads=1 -enable-kvm -name t2-rhel6.4-32 -uuid 61b6c504-5a8b-4fe1-8347-6c929b750dde -k en-us -rtc base=localtime,clock=host,driftfix=slew -no-kvm-pit-reinjection -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device usb-tablet,id=input0 -drive file=/home/win7-32-virtio.qcow2,if=none,id=disk0,format=qcow2,werror=stop,rerror=stop,aio=native -device ide-drive,bus=ide.0,unit=1,drive=disk0,id=disk0  -drive if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,drive=drive-ide0-1-0,bus=ide.1,unit=0,id=cdrom -netdev tap,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=44:37:E6:5E:91:85,bus=pci.0,addr=0x5 -monitor stdio -qmp tcp:0:6666,server,nowait -chardev socket,path=/tmp/isa-serial,server,nowait,id=isa1 -device isa-serial,chardev=isa1,id=isa-serial1 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x8 -chardev socket,id=charchannel0,path=/tmp/serial-socket,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.rhevm.vdsm -chardev socket,path=/tmp/foo,server,nowait,id=foo -device virtconsole,chardev=foo,id=console0 -chardev spicevmc,id=charchannel1,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,id=channel1,name=com.redhat.spice.0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x9 -spice port=5930,disable-ticketing -vga qxl -global qxl-vga.vram_size=67108864 -k en-us -boot c -chardev socket,path=/tmp/qga.sock,server,nowait,id=qga0 -device virtserialport,bus=virtio-serial0.0,chardev=qga0,name=org.qemu.guest_agent.0  -global  PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0

Comment 12 Gal Hammer 2013-12-19 14:06:21 UTC
The virtio-serial driver caused this behavior and a patch which fix this issue was posted.

Comment 14 Sibiao Luo 2014-03-11 04:52:33 UTC
*** Bug 1074824 has been marked as a duplicate of this bug. ***

Comment 15 Mike Cao 2014-03-11 05:24:09 UTC
Move it to virtio-win based on comment #12.

Comment 16 Ronen Hod 2014-03-16 14:00:28 UTC
Moving this bug from RHEL6.6 to RHEL7.0 in order to comply with our current process (everything is RHEL7).
It is a virtio-win bug fix, that will be included in the RHEL7 package, so it needs the blocker+ flag.

Comment 17 Sibiao Luo 2014-03-21 07:49:15 UTC
Reproduce this issue as following.
see bug 1074824#c0.

host info:
3.10.0-113.el7.x86_64
qemu-kvm-1.5.3-53.el7.x86_64
guest info:
win7-64bit
qemu-ga-win-7.0-7
virtio-win-prewhql-0.1-74 

Verify this issue as following.
host info:
3.10.0-113.el7.x86_64
qemu-kvm-1.5.3-53.el7.x86_64
guest info:
win7-64bit
qemu-ga-win-7.0-7
virtio-win-prewhql-0.1-75 

Results:
It can continue to execute any virtagent commands correctly after do "guest-suspend-disk/ram".

# nc -U /tmp/qga.sock
{"execute": "guest-ping"}
{"return": {}}
{ "execute": "guest-suspend-ram"}       <--------------
{"execute": "guest-ping"}        
{"return": {}}
{ "execute": "guest-suspend-disk" }     <--------------

Ncat: Broken pipe.
# nc -U /tmp/qga.sock
{"execute": "guest-ping"}
{"return": {}}

Base on above, this issue has been fixed correctly, move to VERIFIED status.

Best Regards,
sluo

Comment 18 Ludek Smid 2014-06-13 11:15:09 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.