LinuxCommandLibrary

qm-guest-exec

Run commands inside a Proxmox VM

TLDR

Execute a command via guest agent

$ qm guest exec 100 command arg1 arg2
copy
Execute asynchronously
$ qm guest exec 100 command --synchronous 0
copy
Execute with timeout of 10 seconds
$ qm guest exec 100 command --timeout 10
copy
Execute and forward stdin to guest
$ qm guest exec 100 command --pass-stdin 1
copy

SYNOPSIS

qm guest exec vmid command [arguments...] [options]

DESCRIPTION

qm guest exec executes commands inside a virtual machine through the QEMU guest agent. This allows host-level control over guest operations without network access to the VM.
The guest agent must be installed and running inside the VM for this to work.

PARAMETERS

--synchronous 0|1

Run synchronously (default) or asynchronously
--timeout seconds
Command timeout in seconds
--pass-stdin 0|1
Forward stdin to guest agent

CAVEATS

Requires QEMU guest agent to be installed and running in the VM. Some commands may require specific permissions within the guest OS.

HISTORY

Part of Proxmox VE QEMU/KVM management tools. Guest agent communication provides out-of-band management capabilities.

SEE ALSO

qm(1), qm-agent(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community