* Added VIR_MIGRATE_LIVE, VIR_MIGRATE_UNDEFINE_SOURCE and
VIR_MIGRATE_PERSIST_DEST to supported migration flags
Signed-off-by: Pavel Glushchak <pglushchak(a)virtuozzo.com>
---
src/vz/vz_driver.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c
index b34fe33..7a12632 100644
--- a/src/vz/vz_driver.c
+++ b/src/vz/vz_driver.c
@@ -2887,8 +2887,11 @@ vzEatCookie(const char *cookiein, int cookieinlen, unsigned int
flags)
goto cleanup;
}
-#define VZ_MIGRATION_FLAGS (VIR_MIGRATE_PAUSED | \
- VIR_MIGRATE_PEER2PEER)
+#define VZ_MIGRATION_FLAGS (VIR_MIGRATE_PAUSED | \
+ VIR_MIGRATE_PEER2PEER | \
+ VIR_MIGRATE_LIVE | \
+ VIR_MIGRATE_UNDEFINE_SOURCE | \
+ VIR_MIGRATE_PERSIST_DEST)
#define VZ_MIGRATION_PARAMETERS \
VIR_MIGRATE_PARAM_DEST_XML, VIR_TYPED_PARAM_STRING, \
--
2.7.4
Show replies by date
libvirt-python passes parameter bandwidth = 0
by default. This means that bandwidth is unlimited.
VZ driver doesn't support bandwidth rate limiting,
but we still need to handle it and fail if bandwidth > 0.
Signed-off-by: Pavel Glushchak <pglushchak(a)virtuozzo.com>
---
src/vz/vz_driver.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c
index 7a12632..4a0068c 100644
--- a/src/vz/vz_driver.c
+++ b/src/vz/vz_driver.c
@@ -2897,6 +2897,7 @@ vzEatCookie(const char *cookiein, int cookieinlen, unsigned int
flags)
VIR_MIGRATE_PARAM_DEST_XML, VIR_TYPED_PARAM_STRING, \
VIR_MIGRATE_PARAM_URI, VIR_TYPED_PARAM_STRING, \
VIR_MIGRATE_PARAM_DEST_NAME, VIR_TYPED_PARAM_STRING, \
+ VIR_MIGRATE_PARAM_BANDWIDTH, VIR_TYPED_PARAM_ULLONG, \
NULL
static char *
@@ -2938,12 +2939,23 @@ vzDomainMigrateBegin3Params(virDomainPtr domain,
char *xml = NULL;
virDomainObjPtr dom = NULL;
vzConnPtr privconn = domain->conn->privateData;
+ unsigned long long bandwidth = 0;
virCheckFlags(VZ_MIGRATION_FLAGS, NULL);
if (virTypedParamsValidate(params, nparams, VZ_MIGRATION_PARAMETERS) < 0)
goto cleanup;
+ if (virTypedParamsGetULLong(params, nparams, VIR_MIGRATE_PARAM_BANDWIDTH,
+ &bandwidth) < 0)
+ goto cleanup;
+
+ if (bandwidth > 0) {
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
+ _("Bandwidth rate limiting is not supported"));
+ goto cleanup;
+ }
+
if (!(dom = vzDomObjFromDomain(domain)))
goto cleanup;
--
2.7.4