this simply adds the restart flag and the optional timeout to the
lxc api required for the restart mode migration
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
description => "Use online/live migration.",
optional => 1,
},
description => "Use online/live migration.",
optional => 1,
},
+ restart => {
+ type => 'boolean',
+ description => "Use restart migration",
+ optional => 1,
+ },
+ timeout => {
+ type => 'integer',
+ description => "Timeout in seconds for shutdown for restart migration",
+ optional => 1,
+ default => 180,
+ },
force => {
type => 'boolean',
description => "Force migration despite local bind / device" .
force => {
type => 'boolean',
description => "Force migration despite local bind / device" .
# try to detect errors early
if (PVE::LXC::check_running($vmid)) {
# try to detect errors early
if (PVE::LXC::check_running($vmid)) {
- die "can't migrate running container without --online\n"
- if !$param->{online};
+ die "can't migrate running container without --online or --restart\n"
+ if !$param->{online} && !$param->{restart};
}
if (PVE::HA::Config::vm_is_ha_managed($vmid) && $rpcenv->{type} ne 'ha') {
}
if (PVE::HA::Config::vm_is_ha_managed($vmid) && $rpcenv->{type} ne 'ha') {