Pcornel
Automation · Proxmox Automation

LXC Provisioning

Cheat sheet · https://pcornel.dk/topic.php?topic=5723

Back to the Topic

Answer

LXC provisioning in Proxmox creates containers from templates with pct create or the API, setting CPU, memory, rootfs, network and SSH keys, much faster than full VMs.

Remember

  • pct create builds containers from templates.
  • Containers start much faster than VMs.
  • Unprivileged containers are safer.

First checks

  • pct create <id> <storage>:vztmpl/<tmpl> --hostname <n> --unprivileged 1 --net0 name=eth0,bridge=vmbr0,ip=dhcp — create
  • pct start <id> — start
  • pct config <id> — verify

Verify in this order

template → pct create → start → configure

Where it usually breaks

Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5723

Confirmation

Confirm action

Continue?