← 返回命令列表

Linux command

qm-wait 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Wait

qm wait [vmid]

Example

qm wait --timeout 60 [vmid]

Shutdown

qm shutdown [vmid] && qm wait --timeout 60 [vmid]

说明

qm wait blocks until a virtual machine reaches stopped state. This is useful in scripts to ensure a VM has fully stopped before performing subsequent operations. Combined with shutdown, it provides a way to gracefully stop VMs and wait for completion.

参数

--timeout _seconds_
Maximum time to wait synchronously before returning. Set to 0 to deactivate. If reached, the command returns with the PID.

FAQ

What is the qm-wait command used for?

qm wait blocks until a virtual machine reaches stopped state. This is useful in scripts to ensure a VM has fully stopped before performing subsequent operations. Combined with shutdown, it provides a way to gracefully stop VMs and wait for completion.

How do I run a basic qm-wait example?

Run `qm wait [vmid]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --timeout _seconds_ do in qm-wait?

Maximum time to wait synchronously before returning. Set to 0 to deactivate. If reached, the command returns with the PID.