LinuxCommandLibrary

pct-create

creates a new LXC container in Proxmox VE from a template image

TLDR

Create container with disk size

$ pct create 100 local:vztmpl/distro.tar.zst --rootfs local-lvm:4
copy
Create with memory limit
$ pct create 100 local:vztmpl/distro.tar.zst --rootfs local-lvm:4 --memory 8192
copy
Create with hostname and password
$ pct create 100 local:vztmpl/distro.tar.zst --rootfs local-lvm:4 --hostname name --password pass
copy
Create with network
$ pct create 100 local:vztmpl/distro.tar.zst --rootfs local-lvm:4 --net0 name=eth0,bridge=vmbr0,ip=dhcp
copy
Create and start immediately
$ pct create 100 local:vztmpl/distro.tar.zst --rootfs local-lvm:4 --start
copy

SYNOPSIS

pct create vmid template [OPTIONS]

DESCRIPTION

pct create creates a new LXC container in Proxmox VE from a template image. It configures storage, networking, resources, and other container properties during creation.

PARAMETERS

vmid

The numeric ID for the new container
template
Path to the container template (e.g., local:vztmpl/distro.tar.zst)
--rootfs storage:size
Root filesystem storage and size in GB
--memory megabytes
Memory limit in MB
--hostname name
Container hostname
--password password
Root password for the container
--netN config
Network interface configuration
--features list
Enable features like nesting
--start
Start container after creation

CAVEATS

Templates must be downloaded or uploaded to Proxmox storage first. The container ID must be unique across the cluster. Enable nesting for containers that run Docker or other containers inside.

HISTORY

pct create is part of the Proxmox VE virtualization platform for managing LXC containers.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community