1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-08-08 20:55:42 +02:00

pct-create: add page (#17492)

This commit is contained in:
Managor 2025-08-06 19:02:29 +03:00 committed by GitHub
parent 16c47eed2f
commit 9b9d67762a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

24
pages/linux/pct-create.md Normal file
View file

@ -0,0 +1,24 @@
# pct create
> Create LXC containers in Proxmox.
> More information: <https://pve.proxmox.com/pve-docs/pct.1.html>.
- 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`