On 04/23/2015 03:55 PM, Maxim Nestratov wrote:
20.04.2015 14:43, Maxim Nestratov пишет:
19.03.2015 18:39, Dmitry Guryanov пишет:
Since we haven't implemented balloon parameters tuning
we can just return amount of memory in this function.
Signed-off-by: Dmitry Guryanov <dguryanov@xxxxxxxxxxxxx>
---
src/parallels/parallels_driver.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/src/parallels/parallels_driver.c
b/src/parallels/parallels_driver.c
index 391e927..d13a4e2 100644
--- a/src/parallels/parallels_driver.c
+++ b/src/parallels/parallels_driver.c
@@ -1089,6 +1089,24 @@ parallelsDomainManagedSaveRemove(virDomainPtr
domain, unsigned int flags)
return ret;
}
+static unsigned long long
+parallelsDomainGetMaxMemory(virDomainPtr domain)
+{
+ parallelsConnPtr privconn = domain->conn->privateData;
+ virDomainObjPtr dom = NULL;
+ int ret = -1;
+
+ dom = virDomainObjListFindByUUID(privconn->domains, domain->uuid);
+ if (dom == NULL) {
+ parallelsDomNotFoundError(domain);
+ return -1;
+ }
+
+ ret = dom->def->mem.max_balloon;
+ virObjectUnlock(dom);
+ return ret;
+}
+
static virHypervisorDriver parallelsDriver = {
.name = "Parallels",
.connectOpen = parallelsConnectOpen, /* 0.10.0 */
@@ -1133,6 +1151,7 @@ static virHypervisorDriver parallelsDriver = {
.domainHasManagedSaveImage =
parallelsDomainHasManagedSaveImage, /* 1.2.13 */
.domainManagedSave = parallelsDomainManagedSave, /* 1.2.14 */
.domainManagedSaveRemove = parallelsDomainManagedSaveRemove,
/* 1.2.14 */
+ .domainGetMaxMemory = parallelsDomainGetMaxMemory, /* 1.2.14 */
};
static virConnectDriver parallelsConnectDriver = {
ACK.
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list
I think it should be reworked with newly introduced
parallelsDomObjFromDomain
OK
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list