vm_start : force systemctl stop if orphan scope exist

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
Alexandre Derumier 2016-04-21 15:18:28 +02:00 committed by Dietmar Maurer
parent ffa42b860d
commit 2b401189e3

View File

@ -4531,6 +4531,12 @@ sub vm_start {
PVE::Storage::activate_volumes($storecfg, $vollist);
if (!check_running($vmid, 1) && -d "/sys/fs/cgroup/systemd/qemu.slice/$vmid.scope") {
my $cmd = [];
push @$cmd, '/bin/systemctl', 'stop', "$vmid.scope";
eval { run_command($cmd); };
}
eval { run_command($cmd, timeout => $statefile ? undef : 30,
umask => 0077); };