Bug 616577

Summary: virsh setvcpus can't statically change the number of virtual CPU
Product: Red Hat Enterprise Linux 6 Reporter: Nandini Chandra <nachandr>
Component: libvirtAssignee: Daniel Veillard <veillard>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: clalance, eblake, ltroan, tao, xen-maint
Target Milestone: rcKeywords: RHELNAK
Target Release: 6.2   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 622534 (view as bug list) Environment:
Last Closed: 2010-07-20 20:20:02 UTC Type: ---
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: 698812, 561978, 580566, 622534, 669549, 673186    

Description Nandini Chandra 2010-07-20 20:13:55 UTC
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 Program Management 2010-07-20 20:17:48 UTC
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 20:20:02 UTC
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 15:07:14 UTC
(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 ***