LinuxCommandLibrary

qm-guest-exec-status

Check status of guest-executed command

TLDR

Print the status of a specific PID

$ qm guest exec-status [vm_id] [pid]
copy

SYNOPSIS

qm guest exec-status

PARAMETERS


    The virtual machine or container ID.


    The process ID of the guest execution task to query.

DESCRIPTION

The `qm-guest-exec-status` command is a utility provided by Proxmox Virtual Environment (PVE) for querying the status of guest execution tasks initiated using `qm guest exec`. This command allows administrators to monitor the progress and results of commands or scripts executed within a guest virtual machine (VM) or container (CT) without directly logging into the guest. It provides information about the task's overall state (running, completed, failed), the process exit code, and any associated output (stdout and stderr).

By using this command, you can track asynchronous operations performed inside a guest, simplifying automation and troubleshooting tasks. For example, you can use it to verify that a software installation or configuration change was successfully applied to a VM or CT after launching the operation via `qm guest exec`. The command returns structured output (typically in JSON format) which enables easy parsing and integration into scripts and management tools.

This avoids polling the guest directly or writing output to shared storage just to determine if an operation completed successfully.

OUTPUT INTERPRETATION

The command output is typically in JSON format. Key fields include:
status: running, completed, failed.
exitcode: The exit code of the executed process (0 for success).
stdout: Standard output from the process.
stderr: Standard error output from the process.

SEE ALSO

qm(1), qm guest exec(1)

Copied to clipboard