[pve-devel] [PATCH container] VZDump: implement stopwait
Thomas Lamprecht
t.lamprecht at proxmox.com
Thu Dec 1 12:44:34 CET 2016
This was missing in pve-container, qemu-server does it already.
Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
src/PVE/VZDump/LXC.pm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/PVE/VZDump/LXC.pm b/src/PVE/VZDump/LXC.pm
index 81f2588..46b5bd2 100644
--- a/src/PVE/VZDump/LXC.pm
+++ b/src/PVE/VZDump/LXC.pm
@@ -248,7 +248,10 @@ sub copy_data_phase2 {
sub stop_vm {
my ($self, $task, $vmid) = @_;
- $self->cmd("lxc-stop -n $vmid");
+ my $opts = $self->{vzdump}->{opts};
+ my $timeout = $opts->{stopwait} * 60;
+
+ $self->cmd("lxc-stop -n $vmid -t $timeout");
# make sure container is stopped
$self->cmd("lxc-wait -n $vmid -s STOPPED");
--
2.1.4
More information about the pve-devel
mailing list