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 <[email protected]>
---
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 <[email protected]>
Gerrit-Reviewer: Adam Litke <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Doron Fediuck <[email protected]>
Gerrit-Reviewer: Mark Wu <[email protected]>
Gerrit-Reviewer: Michal Skrivanek <[email protected]>
Gerrit-Reviewer: Royce Lv <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to