[--postcopy-after-precopy] [--postcopy-resume] [--zerocopy]
domain desturi [migrateuri] [graphicsuri] [listen-address] [dname]
[--timeout seconds [--timeout-suspend | --timeout-postcopy]]
- [--xml file] [--migrate-disks disk-list] [--disks-port port]
+ [--xml file]
+ [--migrate-disks disk-list] [--migrate-disks-detect-zeroes disk-list]
+ [--disks-port port]
[--compressed] [--comp-methods method-list]
[--comp-mt-level] [--comp-mt-threads] [--comp-mt-dthreads]
[--comp-xbzrle-cache] [--comp-zlib-level] [--comp-zstd-level]
host. By default only non-shared non-readonly images are transferred. Use
*--migrate-disks* to explicitly specify a list of disk targets to
transfer via the comma separated ``disk-list`` argument.
+The *--migrate-disks-detect-zeroes* option which takes a comma separated list of
+disk target names enables zeroed block detection for the listed migrated disks.
+These blocks are not transferred or allocated on destination, effectively
+sparsifying the disk at the cost of CPU overhead.
With *--copy-storage-synchronous-writes* flag used the disk data migration will
synchronously handle guest disk writes to both the original source and the
destination to ensure that the disk migration converges at the price of possibly
.completer = virshDomainMigrateDisksCompleter,
.help = N_("comma separated list of disks to be migrated")
},
+ {.name = "migrate-disks-detect-zeroes",
+ .type = VSH_OT_STRING,
+ .completer = virshDomainMigrateDisksCompleter,
+ .help = N_("comma separated list of disks to be migrated with zero detection enabled")
+ },
{.name = "disks-port",
.type = VSH_OT_INT,
.unwanted_positional = true,
}
}
+ if (vshCommandOptString(ctl, cmd, "migrate-disks-detect-zeroes", &opt) < 0)
+ goto out;
+ if (opt) {
+ g_autofree char **val = NULL;
+
+ if (!(flags & (VIR_MIGRATE_NON_SHARED_DISK | VIR_MIGRATE_NON_SHARED_INC))) {
+ vshError(ctl, "'--migrate-disks-detect-zeroes' requires one of '--copy-storage-all', '--copy-storage-inc'");
+ goto out;
+ }
+
+ val = g_strsplit(opt, ",", 0);
+
+ if (virTypedParamsAddStringList(¶ms,
+ &nparams,
+ &maxparams,
+ VIR_MIGRATE_PARAM_MIGRATE_DISKS_DETECT_ZEROES,
+ (const char **)val) < 0) {
+ goto save_error;
+ }
+ }
+
if (vshCommandOptString(ctl, cmd, "comp-methods", &opt) < 0)
goto out;
if (opt) {