Bug 616577 - virsh setvcpus can't statically change the number of virtual CPU
virsh setvcpus can't statically change the number of virtual CPU
Status: CLOSED DUPLICATE of bug 653985
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.0
x86_64 Linux
medium Severity medium
: rc
: 6.2
Assigned To: Daniel Veillard
Virtualization Bugs
: RHELNAK
Depends On:
Blocks: 698812 561978 580566 622534 669549 673186
  Show dependency treegraph
 
Reported: 2010-07-20 16:13 EDT by Nandini Chandra
Modified: 2011-04-28 11:07 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 622534 (view as bug list)
Environment:
Last Closed: 2010-07-20 16:20:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Nandini Chandra 2010-07-20 16:13:55 EDT
Description of problem:
virsh setvcpus can't change the number of virtual CPU active in a kvm
guest OS.  We ran virsh setvcpus so as to change the number of virtual CPU
in a kvm guest OS after we stopped the guest OS.  Then, the command reported
the following error message.

# virsh setvcpus rhel60_31 2
error: Requested operation is not valid: domain is not running


Version-Release number of selected component (if applicable):
Red Hat Enterprise Linux Version Number: Red Hat Enterprise Linux 6.0
Release Number:  Beta 1 snapshot 6
Architecture: x86_64
Kernel Version: kernel-2.6.32-30.el6.x86_64
Related Package Version: libvirt-client-0.8.1-7.el6.x86_64


How reproducible:
Always

Steps to Reproduce:
1. Run the following command so as to stop a kvm guest OS by the following command.
# virsh shutdown <domain-id>
2.2. Run the following command so as to check if the kvm guest OS has
been shut down.
# virsh dominfo rhel60_31
Id:             -
Name:           rhel60_31
UUID:           e15cfcf8-2475-de81-6079-d5ec451d0965
OS Type:        hvm
State:          shut off
CPU(s):         1
Max memory:     1048576 kB
Used memory:    1048576 kB
Autostart:      disable
3.Run the following command so as to change the number of virtual
CPU in the kvm guest OS.
# virsh setvcpus <domain-id> <count>
  
Actual results:
virsh setvcpus can't statically change the number of virtual CPU
active in a kvm guest OS.


Expected results:
virsh setvcpus can statically change the number of virtual CPU active
in a kvm guest OS.


Additional info:
We can change the number of virtual CPU by the virt-manager.So the virsh
setvcpus should behave as well as virt-manager.  We believe that this
is due to a virsh setvcpus's bug.
Comment 1 RHEL Product and Program Management 2010-07-20 16:17:48 EDT
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **
Comment 2 Chris Lalancette 2010-07-20 16:20:02 EDT
This is NOTABUG.  It's intentional that setvcpus only changes vcpus on a running domain.  If you want to change them on a shutdown domain, you can use "virsh edit" and edit the <vcpus> XML element.

Chris Lalancette
Comment 7 Eric Blake 2011-04-28 11:07:14 EDT
(In reply to comment #2)
> This is NOTABUG.  It's intentional that setvcpus only changes vcpus on a
> running domain.  If you want to change them on a shutdown domain, you can use
> "virsh edit" and edit the <vcpus> XML element.
> 
> Chris Lalancette

Actually, the rebase in RHEL 6.1 to newer libvirt picked up the addition of 'virsh setvcpus --config' which does allow changing of vcpus on a shutdown domain.  Therefore, this can be marked as a duplicate of the rebase bug.

*** This bug has been marked as a duplicate of bug 653985 ***

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