Bug 644736 - virt-manager can not change vcpus for KVM guest
virt-manager can not change vcpus for KVM guest
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: virt-manager (Show other bugs)
All Linux
high Severity high
: rc
: ---
Assigned To: Cole Robinson
Virtualization Bugs
Depends On:
Blocks: 684940
  Show dependency treegraph
Reported: 2010-10-20 02:13 EDT by Johnny Liu
Modified: 2011-07-21 07:21 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2011-07-21 07:21:29 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Johnny Liu 2010-10-20 02:13:27 EDT
Description of problem:
In virt-manager GUI, try to change vcpu, but the change can not be saved.

Version-Release number of selected component (if applicable):
# uname -a
Linux localhost.localdomain 2.6.18-227.el5 #1 SMP Tue Oct 12 18:50:50 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

How reproducible:

Steps to Reproduce:
1. Launch virt-manager GUI.
2. Select a VM, and go to Hardware Tab.
3. Change CPUs allocation value, click Apply.
Actual results:
Change can not be saved. And there is no any error message.

In .virt-manager/virt-manager.log:
[Wed, 20 Oct 2010 01:48:10 virt-manager 4438] INFO (details:1420) Setting vcpus for 6c143a7c-150f-dc29-224c-940672cbea1d to 1.0
[Wed, 20 Oct 2010 01:48:10 virt-manager 4438] ERROR (virt-manager:156) Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/details.py", line 1421, in config_vcpus_apply
  File "/usr/share/virt-manager/virtManager/domain.py", line 1263, in set_vcpu_count
  File "/usr/lib64/python2.4/site-packages/libvirt.py", line 651, in setVcpus
    if ret == -1: raise libvirtError ('virDomainSetVcpus() failed', dom=self)
libvirtError: Requested operation is not valid: domain is not running

Seen from log, virt-manager is calling virDomainSetVcpus, this function is indeed invalid for an inactive domain.

But for user, to change VCPUs is a very normal operation. 

I also did the same operation on RHEL6, it works fine.

Expected results:
User should be able to change VCPUs.

Additional info:
Via virsh edit <guestname>, user can change VCPUs successfully.
Comment 2 RHEL Product and Program Management 2010-12-07 05:33:34 EST
This request was evaluated by Red Hat Product Management for inclusion in Red Hat Enterprise Linux 5.6 and Red Hat does not plan to fix this issue the currently developed update.

Contact your manager or support representative in case you need to escalate this bug.
Comment 5 IBM Bug Proxy 2011-03-26 12:41:21 EDT
------- Comment From pradeepkumars@in.ibm.com 2011-02-21 02:37 EDT-------
any updates?


------- Comment From pradeepkumars@in.ibm.com 2011-02-22 00:12 EDT-------
(In reply to comment #13)
> Hello,
> In the summery you noted Red hat engineering was aware of this issue. I am not
> quickly finding this BZ.
> Do you have the BZ for this issue?
> Thank You
> Joe Kachuck

Comment 6 Cole Robinson 2011-04-29 10:19:54 EDT
Sorry for not replying earlier, this is now fixed in virt-manager-0.6.1-14.el5, so should hit 5.7
Comment 8 Huming Jiang 2011-05-05 03:42:10 EDT

Verfied it on build :

1. Launch virt-manager GUI.
2. Select a VM, and go to Hardware Tab.
3. Change CPUs allocation value, click Apply.
4. The result has been changed.
Comment 9 errata-xmlrpc 2011-07-21 07:21:29 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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