"qm shutdown 100 &" will cause logout

Dec 30, 2024
58
15
8
Munich, Germany
Dear Proxmox Community,

for some time I'm a bit annoyed by a strange behaviour.
When running "qm shutdown" in the background, the SSH session gets terminated:

Code:
root@pve:~# qm shutdown 110 &
[1] 1929562
root@pve:~#
logout
Connection to 10.200.2.9 closed.

Sometimes I just don't need to wait for the guest to properly shutdown. Usually I start the process in the background with & and will get noticed if the job finishes.

Is it by design that the SSH session gets terminated with this use case?

Best regards,
Bernhard
 
Hey Bernhard,

I just tried it on my machine and it behaved the same. (PVE 9.1.6)

This worked for me, can you give it a try?

systemd-run qm shutdown <VMID>

You also could add --quiet after systemd-run to get no output.
 
  • Like
Reactions: waltar