mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-05-03 14:38:31 +00:00
vm_start : force systemctl stop if orphan scope exist
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
parent
ffa42b860d
commit
2b401189e3
@ -4531,6 +4531,12 @@ sub vm_start {
|
|||||||
|
|
||||||
PVE::Storage::activate_volumes($storecfg, $vollist);
|
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,
|
eval { run_command($cmd, timeout => $statefile ? undef : 30,
|
||||||
umask => 0077); };
|
umask => 0077); };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user