pct-status
Check Proxmox container status
TLDR
Display if the container is running
Display detailed container information
SYNOPSIS
pct status <vmid>
(<vmid> is the numeric ID of the LXC container)
DESCRIPTION
pct status is a command-line utility used within Proxmox Virtual Environment (PVE) to ascertain the operational status of a specific Linux Container (LXC). Unlike virtual machines (KVM), LXC containers share the host kernel, and pct status provides a quick and precise snapshot of whether a container is running, stopped, or experiencing issues. It is part of the proxmox-tools suite and is essential for administrators to monitor and manage the state of their containerized workloads. The command requires a Container ID (VMID) as an argument and returns a simple string indicating the container's current state, such as "running", "stopped", or "unknown". This information is crucial for scripting, automation, and general system monitoring, allowing users to verify if a container is in the expected state before performing further actions like starting, stopping, or migrating it.
CAVEATS
Proxmox VE Specific: This command is exclusive to Proxmox Virtual Environment installations and will not be found on standard Linux distributions without PVE.
LXC Only: It operates solely on Linux Containers (LXC) and cannot be used for KVM virtual machines; use qm status for KVM VMs.
Permissions: Requires root privileges or appropriate sudo permissions to execute.
VMID Required: Always requires a valid Container ID (VMID) as an argument. It cannot be used to list the status of all containers (use pct list for that).
OUTPUT VALUES
The command typically returns one of the following simple strings:
running: The container is active and operational.
stopped: The container is currently shut down.
unknown: The status could not be determined, often indicating an issue with the container or Proxmox services.
suspended: The container state has been frozen to disk or memory (less common for LXC than for KVM).
USAGE EXAMPLE
To check the status of an LXC container with VMID 101:
# pct status 101
Expected output:
running
or
stopped
HISTORY
The pct command suite was developed as an integral part of Proxmox Virtual Environment to provide robust command-line management for LXC containers. As Proxmox VE evolved to support both KVM and LXC technologies, a dedicated set of tools for container management became necessary. pct status emerged as a fundamental utility, alongside other pct sub-commands, to offer granular control and immediate feedback on container states, reflecting the growing adoption of containerization in virtualization platforms.