Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
Use setvcpus to change maximum vcpu number will make guest have broken settings
Version-Release number of selected component (if applicable):
libvirt-2.0.0-6.el7.x86_64
How reproducible:
100%
Steps to Reproduce:
1. prepare a guest which have vcpu topology
# virsh dumpxml r7
...
<vcpu placement='static' current='1'>12</vcpu>
...
<topology sockets='3' cores='2' threads='2'/>
...
2. change guest maximum vcpu:
# virsh setvcpus r7 13 --config --maximum
3. restart libvirtd
# service libvirtd restart
Redirecting to /bin/systemctl restart libvirtd.service
# virsh edit r7
error: failed to get domain 'r7'
error: Domain not found: no domain with matching name 'r7'
libvirtd log:
journal: Maximum CPUs greater than topology limit
Actual results:
Use setvcpus to change maximum vcpu number will make guest have broken settings and guest disappear after restart libvirtd
Expected results:
report error when change maximum vcpu number
Additional info:
Fixed upstream:
commit 802fac97ec8c8bd5438ec5bcd4d13edb03b00fc2
Author: Peter Krempa <pkrempa>
Date: Thu Aug 25 15:30:21 2016 -0400
qemu: driver: Validate configuration when setting maximum vcpu count
Setting vcpu count when cpu topology is specified may result into an
invalid configuration. Since the topology can't be modified, reject the
setting if it doesn't match the requested topology. This will allow
fixing the topology in case it was broken.
Partially fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1370066
commit c9cb35c255222be7c972f1e049e297517aa84b42
Author: Peter Krempa <pkrempa>
Date: Thu Aug 25 15:24:22 2016 -0400
conf: Don't validate vcpu count in XML parser
Validating the vcpu count is more intricate and doing it in the XML
parser will make previously valid configs (with older qemus) vanish.
Now that we have a very similar check in the qemu domain validation
callback we can do it in a more appropriate place.
This basically reverts commit b54de0830a.
Partially resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1370066
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/RHSA-2016-2577.html
Description of problem: Use setvcpus to change maximum vcpu number will make guest have broken settings Version-Release number of selected component (if applicable): libvirt-2.0.0-6.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1. prepare a guest which have vcpu topology # virsh dumpxml r7 ... <vcpu placement='static' current='1'>12</vcpu> ... <topology sockets='3' cores='2' threads='2'/> ... 2. change guest maximum vcpu: # virsh setvcpus r7 13 --config --maximum 3. restart libvirtd # service libvirtd restart Redirecting to /bin/systemctl restart libvirtd.service # virsh edit r7 error: failed to get domain 'r7' error: Domain not found: no domain with matching name 'r7' libvirtd log: journal: Maximum CPUs greater than topology limit Actual results: Use setvcpus to change maximum vcpu number will make guest have broken settings and guest disappear after restart libvirtd Expected results: report error when change maximum vcpu number Additional info: