mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-30 16:35:24 +00:00
virsh: Add --postcopy-resume option for migrate command
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
f55aedc845
commit
6280246971
@ -3246,7 +3246,8 @@ migrate
|
||||
migrate [--live] [--offline] [--direct] [--p2p [--tunnelled]]
|
||||
[--persistent] [--undefinesource] [--suspend] [--copy-storage-all]
|
||||
[--copy-storage-inc] [--change-protection] [--unsafe] [--verbose]
|
||||
[--rdma-pin-all] [--abort-on-error] [--postcopy] [--postcopy-after-precopy]
|
||||
[--rdma-pin-all] [--abort-on-error] [--postcopy]
|
||||
[--postcopy-after-precopy] [--postcopy-resume]
|
||||
domain desturi [migrateuri] [graphicsuri] [listen-address] [dname]
|
||||
[--timeout seconds [--timeout-suspend | --timeout-postcopy]]
|
||||
[--xml file] [--migrate-disks disk-list] [--disks-port port]
|
||||
@ -3302,7 +3303,11 @@ Once migration is running, the user may switch to post-copy using the
|
||||
automatically switch to post-copy after the first pass of pre-copy is finished.
|
||||
The maximum bandwidth consumed during the post-copy phase may be limited using
|
||||
*--postcopy-bandwidth*. The maximum bandwidth consumed during the pre-copy phase
|
||||
may be limited using *--bandwidth*.
|
||||
may be limited using *--bandwidth*. In case connection between the hosts breaks
|
||||
while migration is in post-copy mode, the domain cannot be resumed on either
|
||||
source or destination host and the ``migrate`` command will report an error
|
||||
leaving the domain active on both hosts. To recover from such situation repeat
|
||||
the original ``migrate`` command with an additional *--postcopy-resume* flag.
|
||||
|
||||
*--auto-converge* forces convergence during live migration. The initial
|
||||
guest CPU throttling rate can be set with *auto-converge-initial*. If the
|
||||
|
@ -10807,6 +10807,10 @@ static const vshCmdOptDef opts_migrate[] = {
|
||||
.type = VSH_OT_BOOL,
|
||||
.help = N_("automatically switch to post-copy migration after one pass of pre-copy")
|
||||
},
|
||||
{.name = "postcopy-resume",
|
||||
.type = VSH_OT_BOOL,
|
||||
.help = N_("resume failed post-copy migration")
|
||||
},
|
||||
{.name = "migrateuri",
|
||||
.type = VSH_OT_STRING,
|
||||
.completer = virshCompleteEmpty,
|
||||
@ -11210,6 +11214,9 @@ doMigrate(void *opaque)
|
||||
if (vshCommandOptBool(cmd, "postcopy"))
|
||||
flags |= VIR_MIGRATE_POSTCOPY;
|
||||
|
||||
if (vshCommandOptBool(cmd, "postcopy-resume"))
|
||||
flags |= VIR_MIGRATE_POSTCOPY_RESUME;
|
||||
|
||||
if (vshCommandOptBool(cmd, "tls"))
|
||||
flags |= VIR_MIGRATE_TLS;
|
||||
|
||||
@ -11314,6 +11321,7 @@ cmdMigrate(vshControl *ctl, const vshCmd *cmd)
|
||||
VSH_EXCLUSIVE_OPTIONS("live", "offline");
|
||||
VSH_EXCLUSIVE_OPTIONS("timeout-suspend", "timeout-postcopy");
|
||||
VSH_REQUIRE_OPTION("postcopy-after-precopy", "postcopy");
|
||||
VSH_REQUIRE_OPTION("postcopy-resume", "postcopy");
|
||||
VSH_REQUIRE_OPTION("timeout-postcopy", "postcopy");
|
||||
VSH_REQUIRE_OPTION("persistent-xml", "persistent");
|
||||
VSH_REQUIRE_OPTION("tls-destination", "tls");
|
||||
|
Loading…
x
Reference in New Issue
Block a user