]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: use systemd's TerminateMachine to kill all processes
authorGuido Günther <agx@sigxcpu.org>
Thu, 25 Sep 2014 11:32:58 +0000 (13:32 +0200)
committerGuido Günther <agx@sigxcpu.org>
Wed, 1 Oct 2014 18:17:46 +0000 (20:17 +0200)
commit4882618ed13b469d92fa8b2b4a158fdb17dbe9f1
tree4dac45c7226a653ea3b83a5664ed6194ae1664fa
parent92427948b32088cfc7e156a4e7cab87258e207a6
qemu: use systemd's TerminateMachine to kill all processes

If we don't properly clean up all processes in the
machine-<vmname>.scope systemd won't remove the cgroup and subsequent vm
starts fail with

  'CreateMachine: File exists'

Additional processes can e.g. be added via

  echo $PID > /sys/fs/cgroup/systemd/machine.slice/machine-${VMNAME}.scope/tasks

but there are other cases like

  http://bugs.debian.org/761521

Invoke TerminateMachine to be on the safe side since systemd tracks the
cgroup anyway. This is a noop if all processes have terminated already.
src/libvirt_private.syms
src/qemu/qemu_cgroup.c
src/qemu/qemu_cgroup.h
src/qemu/qemu_process.c
src/util/vircgroup.c
src/util/vircgroup.h