qm-sendkey
Send keystrokes to a virtual machine console
TLDR
Send the specified key event to a specific virtual machine
Allow root user to send key event and ignore locks
SYNOPSIS
qm sendkey
PARAMETERS
vmid
The unique numerical identifier of the virtual machine.
keys
A string representing the keys to send. This string can include special key names (e.g., 'Ctrl', 'Alt', 'Shift', 'Enter', 'Tab'). Multiple keys are typically combined.
Example: 'Ctrl+Alt+Del' or 'Alt+F1'
DESCRIPTION
The `qm-sendkey` command is used within the Proxmox VE environment to send keystrokes directly to a running QEMU/KVM virtual machine.
This is particularly useful when direct console access is limited or unavailable, or when automated tasks require input into the guest operating system. It allows simulating keyboard input without needing to physically interact with the VM's console window. The command works by communicating with the QEMU process managing the VM and injecting the specified keys into the guest's virtual keyboard buffer.
Note: For the command to function correctly, the Proxmox VE environment must be properly configured and the specified VM must be running.
KEY NAME SYNTAX
Special keys are denoted with their names (e.g., 'Ctrl', 'Shift', 'Alt'). Key combinations are joined with '+'. For example, to send Ctrl+Alt+Del, use 'Ctrl+Alt+Del'. Case matters for key names.
ERROR HANDLING
If the VM ID is invalid or the VM is not running, `qm-sendkey` will return an error message.
PROXMOX VE INTEGRATION
This command is designed specifically for use within the Proxmox VE virtualization platform and leverages Proxmox's APIs to interact with QEMU/KVM VMs.