Bug 870439 - qemu-ga: win32: isa-serial port doesn't work
qemu-ga: win32: isa-serial port doesn't work
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Yan Vugenfirer
Virtualization Bugs
Depends On:
Blocks: 1062519 1073208 1164706
  Show dependency treegraph
Reported: 2012-10-26 09:37 EDT by Luiz Capitulino
Modified: 2014-11-17 03:20 EST (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1062519 1164706 (view as bug list)
Last Closed: 2014-06-13 06:52:41 EDT
Type: Bug
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 Luiz Capitulino 2012-10-26 09:37:08 EDT
Description of problem:

Serial port support in qemu-ga for Windows has two bugs that prevent it from working:

 1. qemu-ga -m option only accepts virtio-serial

 2. even when getting item 1 fixed, qemu-ga doesn't communicate over isa-serial (tested only on Windows 2008)

This happens with upstream (head a8170e5e97) and qemu-kvm-

How reproducible:

Steps to Reproduce:
1. Start a Windows guest with serial port setup, then run qemu-ga.exe:

C:\qemu-ga -m isa-serial -p COM1

2. In the host, open the serial port unix socket (assuming you have configured it that way):

# rlwrap -C qmp socat STDIO UNIX:/var/lib/libvirt/qemu/qga.sock

3. Try to send some command to qemu-ga:

{ "execute": "guest-info" }
Actual results:
qemu-ga doesn't respond

Expected results:
qemu-ga responds to commands

Additional info:

1. I've built qemu-ga.exe from sources and copied it to the Windows VM.

2. You can test if isa-serial port is working by opening hyperterminal on COM1 and type some string and see it on host (or vice-versa)
Comment 1 Luiz Capitulino 2012-10-26 13:13:34 EDT
Let me emphasize that I've tested only on Windows 2008. This could work in other versions of Windows (although I really doubt it does).
Comment 2 Miki Mishael 2014-01-05 13:06:10 EST

I have made a patch to upstream:
Comment 3 Miki Mishael 2014-02-05 15:05:46 EST
Update to V2:

(In reply to Miki Mishael from comment #2)
> Hi,
> I have made a patch to upstream:
> http://lists.nongnu.org/archive/html/qemu-devel/2014-01/msg00227.html
Comment 8 Qunfang Zhang 2014-02-20 05:39:44 EST
This bug could be verified pass on qemu-ga-win-7.0.5. 

1. Boot up guest with isa serial:

#  /usr/libexec/qemu-kvm -cpu SandyBridge -M pc -enable-kvm -m 2048 -smp 2,sockets=2,cores=1,threads=1 -name rhel6.4-64 -uuid 9a0e67ec-f286-d8e7-0548-0c1c9ec93009 -nodefconfig -nodefaults -monitor stdio -rtc base=utc,clock=host,driftfix=slew -no-kvm-pit-reinjection -no-shutdown -drive file=/root/win7-32-virtio.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=none -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -drive if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev tap,id=hostnet0,vhost=on -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:d5:51:8a,bus=pci.0,addr=0x3 -chardev socket,id=charserial0,server,nowait,path=/tmp/isa-serial -device isa-serial,chardev=charserial0,id=serial0  -vnc :10 -vga std  -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6 -qmp tcp:0:5555,server,nowait -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0

2. Install qemu-ga-win msi.

3. Inside guest:
$ qemu-ga.ext -m isa-serial -p COM1

4. On host:
# nc -U /tmp/isa-seiral

5. Send some commands to guest in the terminal of step 4. 

[root@localhost ~]# nc -U /tmp/isa-serial 

{"return": {}}

{"return": {"version": "0.12.1", "supported_commands": [{"enabled": true, "name": "guest-set-vcpus"}, {"enabled": true, "name": "guest-get-vcpus"}, {"enabled": true, "name": "guest-network-get-interfaces"}, {"enabled": true, "name": "guest-suspend-hybrid"}, {"enabled": true, "name": "guest-suspend-ram"}, {"enabled": true, "name": "guest-suspend-disk"}, {"enabled": true, "name": "guest-fstrim"}, {"enabled": true, "name": "guest-fsfreeze-thaw"}, {"enabled": true, "name": "guest-fsfreeze-freeze"}, {"enabled": true, "name": "guest-fsfreeze-status"}, {"enabled": true, "name": "guest-file-flush"}, {"enabled": true, "name": "guest-file-seek"}, {"enabled": true, "name": "guest-file-write"}, {"enabled": true, "name": "guest-file-read"}, {"enabled": true, "name": "guest-file-close"}, {"enabled": true, "name": "guest-file-open"}, {"enabled": true, "name": "guest-shutdown"}, {"enabled": true, "name": "guest-info"}, {"enabled": true, "name": "guest-set-time"}, {"enabled": true, "name": "guest-get-time"}, {"enabled": true, "name": "guest-ping"}, {"enabled": true, "name": "guest-sync"}, {"enabled": true, "name": "guest-sync-delimited"}]}}

{"error": {"desc": "Invalid parameter type, expected: integer"}}

  {"execute":"guest-sync", "arguments":{"id":1234}}
{"return": 1234}

{"execute":"guest-sync-delimited", "arguments":{"id":1234}}
�{"return": 1234}
{ "execute":"guest-shutdown","arguments":{"mode":"reboot"}} ==> Guest reboots here. 

I also tried to reproduce it with older version qemu-ga-win-7.0.1 and qemu-ga-win-7.0.2, but it fails to install and prompts "RegisterProvider failed. (Error:80042303)(null)". 

As in the latest qemu-ga-win-7.0.5, it could be installed successfully and isa-serial port works well. So I will verified this bug.
Comment 9 Ludek Smid 2014-06-13 06:52:41 EDT
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.

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