Bug 1035108
Summary: | Implement the error message while plug more CPUs than set in "current" using the guest agent | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | zhenfeng wang <zhwang> | |
Component: | libvirt | Assignee: | Peter Krempa <pkrempa> | |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Virtualization Bugs <virt-bugs> | |
Severity: | low | Docs Contact: | ||
Priority: | low | |||
Version: | 7.0 | CC: | acathrow, ajia, chao.zhou, dyuan, gsun, hliu, mzhan, pkrempa, shyu, yang.z.zhang, ydu | |
Target Milestone: | rc | |||
Target Release: | --- | |||
Hardware: | x86_64 | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | libvirt-1.1.1-14.el7 | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1035109 (view as bug list) | Environment: | ||
Last Closed: | 2014-06-13 12:07:50 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: | 1035109 |
Description
zhenfeng wang
2013-11-27 05:48:52 UTC
Fixed upstream: commit 34b8449027adc44bd38151f384f5a5cdd64d996f Author: Peter Krempa <pkrempa> Date: Thu Dec 5 17:47:14 2013 +0100 qemu: Improve error when setting invalid count of vcpus via agent https://bugzilla.redhat.com/show_bug.cgi?id=1035108 When attempting to enable more vCPUs in the guest than is currently enabled in the guest but less than the maximum count for the VM we currently reported an unhelpful message: error: internal error: guest agent reports less cpu than requested This patch changes it to: error: invalid argument: requested vcpu count is greater than the count of enabled vcpus in the domain: 3 > 2 This bug is VERIFIED. Verification steps: Same as https://bugzilla.redhat.com/show_bug.cgi?id=1035108#c0 When calling: # setvcpus rhel7 --guest 2 Results for libvirt-1.1.1-13.el7: error: internal error: guest agent reports less cpu than requested Results for libvirt-1.1.1-14.el7: error: invalid argument: requested vcpu count is greater than the count of enabled vcpus in the domain: 2 > 1 So this patch is verified to fix the unhelpful message. Hi, after hotadd the vcpu, # virsh setvcpus rhel7 --guest 2 error: internal error: guest agent reports less cpu than requested # virsh vcpucount rhel7 --guest 1 why vcpucount still report guest has 1 vcpu? should it be 3? (In reply to chao.zhou from comment #6) > Hi, after hotadd the vcpu, > # virsh setvcpus rhel7 --guest 2 > error: internal error: guest agent reports less cpu than requested > > # virsh vcpucount rhel7 --guest > 1 > > why vcpucount still report guest has 1 vcpu? should it be 3? http://www.libvirt.org/formatdomain.html#elementsCPUAllocation the optional attribute current can be used to specify whether fewer than the maximum number of virtual CPUs should be enabled. (In reply to dyuan from comment #7) > (In reply to chao.zhou from comment #6) > Hi, after hotadd the vcpu, > # > virsh setvcpus rhel7 --guest 2 > error: internal error: guest agent reports > less cpu than requested > > # virsh vcpucount rhel7 --guest > 1 > > why > vcpucount still report guest has 1 vcpu? should it be 3? > http://www.libvirt.org/formatdomain.html#elementsCPUAllocation the optional > attribute current can be used to specify whether fewer than the maximum > number of virtual CPUs should be enabled. # virsh dumpxml rhel7 |grep cpu -A 3 <vcpu placement='static' current='1'>3</vcpu> This means the maximum number of vCPUs is 3, and the guest boots up with 1 online vCPU. # virsh setvcpus rhel7 --guest 2 This means to set the vCPU number to 2 which is less than the maximum number 3. But why the vcpucount number is still 1? Is hot-add vCPU is not supported? Please correct me if I'm thinking the wrong way. Thanks. (In reply to chao.zhou from comment #8) > (In reply to dyuan from comment #7) > > (In reply to chao.zhou from comment #6) > > Hi, after hotadd the vcpu, > > # > > virsh setvcpus rhel7 --guest 2 > > error: internal error: guest agent reports > > less cpu than requested > > > > # virsh vcpucount rhel7 --guest > > 1 > > > > why > > vcpucount still report guest has 1 vcpu? should it be 3? > > http://www.libvirt.org/formatdomain.html#elementsCPUAllocation > the optional > > attribute current can be used to specify whether fewer than the maximum > > number of virtual CPUs should be enabled. > > # virsh dumpxml rhel7 |grep cpu -A 3 > <vcpu placement='static' current='1'>3</vcpu> > > This means the maximum number of vCPUs is 3, and the guest boots up with 1 > online vCPU. > > # virsh setvcpus rhel7 --guest 2 > > This means to set the vCPU number to 2 which is less than the maximum number > 3. But why the vcpucount number is still 1? Is hot-add vCPU is not > supported? > Please correct me if I'm thinking the wrong way. > > Thanks. The virsh setvcpus --guest command only change the cpu numbers in the guest instead of the the hypervisor, you can find it via in virsh man page, so the cpu numbers in the guest's xml wasn't changed. In fact, you can check it with the following method 1.login the guest ,check the guest's cpu with #cat /proc/cpuinfo command 2.check the cpu numbers with the virsh command in the host #virsh vcpucount $guest_name --guest 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. |