Bug 1257511 - [guest agent]Win10 guest no support guest-get-vcpus
[guest agent]Win10 guest no support guest-get-vcpus
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virtio-win (Show other bugs)
7.2
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Yan Vugenfirer
Virtualization Bugs
:
: 970124 (view as bug list)
Depends On:
Blocks: 835616 851497 896690 1113520 883503 918281 918402 924400 970186 970189 977081 977083 977084 977085 1007301 1007307 1007378 1288337
  Show dependency treegraph
 
Reported: 2015-08-27 04:52 EDT by weliao
Modified: 2017-01-06 01:57 EST (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
This update implements the guest-get-vcpus command in the Windows guest agent to return the list of virtual CPUs known to the guest operating system. Previously the command was unsupported.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-01-06 01:57:17 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description weliao 2015-08-27 04:52:02 EDT
Description of problem:
In host cmdline:
{"execute":"guest-get-vcpus"}
{"error": {"desc": "this feature or command is not currently supported"}}


Version-Release number of selected component (if applicable):
3.10.0-309.el7.x86_64
qemu-kvm-rhev-2.3.0-19.el7.x86_64
guest:
qemu-ga-win-7.2.1-1
How reproducible:
100%

Steps to Reproduce:
1.Launch win10-32 guest with virtio serial and start guest agent inside the guest
2.Connect to the chardev socket in host side for sending commands to guest
nc -U /tmp/qga.sock
3.Query and type your requests with following cmd
{"execute":"guest-get-vcpus"}

Actual results:
{"execute":"guest-get-vcpus"}
{"error": {"desc": "this feature or command is not currently supported"}}

Expected results:
{"execute":"guest-get-vcpus"}
{"return": [{"online": true, "can-offline": true, "logical-id": 0}, {"online": true, "can-offline": true, "logical-id": 1}, {"online": true, "can-offline": true, "logical-id": 2}, {"online": true, "can-offline": true, "logical-id": 3}]}


Additional info:
qemu cmd:
/usr/libexec/qemu-kvm -name rhel7.2 -M pc-i440fx-rhel7.2.0,accel=kvm,usb=off,vmport=off -cpu SandyBridge -m 4096 -realtime mlock=off -smp 4 \
-drive file=/mnt/sn1,if=none,id=drive-virtio-disk0,format=qcow2 \
-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x7,drive=drive-virtio-disk0,id=virtio-disk0 \
-boot menu=on \
-netdev tap,id=hostnet0,vhost=on,script=/etc/ovs-ifup,downscript=/etc/ovs-ifdown  \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:55:66:77:88:99,bus=pci.0,addr=0x3 \
-device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vgamem_mb=16,bus=pci.0,addr=0x2 \
-device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 \
-chardev socket,path=/tmp/qga.sock,server,nowait,id=qga0 \
-device virtserialport,bus=virtio-serial0.0,chardev=qga0,name=org.qemu.guest_agent.0 \
-spice port=6600,disable-ticketing, -monitor stdio -qmp tcp:0:4444,server,nowait
Comment 2 weliao 2015-08-27 05:20:28 EDT
{"execute":"guest-info"}
{"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"}]}}
Comment 3 Gal Hammer 2015-11-02 09:51:40 EST
A patch was posted to qemu-devel.
Comment 4 Gal Hammer 2016-03-15 10:13:15 EDT
The patch was accepted upstream and was back-ported and tested.
Comment 5 Mike McCune 2016-03-28 18:39:30 EDT
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune@redhat.com with any questions
Comment 6 Yan Vugenfirer 2016-06-15 03:55:43 EDT
*** Bug 970124 has been marked as a duplicate of this bug. ***
Comment 7 Gu Nini 2016-09-06 00:57:36 EDT
Test on qemu-ga-win-7.3.2-1 shows 'guest-get-vcpus' works now WHILE 'guest-set-vcpus' still not work:


