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.
Bug 1375939 - libvirt setvcpus doesn't work well with old qemu
Summary: libvirt setvcpus doesn't work well with old qemu
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.3
Hardware: x86_64
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Peter Krempa
QA Contact: Jingjing Shao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-14 09:44 UTC by Luyao Huang
Modified: 2017-08-01 23:57 UTC (History)
6 users (show)

Fixed In Version: libvirt-2.5.0-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 17:16:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:1846 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2017-08-01 18:02:50 UTC

Description Luyao Huang 2016-09-14 09:44:22 UTC
Description of problem:
libvirt setvcpus cannot work well with old qemu

Version-Release number of selected component (if applicable):
libvirt-2.0.0-8.el7.x86_64
qemu-kvm-1.5.3-124.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
S1: start a guest with hotpluggable vcpu:
1.
# virsh dumpxml r7-old
...
  <vcpu placement='static' current='4'>10</vcpu>
  <vcpus>
    <vcpu id='0' enabled='yes' hotpluggable='no' order='1'/>
    <vcpu id='1' enabled='yes' hotpluggable='yes' order='4'/>
    <vcpu id='2' enabled='no' hotpluggable='yes'/>
    <vcpu id='3' enabled='no' hotpluggable='yes'/>
    <vcpu id='4' enabled='yes' hotpluggable='yes' order='3'/>
    <vcpu id='5' enabled='no' hotpluggable='yes'/>
    <vcpu id='6' enabled='yes' hotpluggable='yes' order='2'/>
    <vcpu id='7' enabled='no' hotpluggable='yes'/>
    <vcpu id='8' enabled='no' hotpluggable='yes'/>
    <vcpu id='9' enabled='no' hotpluggable='yes'/>
  </vcpus>
...

2.
# virsh start r7-old
error: Failed to start domain r7-old
error: unsupported configuration: vcpu '1' is missing hotplug data

S2: use setvcpus --config without new hotpluggable vcpu

1. 

# virsh dumpxml r7-old
...
  <memory unit='KiB'>1048576</memory>
  <currentMemory unit='KiB'>1048576</currentMemory>
  <vcpu placement='static' current='4'>10</vcpu>
  <cputune>
...

2,
# virsh setvcpus r7-old 5 --config

3. start guest:

# virsh start r7-old
error: Failed to start domain r7-old
error: unsupported configuration: vcpu '4' is missing hotplug data

4. try it again:
# virsh start r7-old
Domain r7-old started


Actual results:

libvirt setvcpus cannot work well with old qemu

Expected results:

S1: report a more clearly unsupport error

S2: can start guest at the first time

Additional info:

Comment 1 Peter Krempa 2016-09-30 10:55:43 UTC
commit 80ea1cf6be4ab916fc7e2f8bb2a93d5337b272ac
Author: Peter Krempa <pkrempa>
Date:   Wed Sep 21 07:46:25 2016 +0200

    qemu: Fix coldplug of vcpus
    
    virDomainDefSetVcpus was not designed to handle coldplug of vcpus now
    that we can set state of vcpus individually.
    
    Introduce qemuDomainSetVcpusConfig that properly handles state changes
    of vcpus when coldplugging so that invalid configurations are not
    created.

Comment 3 Jingjing Shao 2016-12-26 10:06:01 UTC
Hi Peter,

I try to verify this issue, but get the result as below. The S1 is not fixed.
Won't it be fixed ?


The S1 is not fixed
# virsh start rhel7.3
error: Failed to start domain rhel7.3
error: unsupported configuration: vcpu '1' is missing hotplug data



The S2 is fixed.

# virsh dumpxml rhel7.3
....
 <memory unit='KiB'>1048576</memory>
  <currentMemory unit='KiB'>1048576</currentMemory>
  <vcpu placement='static' current='4'>10</vcpu>
....

# virsh setvcpus rhel7.3  5 --config


# virsh start rhel7.3
Domain rhel7.3 started

Comment 4 Peter Krempa 2017-01-03 09:33:39 UTC
That obviously can't be fixed. The 'S1' configuration requires new hotplug approach so that it can work properly, thus it's rejected by libvirt.

Comment 5 Jingjing Shao 2017-01-04 03:19:11 UTC
(In reply to Peter Krempa from comment #4)
> That obviously can't be fixed. The 'S1' configuration requires new hotplug
> approach so that it can work properly, thus it's rejected by libvirt.

Thanks for Peter's reply,according to the comment#3 and #4 ,change the bug status to verified

Comment 6 errata-xmlrpc 2017-08-01 17:16:43 UTC
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://access.redhat.com/errata/RHEA-2017:1846

Comment 7 errata-xmlrpc 2017-08-01 23:57:38 UTC
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://access.redhat.com/errata/RHEA-2017:1846


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