Change in vdsm[master]: Introduce a new verb setBalloonTarget

danken at redhat.com danken at redhat.com
Tue Oct 2 21:42:11 UTC 2012


Dan Kenigsberg has submitted this change and it was merged.

Change subject: Introduce a new verb setBalloonTarget
......................................................................


Introduce a new verb setBalloonTarget

We need this API to achieve memory overcommitment on guest level. Here's
the definition of the new API:

setBalloonTarget:
    Dynamically change the target amount of physical memory allocated
    to a guest.

    Input parameter:
        vmId   - VM UUID
        target - target physical memory size in kibibytes
    Return value:
        success: return doneCode
        failure: return errCode including underlying libvirt error message.

And the ballooning information is added into the response of
getVmStats(). It can be collected on vdsm client by this way:

   balloon_info = s.getVmStats(vmId)['statsList'][0]['balloonInfo']

Please note that setBalloonTarget can work only when a virtio balloon
device is available for the guest. So to test it with vdsm API, you need
put the following python dictionary into the 'devices' list in VM's conf
to enable balloon device:

{'device': 'memballoon', 'type': 'balloon', 'specParams':
 {'model': 'virtio'}}

On ovirt-engine, there's checkbox 'Memory Balloon Enabled' in the
'New/Edit VM' UI. You can enable it in cluster 3.1.

Change-Id: I36b1211dbce28bb5bb5926f2db7e2e42a698efc9
Signed-off-by: Mark Wu <wudxw at linux.vnet.ibm.com>
---
M vdsm/API.py
M vdsm/BindingXMLRPC.py
M vdsm/define.py
M vdsm/libvirtvm.py
M vdsm/vm.py
M vdsm_api/vdsmapi-schema.json
M vdsm_cli/vdsClient.py
7 files changed, 99 insertions(+), 1 deletion(-)

Approvals:
  Adam Litke: Looks good to me, but someone else must approve
  Mark Wu: Verified
  Dan Kenigsberg: Looks good to me, approved


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I36b1211dbce28bb5bb5926f2db7e2e42a698efc9
Gerrit-PatchSet: 11
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: Adam Litke <agl at us.ibm.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Doron Fediuck <dfediuck at redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek at redhat.com>
Gerrit-Reviewer: Royce Lv <lvroyce at linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list