dsh-pve-vm: Manipulating VM Consoles on Proxmox VE via SSH

Preface

Many “computer use”-style plugins in DeepSeek Harness (DSH) take screenshots on the agent host and inject keyboard/mouse events, so the host typically needs X11 or Wayland plus screenshot and input tooling. If the target is a virtual machine running on a Proxmox VE node—the host can be a headless server, a Wayland desktop, or even another machine—this path is not a good fit.

Below is the community plugin dsh-pve-vm (maintainer taxah92; GitHub: taxah92/dsh-pve-vm). It connects to a PVE node over a single SSH connection, uses qm vncproxy to view the VM display and click in the console, and uses qm guest exec to run commands and read/write files via the QEMU Guest Agent. It does not rely on installing a desktop stack on the DSH host, and it does not require additional runtime dependencies on the node (RFB, DES authentication, keysym, and PNG encoding are all implemented inside the plugin package).

What Is This

dsh-pve-vm is a client-side plugin in the DSH plugin directory: it provides a Proxmox VE settings card and a live “VM screen” panel on the right in the Web UI, and it mounts a set of tools onto the Harness’s computerUse and related capabilities.

The data path can be summarized as:

agent ──► plugin ──► ssh ──► node: qm vncproxy ──► unix socket /var/run/qemu-server/<vmid>.vnc
                      └────► node: qm guest exec ──► qemu-guest-agent inside the VM

The README states that it has been verified on pve-manager 8.4.21, with Windows 11 / Windows Server 2025 and Linux guests, and DeepSeek Harness 0.2.0-rc.2. The current npm package version is 0.2.4, licensed under MIT.

Core Features

Console (VNC)

  • Display: console_shot returns an inline image of the VM screen, with region and scale controls to manage token cost; mouse/keyboard tools use VM screen coordinates.
  • Input: move, click, double-click, drag, wheel, ASCII typing, key combinations, and console_batch to chain multiple steps and return a single frame.
  • Reliable typing: uppercase via Caps Lock (qm monitor → HMP sendkey); Shifted symbols via RFB keysym with a settle delay, making it easier to enter passwords on the Windows login screen.
  • Unicode and clipboard: Windows guests can use a scheduled task with SendKeys; Linux uses xdotool/wtype via the guest agent. console_paste writes to the guest clipboard via RFB and then Ctrl+V; console_clipboard reads text back to avoid OCR.

Guest (QEMU Guest Agent, optional)

Without the agent installed, the console tools remain available. After installing qemu-guest-agent, you can also use:

  • vm_exec, vm_file_read, vm_file_write, vm_status, etc., suitable for deterministic, low-overhead tasks; use pixels via the GUI only when necessary.

Web Side

  • The settings card supports English, Russian, and Chinese labels, written into the profile patch layer.
  • The “VM screen” sidebar shows frames from the same VNC session as the agent; it can follow the agent’s current VM or be manually selected; it is view-only and does not inject clicks into the VM.

Environment and Dependencies

Requirement Notes
DeepSeek Harness ≥ 0.2.0-rc.2 Uses the 0.2.x plugin contract (defineTool, ctx.tools, computerUse, configForms, etc.); not loaded on 0.1.x
Node.js ≥ 22 Harness runtime
Proxmox VE node and qm CLI Requires qm vncproxy, qm guest exec, qm monitor; LXC containers are not supported
SSH to the node as root (or an account that can run qm) Key-based login recommended (BatchMode, no password prompts)
AcceptEnv LC_* in the node’s sshd_config The VNC ticket is passed via LC_PVE_TICKET with SendEnv, keeping it out of ps; if not configured, ssh silently discards it and the console cannot authenticate
Host keys already trusted BatchMode=yes by default; you can manually ssh <node> once, or add StrictHostKeyChecking=accept-new in sshExtraOptions
qemu-guest-agent inside the guest (optional) Required only for vm_* tools

Installation and Enabling

The plugin runs with the current DSH process privileges; before installing, review the source code and MIT license in the GitHub repository.

  1. Add the bundle:
dsh plugin --profile web add github:taxah92/dsh-pve-vm
  1. Ensure the profile’s dsh.profile.bundles contains "dsh-pve-vm" (equivalent to enabling via the plugin marketplace).

  2. Restart the Harness: the plugin host portion is loaded only once per process.

After installation, the patch layer gains one line (do not change id; pve-vm is the settings namespace):

- id: pve-vm
  name: dsh-pve-vm

Configuration

In the Web UI: Settings ▸ Plugins ▸ Proxmox VE. You can also edit directly in the profile patch, for example:

- id: pve-vm
  name: dsh-pve-vm
  config:
    sshHost: proxmox
    sshUser: root
    sshPort: 22
    sshKeyPath: ''
    sshConfigFile: ''
    sshExtraOptions: []
    allowVmids: [100, 101]
    enableConsole: true
    enableGuest: true
    inputChannel: auto
    sendkeyDelayMs: 80
    consoleTimeoutMs: 20000
    sessionIdleMs: 300000
    guestTimeoutMs: 60000
    guestTypeCommand: ''
    viewAutoOpen: false
    viewFollowAgent: true
    viewFps: 2
    viewScale: 2

Recommended first-run steps:

  1. By default, if allowVmids is empty, no VM is allowed; this is the plugin’s only access gate. Always explicitly fill in VMIDs.
  2. On the DSH host, run ssh <alias> 'qm status <vmid>' and confirm it succeeds without a password.
  3. ssh <alias> sshd -T | grep -i acceptenv should include LC_*.
  4. Call vm_status: check whether the VM is allowed, whether the guest agent responds, the detected guest OS, and whether a console session is open.

Typical Usage

When the agent needs a GUI, it calls console_shot to capture a frame, then uses console_click, console_type, or console_batch to operate; when shell or file APIs can be used, prefer vm_exec, vm_file_read / vm_file_write.

Summary of common console tools (parameters are defined in the README):

Tool Purpose
console_shot Take a screenshot; scale 1 / 0.5 / 0.25; near-uniform frames may be labeled blank
console_click Click; count=2 is double-click; returns a frame by default
console_type Printable ASCII; \n is Enter; uppercase is slower (about 0.1 s/character)
console_key Key combinations such as enter, ctrl+alt+del, win+r
console_paste Paste arbitrary Unicode via the clipboard (requires clipboard-capable VGA/SPICE support)
console_release Close the console session for that VM

Use Cases and Cautions

Suitable for: Windows/Linux GUIs already running on Proxmox VE, or VMs that have not fully booted, where the agent should “see and click” on the remote node while using the guest agent for command and file operations; the DSH host does not need to be on the same machine as the controlled desktop.

Notes:

  • Only KVM/QEMU VMs, not LXC.
  • Misconfigured SSH or allowVmids can lead to total failure to operate or accidental operation on unauthorized VMs; use vm_status to self-check.
  • console_paste / clipboard capabilities depend on guest and display device configuration, which differs from the pure VNC screenshot path.
  • The community plugin directory SkillHub entry is not officially affiliated with DeepSeek / High-Flyer; the DSH ecosystem is “everything is a plugin,” and you must evaluate installation and authorization policies yourself.

Closing

dsh-pve-vm consolidates VM consoles and guest agents on Proxmox VE into a single SSH-based toolchain, allowing the Harness to drive VM GUIs without being tied to a local desktop, while complementing commands and files through the guest channel. Directory page: https://www.skillhub.cn/plugins/taxah92/dsh-pve-vm; source code and full tool table: https://github.com/taxah92/dsh-pve-vm.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye