Bug 638065 - The output of vcpuinfo is incorrect after setvcpus for a running guest
The output of vcpuinfo is incorrect after setvcpus for a running guest
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kvm (Show other bugs)
5.6
All Linux
low Severity medium
: rc
: ---
Assigned To: Virtualization Maintenance
Virtualization Bugs
: Reopened
Depends On:
Blocks: Rhel5KvmTier3
  Show dependency treegraph
 
Reported: 2010-09-28 01:39 EDT by min zhan
Modified: 2013-01-09 18:11 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-12-15 05:57:10 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description min zhan 2010-09-28 01:39:59 EDT
Description of problem:


Version-Release number of selected component (if applicable):
RHEL5.6-Server-x86_64-kvm
kvm-83-199.el5
kvm-qemu-img-83-199.el5
libvirt-0.8.2-6.el5

How reproducible:
always

Steps to Reproduce:
1.# virsh start demo
2.# virsh vcpuinfo demo
  VCPU:           0
  CPU:            1
  State:          running
  CPU time:       2370.1s
  CPU Affinity:   yyyy
3.# virsh setvcpus demo 2
4.# virsh vcpuinfo demo
VCPU:           0
CPU:            1
State:          running
CPU time:       2400.2s
CPU Affinity:   yyyy
5.#virsh dumpxml demo,found
<vcpu>2</vcpu>
  
Actual results:
KVM does not support cpu hotplug.

Expected results:
KVM can support cpu hotplug.

step 4 result should be:
VCPU:           0
CPU:            0
State:          running
CPU time:       0.5s
CPU Affinity:   yy

VCPU:           1
CPU:            0
State:          running
CPU Affinity:   yy

Additional info:
Comment 2 dyuan 2010-09-29 06:02:50 EDT
Hi, dlaor

I re-test it with the following scenarios, got some different error report.

RHEL5.5 kvm:
# virsh setvcpus kvm 2
error: this function is not supported by the hypervisor: cannot change vcpu count of an active domain

RHEL5.5 xen:
# virsh setvcpus guest 2
error: Too many virtual CPUs.

RHEL5.6 xen:
# virsh setvcpus guest 2
error: Too many virtual CPUs.

But for RHEL5.6 kvm, there is NO error report and the <vcpu> element in xml is updated acturally.

So I think the bug summary should be "the output of vcpuinfo is incorrect after setvcpus for a running guest". Is that right ?
Comment 3 Dor Laor 2010-09-29 06:47:50 EDT
It might be a libvirt issue. You do get an error message. Anyway, we won't support hot plug for rhel5 but if it's kvm issue we can fix the error message.
Daniel do you know who is the faulty component?
Comment 4 min zhan 2010-09-30 05:04:40 EDT
----For RHEL5.6 guest
It works fine for RHEL5.6 guest. 
According to test result, setvcpus is supported by RHEL5.6.

----For RHEL5.5 guest
Original description above use RHEL5u5 guest. 

Also if i manually edit guest xml to change vcpu number,still incorrect when use vcpuinfo to check.

I think we should locate this bug to vcpuinfo problem. right?
Comment 5 min zhan 2010-10-19 22:38:01 EDT
I have modified the summary for this bug.
Comment 7 Daniel Berrange 2010-12-15 05:24:27 EST
> But for RHEL5.6 kvm, there is NO error report and the <vcpu> element in xml is
> updated acturally.

This says libvirt in RHEL 5.6 has performed the vCPUs hotplug operation you asked it for succesfully. Where is the actual bug ?

> So I think the bug summary should be "the output of vcpuinfo is incorrect after
> setvcpus for a running guest". Is that right ?

What is the actual thing that fails ? The test quoted just above is operating as expected

@dor  vCPU hotplug works fine in RHEL5 kvm (as far as the QEMU monitor is concerned), even if you didn't intend it to

# rpm -q kvm
kvm-83-205.el5

# /usr/libexec/qemu-kvm -vnc :1 -monitor stdio -cdrom /root/boot.iso
QEMU 0.9.1 monitor - type 'help' for more information
(qemu) info cpus
* CPU #0: pc=0x00000000000f08d3 thread_id=19203
(qemu) cpu_set 1 online
(qemu) cpu_set 2 online
(qemu) cpu_set 3 online
(qemu) info cpus
* CPU #0: pc=0x00000000000f0d6e thread_id=19203
  CPU #1: pc=0x00000000000ffff0 thread_id=19206
  CPU #2: pc=0x00000000000ffff0 thread_id=19207
  CPU #3: pc=0x00000000000ffff0 thread_id=19208
(qemu) quit

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