diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in index ad30cd04c24e9be0b161f1e7bd783fb0d4b1829f..eda9e12abcc0150a592e4760880f8c568ecf379c 100644 --- a/include/libvirt/libvirt.h.in +++ b/include/libvirt/libvirt.h.in @@ -1187,6 +1187,7 @@ typedef enum { * when supported */ VIR_MIGRATE_UNSAFE = (1 << 9), /* force migration even if it is considered unsafe */ VIR_MIGRATE_OFFLINE = (1 << 10), /* offline migrate */ + VIR_MIGRATE_COMPRESSED = (1 << 11), /* compress data during migration */ } virDomainMigrateFlags; /* Domain migration. */ diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 3e4be89058939c90fbb8b322503291e21ab446e9..f8b0cec89a17668d9587c6e2f6ca0011a146f5b5 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -8340,6 +8340,11 @@ static const vshCmdOptDef opts_migrate[] = { .flags = 0, .help = N_("display the progress of migration") }, + {.name = "compressed", + .type = VSH_OT_BOOL, + .flags = 0, + .help = N_("compress repeated pages during live migration") + }, {.name = "domain", .type = VSH_OT_DATA, .flags = VSH_OFLAG_REQ, @@ -8430,6 +8435,9 @@ doMigrate(void *opaque) if (vshCommandOptBool(cmd, "unsafe")) flags |= VIR_MIGRATE_UNSAFE; + if (vshCommandOptBool(cmd, "compressed")) + flags |= VIR_MIGRATE_COMPRESSED; + if (vshCommandOptBool(cmd, "offline")) { flags |= VIR_MIGRATE_OFFLINE; } diff --git a/tools/virsh.pod b/tools/virsh.pod index 96666c491e2f4a5e78bf827b56eb4b9cd48a1f5f..e67585029d8852336c821696dcffceef89ad10e3 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -1043,7 +1043,7 @@ stats. =item B [I<--live>] [I<--offline>] [I<--direct>] [I<--p2p> [I<--tunnelled>]] [I<--persistent>] [I<--undefinesource>] [I<--suspend>] [I<--copy-storage-all>] [I<--copy-storage-inc>] [I<--change-protection>] [I<--unsafe>] [I<--verbose>] -I I [I] [I] +[I<--compressed>] I I [I] [I] [I<--timeout> B] [I<--xml> B] Migrate domain to another host. Add I<--live> for live migration; <--p2p> @@ -1064,7 +1064,9 @@ host. I<--change-protection> enforces that no incompatible configuration changes will be made to the domain while the migration is underway; this flag is implicitly enabled when supported by the hypervisor, but can be explicitly used to reject the migration if the hypervisor lacks change protection -support. I<--verbose> displays the progress of migration. +support. I<--verbose> displays the progress of migration. I<--compressed> +activates compression of memory pages that have to be transferred repeatedly +during live migration. B: Individual hypervisors usually do not support all possible types of migration. For example, QEMU does not support direct migration.