提交 f863ac80 编写于 作者: D Dmitry Guryanov

parallels: implement .domainGetMaxMemory

Since we haven't implemented balloon parameters tuning
we can just return amount of memory in this function.
Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com>
上级 ec5c1dcb
......@@ -1098,6 +1098,20 @@ static int parallelsDomainAttachDevice(virDomainPtr dom, const char *xml)
VIR_DOMAIN_AFFECT_CONFIG | VIR_DOMAIN_AFFECT_LIVE);
}
static unsigned long long
parallelsDomainGetMaxMemory(virDomainPtr domain)
{
virDomainObjPtr dom = NULL;
int ret = -1;
if (!(dom = parallelsDomObjFromDomain(domain)))
return -1;
ret = dom->def->mem.max_balloon;
virObjectUnlock(dom);
return ret;
}
static virHypervisorDriver parallelsDriver = {
.name = "Parallels",
.connectOpen = parallelsConnectOpen, /* 0.10.0 */
......@@ -1144,6 +1158,7 @@ static virHypervisorDriver parallelsDriver = {
.domainHasManagedSaveImage = parallelsDomainHasManagedSaveImage, /* 1.2.13 */
.domainManagedSave = parallelsDomainManagedSave, /* 1.2.14 */
.domainManagedSaveRemove = parallelsDomainManagedSaveRemove, /* 1.2.14 */
.domainGetMaxMemory = parallelsDomainGetMaxMemory, /* 1.2.15 */
};
static virConnectDriver parallelsConnectDriver = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册