Hide Forgot
Description of problem: When set the count of vcpu with config flag , the value should be less than or equal to the maximum vcpus with config flag rather than the maximum vcpus with current flag. Version-Release number of selected component (if applicable): libvirt-0.10.0-0rc0.el6.x86_64 qemu-kvm-0.12.1.2-2.295.el6.x86_64 kernel-2.6.32-276.el6.x86_64 How reproducible: 100% Steps to Reproduce: 1.# virsh vcpucount rhel6q maximum config 15 maximum live 10 current config 5 current live 2 2. # virsh setvcpus rhel6q 15 --config error: invalid argument: requested vcpus is greater than max allowable vcpus for the domain: 15 > 10 (It shoud be compared with the maximum and config value- "15" , rather than the maximum and current value "10" ) 3.# virsh setvcpus rhel6q 10 --config 4. # virsh vcpucount rhel6q maximum config 15 maximum live 10 current config 10 current live 2 Actual results: The setting count value of vcpu with config flag is compared with the the maximum value of vcpu with current flag. Expected results: The setting count value of vcpu with config flag should be compared with the maximum value of vcpus with config flag ,rather than the maximum vcpus with current flag Additional info:
Moving to RHEL6.6 for capacity reasons.
This bug was not selected to be addressed in Red Hat Enterprise Linux 6. We will look at it again within the Red Hat Enterprise Linux 7 product.
Fixed upstream in: commit 60f7303c151cccdbe214b9f9ac59ecaf95cbf24b Author: Eric Blake <eblake> Date: Fri Jan 24 10:52:23 2014 -0700 qemu: adjust maxmem/maxvcpu computation https://bugzilla.redhat.com/show_bug.cgi?id=1038363 If a domain has a different maximum for persistent and live maxmem or max vcpus, then it is possible to hit cases where libvirt refuses to adjust the current values or gets halfway through the adjustment before failing. Better is to determine up front if the change is possible for all requested flags. Based on an idea by Geoff Franks. * src/qemu/qemu_driver.c (qemuDomainSetMemoryFlags): Compute correct maximum if both live and config are being set. (qemuDomainSetVcpusFlags): Likewise. Signed-off-by: Eric Blake <eblake> v1.2.1-280-g60f7303
I can reproduce this issue with libvirt-1.1.1-29.el7_0.4.x86_64: 1. prepare a guest with 15 maximum vcpus and 10 current vcpus # virsh start test4 Domain test4 started 2. # virsh vcpucount test4 maximum config 15 maximum live 15 current config 10 current live 10 3. # virsh setvcpus test4 20 --config --maximum 4. # virsh vcpucount test4 maximum config 20 maximum live 15 current config 10 current live 10 5. # virsh setvcpus test4 20 --config error: invalid argument: requested vcpus is greater than max allowable vcpus for the domain: 20 > 15 And verify this bug with libvirt-1.2.17-6.el7.x86_64: 1. # virsh vcpucount test4 maximum config 15 current config 10 2. # virsh vcpucount test4 maximum config 15 maximum live 15 current config 10 current live 10 3. # virsh setvcpus test4 20 --config --maximum 4. # virsh vcpucount test4 maximum config 20 maximum live 15 current config 10 current live 10 5. # virsh setvcpus test4 20 --config 6. # virsh vcpucount test4 maximum config 20 maximum live 15 current config 20 current live 10 7. # virsh dumpxml test4 --inactive <domain type='kvm'> <name>test4</name> <uuid>b1e7936b-104b-430e-9211-d6c61b8df313</uuid> <memory unit='KiB'>1024000</memory> <currentMemory unit='KiB'>559104</currentMemory> <vcpu placement='static' cpuset='0-1'>20</vcpu>
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. https://rhn.redhat.com/errata/RHBA-2015-2202.html