I want to check if the VM is in suspended state from the command line.
Here is my way right now:
It will have a line in output, if this <vmid> is suspended.
However, this way is tooooo slow. The
So, any better way to check all VMs: does they are suspended ?
ps.:
Here is my way right now:
Code:
qm status <vmid> --verbose | grep suspended
However, this way is tooooo slow. The
qm status
command will use near 1 second. if there have 100 stoped VMs ( pre-checked by qm list
), just check suspended, will use 100 seconds. This way is terrible.So, any better way to check all VMs: does they are suspended ?
ps.:
qm list --full
will not show does a vm is suspended or not.
Last edited: