Skip to content

Proxmox LXC Stuck Mounting Root Filesystem: Start Failure Triage

In Proxmox VE, an LXC container that stops at mounting root filesystem, reports start failed, or leaves a task log ending on a mount line is one of the most misread failures in daily ops. All of them look like "mount failed," but the broken link can be anywhere: storage unavailable, a locked volume, a mount point left inconsistent by a snapshot rollback, AppArmor blocking a custom mount, or a namespace declaration written incorrectly. This guide narrows those through five layers. Every command comes from the official pct(1) manual; commands the manual does not quote verbatim are marked as such, so check them with --help in your environment.

The reading key first: once a container is down, you cannot inspect it from inside, so all evidence must be collected on the host. The Obtaining Debugging Logs section of pct(1) is direct: when pct start cannot start a container, collect debugging output by passing the --debug flag, or use lxc-start to save a debug log to a file. Do that properly before proposing a fix. The same evidence-first habit appears in Proxmox Snapshot Rollback and qcow2 Triage, though that article covers VM disks rather than the LXC rootfs chain.

1. Layer one: get the raw error with the official debug commands

Everything downstream depends on this log. The pct(1) manual gives two commands verbatim (replace CTID with your container ID):

pct start CTID --debug
lxc-start -n CTID -F -l DEBUG -o /tmp/lxc-CTID.log

The manual explains the second as attempting to start the container in foreground mode and saving the debug log to the file named by -o; to stop the container, run pct shutdown CTID or pct stop CTID in a second terminal, and the log is written to /tmp/lxc-CTID.log. It defines --debug as enabling a very verbose debug log level on start.

Two field notes. First, writing the log to a file instead of scrolling it means you can archive the failing line with its context; in foreground mode, closing the terminal destroys the scene. Second, do not click start repeatedly: each attempt mixes lock state and log timeline, making the result harder to read. After the foreground check, stop the container the way the manual prescribes, then move to the next layer.

The most valuable line in the log names the object that failed to mount - a path, a volume, or a filesystem type. Copy it down as the baseline for every later layer. If the log fails earlier, before reaching mount (configuration parsing, for example), the problem is not rootfs mounting; fix configuration or namespace declarations first.

2. Layer two: which volume is rootfs, and is the storage online?

The container configuration lives at /etc/pve/lxc/CTID.conf, which the pct(1) manual lists as the container configuration file, replicated to cluster nodes. Look at its rootfs line:

grep -E '^(rootfs|mp[0-9]+):' /etc/pve/lxc/CTID.conf
pct config CTID
pvesm status

pct config CTID is a documented pct(1) subcommand. pvesm status is the Proxmox storage command for listing storage state; the pct manual does not quote this syntax verbatim, so trust your pvesm --help. How to read it:

  • If the storage holding the rootfs volume is down or unavailable, the mount failure is a result, not the cause. Fix storage reachability - link, authentication, target service - before touching container configuration.
  • Storage online but the volume missing: it may have been deleted, the path changed after a migration, or a snapshot rollback pointed the volume at a nonexistent object. Only now compare backups and snapshots.
  • Shared storage: confirm this node can see the same volume as other nodes. If only one node fails to start, suspect that node's storage path rather than rootfs itself.

The classic mistake is inspecting from inside the container. It never started, so nothing is mounted there. Also, seeing a volume file on the host does not prove it can be mounted: readability and mount semantics are different questions.

3. Layer three: mount points, locks, and leftover state

Once the volume itself checks out, failures usually come from who mounts it, where, and whether someone still holds it. The pct(1) manual says pct mount mounts the container filesystem on the host, is meant for emergency maintenance only, and holds a lock that prevents operations other than start and stop. That description itself points at two failure sources: a leftover mount and an unreleased lock.

pct status CTID
pct config CTID
pct mount CTID
pct unmount CTID
pct unlock CTID

All five are documented pct(1) subcommands; unlock clears locks. Read in this order:

  • pct status CTID shows current state. If a task is still starting or holding a lock, check for unfinished background tasks before issuing concurrent operations.
  • If you ran pct mount for maintenance, run pct unmount before starting. The manual is explicit that the operation holds a lock; forgetting it makes startup look stuck at mounting.
  • Leftover mount points: a stale host directory still holding a dead volume can make a new mount fail. Check those with standard mount or findmnt commands, which pct(1) does not quote verbatim - verify with local --help.
  • Snapshot-related failures: a snapshot or rollback can change volume state and mount paths, so compare snapshot and failure timestamps. The VM-side traps are covered in Proxmox Snapshot Rollback and qcow2 Triage, but LXC rootfs and qcow2 are different mechanisms; do not carry conclusions across.