#  nc -U /tmp/qga.sock
{"execute":"guest-get-vcpus"}
{"return": [{"online": true, "logical-id": 0}, {"online": true, "logical-id": 1}, {"online": true, "logical-id": 2}, {"online": true, "logical-id": 3}]}
{"execute":"guest-set-vcpus","arguments":{"vcpus":[{"online":false,"logical-id":0}]}}       
{"error": {"desc": "this feature or command is not currently supported"}}


Detail sw versions:
Host kernel: 3.10.0-496.el7.x86_64
Qemu-kvm-rhev: qemu-kvm-rhev-2.6.0-22.el7.x86_64
Qemu-ga-win: qemu-ga-win-7.3.2-1
virtion-win: virtio-win-1.8.0-4.el7_2
Comment 8 Gal Hammer 2016-09-06 07:21:46 EDT
(In reply to Gu Nini from comment #7)
> Test on qemu-ga-win-7.3.2-1 shows 'guest-get-vcpus' works now WHILE
> 'guest-set-vcpus' still not work:
> 
> 
> #  nc -U /tmp/qga.sock
> {"execute":"guest-get-vcpus"}
> {"return": [{"online": true, "logical-id": 0}, {"online": true,
> "logical-id": 1}, {"online": true, "logical-id": 2}, {"online": true,
> "logical-id": 3}]}
> {"execute":"guest-set-vcpus","arguments":{"vcpus":[{"online":false,"logical-
> id":0}]}}       
> {"error": {"desc": "this feature or command is not currently supported"}}
> 
> 
> Detail sw versions:
> Host kernel: 3.10.0-496.el7.x86_64
> Qemu-kvm-rhev: qemu-kvm-rhev-2.6.0-22.el7.x86_64
> Qemu-ga-win: qemu-ga-win-7.3.2-1
> virtion-win: virtio-win-1.8.0-4.el7_2

AFAIK current Windows version doesn't support CPU hot-unplug, so qga can't support it either.
Comment 9 lijin 2016-09-22 22:36:44 EDT
change component to virtio-win as it's windows guest agent issue.
Comment 10 lijin 2016-09-22 22:40:29 EDT
Hi weliao,
Could you try with latest virtio-win-1.9.0-3.el7?
Thanks
Comment 12 Gu Nini 2016-09-23 02:20:04 EDT
Verify the bug on following sw versions:

Host kernel: 3.10.0-505.el7.x86_64
Qemu-kvm-rhev: qemu-kvm-rhev-2.6.0-24.el7.x86_64
Qemu-ga-win: qemu-ga-win-7.3.2-1
virtion-win: virtio-win-1.9.0-3.el7


# nc -U /tmp/qga.sock
{"execute":"guest-info"}
{"return": {"version": "0.12.1", "supported_commands": [{"enabled": true, "name": "guest-set-user-password"}, {"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"}]}}
{"execute":"guest-get-vcpus"}
{"return": [{"online": true, "logical-id": 0}, {"online": true, "logical-id": 1}, {"online": true, "logical-id": 2}, {"online": true, "logical-id": 3}, {"online": true, "logical-id": 4}, {"online": true, "logical-id": 5}, {"online": true, "logical-id": 6}, {"online": true, "logical-id": 7}, {"online": true, "logical-id": 8}, {"online": true, "logical-id": 9}, {"online": true, "logical-id": 10}, {"online": true, "logical-id": 11}, {"online": true, "logical-id": 12}, {"online": true, "logical-id": 13}, {"online": true, "logical-id": 14}, {"online": true, "logical-id": 15}]}
{"execute":"guest-set-vcpus","arguments":{"vcpus":[{"online":false,"logical-id":0}]}}
{"error": {"desc": "this feature or command is not currently supported"}}
Comment 13 lijin 2017-01-06 01:57:17 EST
close as this issue has already been fixed in rhel7.3 virtio-win package

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