← 返回命令列表

Linux command

qm-sendkey 命令

安全

涉及管道、覆盖或删除,执行前请先确认路径和参数。

常用示例

Send

qm sendkey [vmid] ctrl-alt-delete

Example

qm sendkey [vmid] ret

Example

qm sendkey --skiplock [vmid] [key]

说明

qm sendkey sends a QEMU monitor encoding key event to a running virtual machine. This is useful for sending keyboard input such as `ctrl-alt-delete` or function keys directly to the VM console without needing graphical access. Key names follow QEMU monitor encoding: alphanumeric characters are written literally, special keys use names like `ret`, `esc`, `tab`, `spc`, `f1`–`f12`, `up`, `down`, `left`, `right`, and modifier combinations use hyphens (e.g. `ctrl-alt-delete`, `meta_l-r`).

参数

--skiplock _boolean_
Ignore VM locks and force key send. Requires root privileges.

FAQ

What is the qm-sendkey command used for?

qm sendkey sends a QEMU monitor encoding key event to a running virtual machine. This is useful for sending keyboard input such as `ctrl-alt-delete` or function keys directly to the VM console without needing graphical access. Key names follow QEMU monitor encoding: alphanumeric characters are written literally, special keys use names like `ret`, `esc`, `tab`, `spc`, `f1`–`f12`, `up`, `down`, `left`, `right`, and modifier combinations use hyphens (e.g. `ctrl-alt-delete`, `meta_l-r`).

How do I run a basic qm-sendkey example?

Run `qm sendkey [vmid] ctrl-alt-delete` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --skiplock _boolean_ do in qm-sendkey?

Ignore VM locks and force key send. Requires root privileges.