LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

qm-guest

Interact with Proxmox VM guest agent

TLDR

Check command execution status
$ qm guest exec-status vm_id pid
copy
Set user password interactively
$ qm guest passwd vm_id username
copy
Set hashed password
$ qm guest passwd vm_id username --crypted 1
copy
Execute guest agent command
$ qm guest cmd vm_id fsfreeze-freeze
copy
Execute command in guest
$ qm guest exec vm_id command arg1 arg2
copy
Execute asynchronously
$ qm guest exec vm_id command --synchronous 0
copy
Execute with timeout
$ qm guest exec vm_id command --timeout 10
copy
Execute with stdin forwarding
$ qm guest exec vm_id command --pass-stdin 1
copy

SYNOPSIS

qm guest cmd vmid [OPTIONS]

DESCRIPTION

qm guest interacts with the QEMU Guest Agent running inside a virtual machine. It allows executing commands, managing user accounts, and running guest agent operations like filesystem freeze/thaw for consistent backups.

PARAMETERS

cmd

Subcommand: cmd, exec, exec-status, passwd
vmid
The numeric ID of the virtual machine
--timeout seconds
Timeout for command execution
--synchronous boolean
Run command synchronously (default) or asynchronously
--pass-stdin boolean
Forward stdin to the guest agent
--crypted boolean
Password is already hashed

CAVEATS

Requires the QEMU Guest Agent (qemu-guest-agent) to be installed and running inside the VM. The guest agent must be enabled in the VM configuration (Agent: Enabled). Communication occurs through a virtio serial device, independent of network connectivity.

HISTORY

qm guest is part of the Proxmox VE virtualization platform for managing QEMU/KVM virtual machines through the guest agent.

SEE ALSO

qm(1), qm-start(1), qm-stop(1)

Copied to clipboard
Kai