Bug 545118 - RFE: Add 'default-vcpus' / 'max-vcpus' options
Summary: RFE: Add 'default-vcpus' / 'max-vcpus' options
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: libvirt
Version: 5.6
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Eric Blake
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 615999 644159 (view as bug list)
Depends On:
Blocks: 545119 554476
TreeView+ depends on / blocked
 
Reported: 2009-12-07 16:21 UTC by Michal Novotny
Modified: 2018-11-14 17:45 UTC (History)
20 users (show)

Fixed In Version: libvirt-0.8.2-8.el5
Doc Type: Enhancement
Doc Text:
Clone Of: 453042
: 545119 (view as bug list)
Environment:
Last Closed: 2011-01-13 22:53:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2011:0060 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2011-01-12 17:22:30 UTC

Description Michal Novotny 2009-12-07 16:21:10 UTC
+++ This bug was initially created as a clone of Bug #453042 +++

Bug #453042 introduced max-vcpus/vcpus resolution to xen userspace tools to be able to run boot machine without all vcpus allocated at the boot time. What we need now it to add support for this to libvirt itself to provide interface to set initial number of vcpus and maximum number of vcpus since they don't have to be the same at the boot time like it was before my patch for BZ #453042 applied.

Comment 10 Eric Blake 2010-10-14 14:21:30 UTC
Patches for RHEL 5.6 posted:
http://post-office.corp.redhat.com/archives/rhvirt-patches/2010-October/msg00178.html

Note that this is a bare minimum subset of what is going upstream in 0.8.5 - rather than backport the new convenience APIs of virDomainSetVcpusFlags, you have to do raw XML editing.  But it is sufficient to provide the desired feature.

Comment 11 Miroslav Rezanina 2010-10-19 08:12:15 UTC
*** Bug 644159 has been marked as a duplicate of this bug. ***

Comment 13 wangyimiao 2010-10-26 10:56:14 UTC
Verified PASSED on 4 arches(RHEL5u6-Server-ia64-Xen,RHEL5u6-Server-x86_64-Xen,RHEL5u6-Server-x86_64-Kvm,RHEL5u6-Client-i386-Xen)
with build:
libvirt-0.8.2-7.el5
kernel-2.6.18-228.el5
kernel-xen-2.6.18-228.el5
xen-3.0.3-117.el5.

Steps:
1.#virsh dumpxml xen-pv
<domain type='xen' id='2'>
<name>xen-pv</name>
<uuid>b6a3427e-12ae-c04b-090c-f96c1d344533</uuid>
<memory>524288</memory>
<currentMemory>524288</currentMemory>
<vcpu>3</vcpu>
<bootloader>/usr/bin/pygrub</bootloader>
<os>
<type>linux</type>
<kernel>/var/lib/xen/boot_kernel.29GseO</kernel>
<initrd>/var/lib/xen/boot_ramdisk.7YgE0w</initrd>
<cmdline>ro root=/dev/VolGroup00/LogVol00 rhgb quiet</cmdline>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<disk type='file' device='disk'>
<driver name='tap' type='aio'/>
<source file='/var/lib/xen/images/xen-pv.img'/>
<target dev='xvda' bus='xen'/>
</disk>
<interface type='bridge'>
<mac address='00:16:36:4b:91:03'/>
<source bridge='virbr0'/>
<script path='vif-bridge'/>
<target dev='vif2.0'/>
</interface>
<console type='pty' tty='/dev/pts/3'>
<source path='/dev/pts/3'/>
<target port='0'/>
</console>
<input type='mouse' bus='xen'/>
<graphics type='vnc' port='5900' autoport='yes' keymap='en-us'/>
</devices>
</domain>

2.virsh setvcpus xen-pv 4
   error: Too many virtual CPUs.
3.#virsh setvcpus xen-pv 2
4.#virsh dumpxml xen-pv|grep vcpu
<vcpu current='2'>3</vcpu>
on guest
5.#grep processor /proc/cpuinfo
processor : 0
processor : 1
6.#virsh setvcpus xen-pv 3
on guest
a). grep processor /proc/cpuinfo

   processor : 0

   processor : 1

   processor : 2

Comment 16 errata-xmlrpc 2011-01-13 22:53:51 UTC
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.

http://rhn.redhat.com/errata/RHEA-2011-0060.html

Comment 17 Dave Allan 2011-01-27 02:17:55 UTC
*** Bug 615999 has been marked as a duplicate of this bug. ***


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