pct unlock clears a lock, but the lock is a symptom. If every start leaves one, return to the layer-one log for the real failure or you are only cleaning up after it.

4. Layer four: AppArmor and custom mounts

When the log points at permission denial, especially for a custom bind mount or a nonstandard path, go to AppArmor. The pct(1) manual states that AppArmor profiles restrict possibly dangerous actions and that some system calls, mount among them, are prohibited; it gives dmesg | grep apparmor to trace AppArmor activity.

dmesg | grep apparmor
grep -E '^(lxc\.|hookscript|features)' /etc/pve/lxc/CTID.conf

The first command is quoted in the manual; the second filters container configuration for declarations that may trigger custom mounts and is standard grep usage. The manual also says that, although not recommended, AppArmor can be disabled by adding lxc.apparmor.profile = unconfined to /etc/pve/lxc/CTID.conf, and immediately explains the security risk: misconfiguration or an LXC/kernel vulnerability can allow privilege escalation from inside the container.

So proceed in order: confirm it really is an AppArmor denial with dmesg | grep apparmor, see which path or operation was denied, and judge whether the custom mount is necessary or can be expressed a supported way. Consider unconfined only for a trusted workload where you understand the risk; for multi-tenant or untrusted workloads it is not a solution. There is no "just try it" here: the manual states the risk plainly and whoever uses it owns the consequence.

5. Layer five: namespaces and feature declarations

If the first four layers are clean and the log still reports a mount failure, look last at the container's namespace and feature configuration. The pct(1) manual references OS config files such as /usr/share/lxc/config/<ostype>.common.conf and lists /etc/pve/lxc/<CTID>.conf as the container configuration; custom lxc.* lines change LXC mount and namespace behavior.

The method here is minimizing difference: comment out the non-default lxc.* lines one at a time, restore one at a time, and start after each, using the layer-one log to decide which line introduced the failure. Unprivileged containers, idmaps, nested features, and bind mounts to host paths deserve special suspicion because they change identity and permission mapping at mount time. Note that the manual has no table stating which lxc.* line causes a mounting rootfs failure, so this is a method, not a guarantee; trust your installed LXC version and the local pct help or container configuration manual.

Containers that survived an upgrade belong in this layer too: a new kernel or LXC version can change defaults and make an old custom declaration invalid. That is a different chain from a host upgrade breaking the GUI, but the discipline is the same - see Proxmox VM Network Triage: Bridge vs NAT and Proxmox PCI Passthrough and IOMMU Triage for other layered, path-first triage.

6. One tree: symptom to next cut

Compress the five layers into executable tests:

  • Log fails before mount at all: fix configuration parsing or namespace declarations; return to layer five.
  • Log names a specific volume that failed to mount: copy it, then confirm the rootfs line and storage state in layer two.
  • Storage down or volume invisible: fix the storage path and authentication; do not touch container configuration.
  • Storage fine but start still fails and you previously ran pct mount: run pct unmount, confirm the lock is gone, then start.
  • Permission denial in the log and dmesg | grep apparmor has output: go to layer four, judge whether the custom mount is needed, and treat unconfined with care.
  • All clean, and configuration has non-default lxc.* lines: layer five, minimize differences, restore one line at a time.
  • Every start fails at the same point and leaves a lock: take a fresh layer-one log; do not just run pct unlock and hide the symptom.

Each step answers one yes/no question. The worst habit in container triage is "fixing every suspicious line at once": even if recovery follows, you will not know which change mattered, and the same incident will cost the same time again.

7. Acceptance checklist before calling it done

  • Full log captured with pct start CTID --debug or lxc-start -n CTID -F -l DEBUG -o /tmp/lxc-CTID.log, with the failing mount line archived
  • Volume name and storage location confirmed from the rootfs line of /etc/pve/lxc/CTID.conf
  • Storage confirmed online and the volume visible on this node
  • No leftover pct mount mount or unreleased lock; pct status CTID normal
  • AppArmor denial verified with dmesg | grep apparmor; if unconfined is used, risk and reason recorded
  • Non-default lxc.* declarations checked one at a time, never several changes at once
  • Foreground debug process cleaned up with pct shutdown CTID or pct stop CTID as the manual prescribes
  • LXC and PVE versions recorded; commands not quoted verbatim in the manual re-checked with --help

The entry point for scripting is clear: combine pct status, the rootfs line of pct config, storage state, AppArmor output, and lock state into one diagnostic dump. Walk the five layers by hand first, though, or the script will collect data without knowing how to read it.