Change in vdsm[master]: set the # of vcpus for a VM (hot plug/unplug)

danken at redhat.com danken at redhat.com
Mon Jan 13 16:11:10 UTC 2014


Dan Kenigsberg has submitted this change and it was merged.

Change subject: set the # of vcpus for a VM (hot plug/unplug)
......................................................................


set the # of vcpus for a VM (hot plug/unplug)

Introducing new API for setting the number of cpus of a running VM.

setNumOfCpus(vmId, number)

http://www.ovirt.org/Hot_plug_cpu

Prerequisite
Vm must be Running state.
libvirt xml:
* To add cpus a VM must have the max number configured.
* Both topology and vcpu elements must exist.

snip from a domxml:
 <vcpu current='3'>160</vcpu>
 <cpu mode='custom' match='exact'>
   <topology sockets='160' cores='1' threads='1'/>
 </cpu>

this means there is a total of 160 cpus and the current num is 3

The underlying API being used is libvirt's setVCpus.
The result of hot plug/unplug a cpu to a RHEL, for instance, is a new
device under: /sys/devices/system/cpu/cpuX

Notes:
* guest OS support and behavior may(and probably will) vary on trying to
  to hot plug/unplug.

* Upgrade: VMs that have been started on hosts before this patch can
  not plug more CPU than the number of CPUs they started up with.

Change-Id: Ief35e1d335737cd98d21a5413ac9f8ab9d824c3e
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1036492
Signed-off-by: Roy Golan <rgolan at redhat.com>
Reviewed-on: http://gerrit.ovirt.org/21789
Reviewed-by: Yaniv Bronhaim <ybronhei at redhat.com>
Reviewed-by: Michal Skrivanek <michal.skrivanek at redhat.com>
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
---
M client/vdsClient.py
M debian/vdsm.dirs
M lib/vdsm/define.py
M tests/vmTests.py
M tests/vmTestsData.py
M vdsm.spec.in
M vdsm/API.py
M vdsm/BindingXMLRPC.py
M vdsm/hooks.py
M vdsm/vdsmd.8.in
M vdsm/vm.py
M vdsm_api/Bridge.py
M vdsm_api/vdsmapi-schema.json
M vdsm_hooks/Makefile.am
14 files changed, 119 insertions(+), 18 deletions(-)

Approvals:
  Yaniv Bronhaim: Looks good to me, but someone else must approve
  Dan Kenigsberg: Looks good to me, approved
  Roy Golan: Verified
  Michal Skrivanek: Looks good to me, but someone else must approve



-- 
To view, visit http://gerrit.ovirt.org/21789
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ief35e1d335737cd98d21a5413ac9f8ab9d824c3e
Gerrit-PatchSet: 28
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Roy Golan <rgolan at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Eduardo <ewarszaw at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek at redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list