Forrest logo
back to the qm tool

qm-guest-exec:tldr:afba2

qm-guest-exec: Execute a specific command via a guest agent.
$ qm guest exec ${vm_id} ${command} ${arg1 arg2 ---}
try on your machine

This command is used to execute a command inside a guest virtual machine (VM) using the "qm" tool. Let's break down the different parts of the command:

  • qm: This is the tool or command that is being used to interact with the Proxmox Virtual Environment (PVE) hypervisor. It stands for "Qemu Manager", where "qemu" refers to the underlying virtualization technology used by Proxmox.

  • guest: This specifies that the command is related to a guest VM.

  • exec: This specifies that we want to execute a command inside the guest VM.

  • ${vm_id}: This is a placeholder for the ID of the virtual machine where the command will be executed. The actual ID value should be provided in place of ${vm_id}.

  • ${command}: This is a placeholder for the command that should be executed inside the guest VM. Examples of commands could be running a script, starting a service, or executing a specific program. The actual command should be provided in place of ${command}.

  • ${arg1 arg2 ---}: These are placeholders for any additional arguments or options that are required by the command being executed inside the guest VM. Examples of arguments could be input files, output files, or specific options for the command. The actual arguments should be provided in place of ${arg1 arg2 ---}.

Note that the placeholders (${vm_id}, ${command}, ${arg1 arg2 ---}) need to be replaced with appropriate values specific to your environment and the desired command to be executed.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the qm tool