RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 834365 - Improve error message when trying to change VM's processor count to 0
Summary: Improve error message when trying to change VM's processor count to 0
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.3
Hardware: Unspecified
OS: Linux
medium
low
Target Milestone: rc
: ---
Assignee: Peter Krempa
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-21 16:28 UTC by Peter Krempa
Modified: 2013-02-21 07:18 UTC (History)
10 users (show)

Fixed In Version: libvirt-0.9.13-3.el6
Doc Type: Bug Fix
Doc Text:
Clone Of: 832946
Environment:
Last Closed: 2013-02-21 07:18:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0276 0 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2013-02-20 21:18:26 UTC

Description Peter Krempa 2012-06-21 16:28:38 UTC
+++ This bug was initially created as a clone of Bug #832946 +++

Description of problem:
Use setvcpus to hotplug vcpu for a guest, then the guest's CPU usage is 100% and guest hang there.
BTW, if set vcpu number to 0, it seems the error message is not correct.

Version-Release number of selected component (if applicable):
libvirt-0.9.10-21.el6_3.1.x86_64&libvirt-0.9.10-21.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.295.el6.x86_64
kernel-2.6.32-276.el6.x86_64


How reproducible:
100%

Steps to Reproduce:
1. Set the maximum cpu number to 4
#virsh dumpxml test
......
<vcpu placement='static' current='1'>4</vcpu>
.....
2. hotplug vcpus 
#virsh setvcpus test 2 

check the guest xml again
#virsh dumpxml test
......
<vcpu placement='static' current='2'>4</vcpu>
.....

3. After add step2, guest's CPU usage up to 100% and cann't conduct any operation in guest.

4. set vcpus to 0
# virsh setvcpus  test 0
error: invalid argument: virDomainSetVcpus
  
Actual results:
As steps 3&4.

Expected results:
Hotplug vcpu can succeed, and the error message should be improved when set vcpu to 0.

Additional info:
No error meesages in libvirtd.log

--- Additional comment from ydu on 2012-06-18 11:43:30 CEST ---

This bug can always reproduced with rhel6.2 guest(release version), but can't reproduce with rhel6.3 guest.

--- Additional comment from pkrempa on 2012-06-18 12:18:02 CEST ---

There's either a bug or the the guest OS is missing support for CPU hotplug, so that it cannot handle the CPU that has emerged in the emulated system. This part of this bug isn't a problem with libvirt. 

As of the error message, that probably is worth tweaking a little bit.

Comment 1 Peter Krempa 2012-06-21 16:30:38 UTC
Creating a clone of the original bug to track improvement of the error message.

Comment 2 Peter Krempa 2012-06-22 08:49:54 UTC
Error message improved upstream with two commits:

commit d91f3ef49741f1b9143865ff6ef9e2119fbeccc2
Author: Daniel P. Berrange <berrange>
Date:   Fri May 25 18:41:07 2012 +0100

    Santize the reporting of VIR_ERR_INVALID_ERROR

improving API error messages and 

commit de924ca90a0ff1ad8adeab460761f65b7a742d72
Author: Peter Krempa <pkrempa>
Date:   Thu Jun 21 18:34:32 2012 +0200

    virsh: Improve error when trying to change vm's cpu count 0

to point out the error directly without the need for the user to understand API variable names.

Comment 4 hongming 2012-07-25 06:04:40 UTC
Verify it using the following version.
kernel-2.6.32-276.el6.x86_64
qemu-kvm-0.12.1.2-2.295.el6.x86_64
libvirt-0.9.13-3.el6.x86_64


Steps
1. # virsh dumpxml rhel6
...
<vcpu placement='static' current='1'>4</vcpu>
...

2. # virsh setvcpus rhel6 2


3. # virsh dumpxml rhel6 |grep cpu
  <vcpu placement='static' current='2'>4</vcpu>


4. # virsh setvcpus rhel6 0
error: Invalid number of virtual CPUs

Results
It is expected result.so move its status to VERIFIED.

Comment 5 errata-xmlrpc 2013-02-21 07:18:01 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2013-0276.html


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