mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-05 18:36:21 +00:00
fix #2043: vm start: always stop existing systemd scopes
commit 3c23aa808c
tried to fix a issue
where after a stop mode backup a scope could still linger around, but
it actually removed the wrong check. If we want to remove a
lingering, not yet cleaned up, scope we need to check if said scope
exists not if a VM process is still running. While they are corelated
the scope will always get cleaned up _after_ it's processes are gone.
Should fix #2043, but as this is seemingly not that easy to fix one
for all I'll put the should as disclaimer here.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Cc: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
24466eb53d
commit
f5c673cba7
@ -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 {});
|
||||
|
Loading…
Reference in New Issue
Block a user