kvm.screenshot

kvm.screenshot

Save a screenshot of a running KVM virtual machine.

JSON-RPC Request

{"jsonrpc":"2.0","id":1,"method":"kvm.screenshot","params":{"hostname":"kvm1","base64":false}}

Request Parameters

ArgumentTypeDescriptionRequiredDefault
hostnameStringThe name of the virtual machine.Yes-
base64BooleanWhether to return the screenshot as a base64-encoded string. If true, the screenshot isn't saved and is only returned as a base64-encoded string. If false, the screenshot is saved to the /tmp directory on the host. In the RVC CLI, use --base64 or --no-base64.Nofalse

JSON-RPC Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "path": "/tmp/screenshot_kvm1_2025-06-16-19-10-20.702-UTC.png"
  }
}

RVC CLI Example

rvc kvm screenshot --hostname kvm1 --no-base64

Response

Path: /tmp/screenshot_kvm1_2025-06-16-19-10-48.428-UTC.png