commit
3c23aa808ccc946bad92d9bc63b6f833c61d0f52 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>
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 {});