]> git.proxmox.com Git - qemu-server.git/blobdiff - PVE/QemuServer.pm
fix #2043: vm start: always stop existing systemd scopes
[qemu-server.git] / PVE / QemuServer.pm
index 4a903a6dd58b5f95b4b00f6385a1779a935bc26e..6dc68a40665abe44e311f204ae39db37460b0019 100644 (file)
@@ -5204,7 +5204,7 @@ sub vm_start {
 
        PVE::Storage::activate_volumes($storecfg, $vollist);
 
-       if (!check_running($vmid, 1)) {
+       if (-d "/sys/fs/cgroup/systemd/qemu.slice/$vmid.scope") {
            eval {
                run_command(['/bin/systemctl', 'stop', "$vmid.scope"],
                    outfunc => sub {}, errfunc => sub {});