[libvirt] [PATCH 1/2] vz: set PVMT_DONT_CREATE_DISK migration flag

This flag tells backend not to create instance disks making behavior the same as in qemu driver. Disk files have to be created beforehand on target host manually or by upper management layer i.e. OpenStack Nova. Signed-off-by: Pavel Glushchak <pglushchak@virtuozzo.com> --- src/vz/vz_sdk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index d13c86a..4cd988a 100644 --- a/src/vz/vz_sdk.c +++ b/src/vz/vz_sdk.c @@ -4740,7 +4740,7 @@ int prlsdkSwitchToSnapshot(virDomainObjPtr dom, const char *uuid, bool paused) * connection to dispatcher */ -#define PRLSDK_MIGRATION_FLAGS (PSL_HIGH_SECURITY) +#define PRLSDK_MIGRATION_FLAGS (PSL_HIGH_SECURITY | PVMT_DONT_CREATE_DISK) int prlsdkMigrate(virDomainObjPtr dom, virURIPtr uri, const unsigned char *session_uuid, -- 2.7.4

This flag is used in Virtuozzo backend implicitly, thus we need to support it and don't fail if it's set. Signed-off-by: Pavel Glushchak <pglushchak@virtuozzo.com> --- src/vz/vz_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index 08f7961..0a84cee 100644 --- a/src/vz/vz_driver.c +++ b/src/vz/vz_driver.c @@ -2899,7 +2899,8 @@ vzEatCookie(const char *cookiein, int cookieinlen, unsigned int flags) VIR_MIGRATE_PEER2PEER | \ VIR_MIGRATE_LIVE | \ VIR_MIGRATE_UNDEFINE_SOURCE | \ - VIR_MIGRATE_PERSIST_DEST) + VIR_MIGRATE_PERSIST_DEST | \ + VIR_MIGRATE_NON_SHARED_INC) #define VZ_MIGRATION_PARAMETERS \ VIR_MIGRATE_PARAM_DEST_XML, VIR_TYPED_PARAM_STRING, \ -- 2.7.4

08-Dec-16 11:49, Pavel Glushchak пишет:
This flag tells backend not to create instance disks making behavior the same as in qemu driver. Disk files have to be created beforehand on target host manually or by upper management layer i.e. OpenStack Nova.
Signed-off-by: Pavel Glushchak <pglushchak@virtuozzo.com> --- src/vz/vz_sdk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index d13c86a..4cd988a 100644 --- a/src/vz/vz_sdk.c +++ b/src/vz/vz_sdk.c @@ -4740,7 +4740,7 @@ int prlsdkSwitchToSnapshot(virDomainObjPtr dom, const char *uuid, bool paused) * connection to dispatcher */
-#define PRLSDK_MIGRATION_FLAGS (PSL_HIGH_SECURITY) +#define PRLSDK_MIGRATION_FLAGS (PSL_HIGH_SECURITY | PVMT_DONT_CREATE_DISK)
int prlsdkMigrate(virDomainObjPtr dom, virURIPtr uri, const unsigned char *session_uuid,
ACKed and pushed the series. Thanks, Maxim
participants (2)
-
Maxim Nestratov
-
Pavel Glushchak