• G
    qemu: use systemd's TerminateMachine to kill all processes · 4882618e
    Guido Günther 提交于
    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.
    4882618e
qemu_cgroup.c 36.2 KB