From 9b9d67762a6c166d3e01e98a8e3c22428f59892b Mon Sep 17 00:00:00 2001 From: Managor <42655600+Managor@users.noreply.github.com> Date: Wed, 6 Aug 2025 19:02:29 +0300 Subject: [PATCH] pct-create: add page (#17492) --- pages/linux/pct-create.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 pages/linux/pct-create.md diff --git a/pages/linux/pct-create.md b/pages/linux/pct-create.md new file mode 100644 index 0000000000..43a46bc5a3 --- /dev/null +++ b/pages/linux/pct-create.md @@ -0,0 +1,24 @@ +# pct create + +> Create LXC containers in Proxmox. +> More information: . + +- Create a container from a template with 4GB size, give it 512MiB of memory and unlimited access to CPU: + +`pct {{[cr|create]}} {{100}} {{local:vztmpl/distro-name.tar.zst}} --rootfs {{local-lvm}}:4` + +- Create a container from a template and give it a specific memory limit in megabytes: + +`pct {{[cr|create]}} {{100}} {{local:vztmpl/distro-name.tar.zst}} --rootfs {{local-lvm}}:{{4}} --memory {{8192}}` + +- Create a container from a template and give it a hostname and a password: + +`pct {{[cr|create]}} {{100}} {{local:vztmpl/distro-name.tar.zst}} --rootfs {{local-lvm}}:{{4}} --hostname {{hostname}} --password {{password}}` + +- Create a container from a template and give it network access: + +`pct {{[cr|create]}} {{100}} {{local:vztmpl/distro-name.tar.zst}} --rootfs {{local-lvm}}:{{4}} --net0 name={{eth0}},bridge={{vmbr0}},ip={{dhcp|manual|10.0.0.1/24}} --features nesting=1` + +- Start a container immediately after creation: + +`pct {{[cr|create]}} {{100}} {{local:vztmpl/distro-name.tar.zst}} --rootfs {{local-lvm}}:{{4}} --start`