Using pct
in Proxmox VE
Proxmox VE (PVE) is a powerful open-source virtualization platform that supports both LXC containers and KVM virtual machines. The pct
command line tool is specifically designed to manage LXC containers. Below is a detailed step-by-step guide to help master the pct
command.
1. Prerequisites
Before using pct
, ensure:
- Necessary OS templates (e.g., Ubuntu, Debian, CentOS) are downloaded from the Proxmox template repository.
2. Basic Commands
2.1 Create a New Container
To create a new LXC container, use the pct create
command.
pct create <vmid> <ostemplate> [options]
Example:
pct create 100 local:vztmpl/ubuntu-22.04-standard_22.04-1_amd64.tar.gz \
--storage local-lvm \
--rootfs 8G \
--hostname mycontainer \
--memory 1024 \
--cores 1 \
--net0 name=eth0,bridge=vmbr0,ip=dhcp
Explanation:
100
: The unique ID for the container.local:vztmpl/ubuntu-22.04-standard_22.04-1_amd64.tar.gz
: The OS template to use.--storage local-lvm
: The storage where the container will be created.--rootfs 8G
: Allocate 8GB of disk space for the root filesystem.--hostname mycontainer
: Set the hostname for the container.--memory 1024
: Allocate 1024MB of RAM.--cores 1
: Assign 1 CPU core.--net0
: Configure the network interface (DHCP in this case).
2.2 Start a Container
To start a container, use the pct start
command.
pct start <vmid>
Example:
pct start 100
2.3 Stop a Container
To stop a running container, use the pct stop
command.
pct stop <vmid>
Example:
pct stop 100
2.4 Restart a Container
To restart a container, use the pct restart
command.
pct restart <vmid>
Example:
pct restart 100
2.5 Access the Container's Shell
To access the container's shell, use the pct enter
command.
pct enter <vmid>
Example:
pct enter 100
2.6 List All Containers
To list all containers on the node, use the pct list
command.
pct list
Output Example:
VMID Status Lock Name
100 running lxc-100
101 stopped lxc-101
2.7 Modify Container Configuration
To modify a container's configuration, use the pct set
command.
pct set <vmid> [options]
Example (Increase Memory Limit):
pct set 100 --memory 2048
Example (Add a Mount Point):
pct set 100 --mp0 /mnt/data,/mnt/data,ro
2.8 Clone a Container
To clone an existing container, use the pct clone
command.
pct clone <source-vmid> <new-vmid> [options]
Example:
pct clone 100 101 --storage local-lvm
2.9 Backup a Container
To create a backup of a container, use the vzdump
command.
Example:
Backup Container ID 302 (Stopped Mode)
vzdump 302 --compress zstd --mode stop --storage local
Backup Container ID 101 (Snapshot Mode)
vzdump 101 --compress lzo --mode snapshot --storage nas_backup
--compress
: gzip
(standard), lzo
(fast), zstd
(best balance)
--mode
:
stop
(service interruption, maximum consistency)snapshot
(live backup, requires supported filesystem)
--storage
: Target storage ID (view with pvesm list
)
Multi LXC Backup
vzdump 100 101 102 --mode stop --storage local --compress zstd
2.10 Restore a Container
To restore a container from a backup, use the pct restore
command.
pct restore <vmid> <backup-file> [options]
Example:
pct restore 100 /var/lib/vz/dump/vzdump-lxc-100-2023_10_01-12_00_01.tar.gz
2.11 Destroy a Container
To permanently delete a container.
pct destroy <vmid> --purge
<vmid>
: The ID of the container to be destroyed.--purge
: Removes all associated data, including backups and configuration files.
Example:
pct destroy 100 --purge
3. Advanced Usage
3.1 Mount Host Directories
Directories from the host can be mounted into the container.
Example:
pct set 100 --mp0 /mnt/host-data,/mnt/container-data,ro
3.2 Configure Networking
Static IPs or additional network interfaces can be configured.
Example (Static IP):
pct set 100 --net0 name=eth0,bridge=vmbr0,ip=192.168.1.100/24,gw=192.168.1.1
Set VLAN
Static IP Example:
pct set 100 --net0 name=eth0,bridge=vmbr0,tag=10,ip=192.168.10.100/24,gw=192.168.10.1
- Sets the VLAN tag to
10
for theeth0
interface.- Connects the interface to the
vmbr0
bridge.- Assigns a static IP address
192.168.10.100/24
and gateway192.168.10.1
.
DHCP Example:
pct set 100 --net0 name=eth0,bridge=vmbr0,tag=10,ip=dhcp
- Multiple network interfaces can be configured by incrementing the
--netX
option (e.g.,--net1
,--net2
).- Ensure the VLAN is properly configured on the Proxmox host's network bridge (e.g.,
vmbr0
orvmbr1
).
3.3 Resource Limits
CPU and memory limits can be set for the container.
Example:
pct set 100 --memory 4096 --cores 2
4. Troubleshooting
- Container Fails to Start: Check logs using
pct logs <vmid>
. - Network Issues: Verify the network configuration with
pct config <vmid>
.
5. Help and Documentation
- Use
pct help
to see a list of available commands. - For detailed documentation, use
man pct
.
6. Automate to creation of an LXC container in Proxmox VE (PVE).
Script Overview
- Prompts the user for input (LXC ID and password).
- Checks if the LXC ID already exists and handles conflicts.
- Downloads the LXC template if it doesn't already exist.
- Creates a new LXC container with specified configurations.
- Appends additional configuration to the container's configuration file.
wget -q https://kingtam.win/usr/uploads/script/lxc-create.sh -O lxc-create.sh && chmod +x lxc-create.sh && bash ./lxc-create.sh
Conclusion
The pct
command line tool is a powerful way to manage LXC containers in Proxmox VE. With this guide, creating, configuring, and managing containers efficiently should be straightforward. For further questions or assistance, additional resources are available in the Proxmox documentation.
tor drug market nexus market darknet darknet drug market dark markets
darknet markets links darknet markets darkmarket link dark web link
darkmarket 2025 dark web market urls darkmarket nexus darknet url
darknet markets url nexus onion mirror dark web link darknet sites
nexus official site darknet site nexus darknet shop nexus darknet shop
dark web marketplaces darknet marketplace darknet drugs dark websites
dark markets 2025 nexus site official link bitcoin dark web darknet drug links
nexus darknet shop nexus darknet link dark market url darknet drugs
dark websites nexus onion mirror nexus dark nexus market link
nexus darknet shop dark markets 2025 darknet market lists darknet markets url
tor drug market nexus site official link nexus darknet market nexus darknet market
dark markets 2025 bitcoin dark web darknet drugs nexus url
darknet markets nexus onion link darknet market links nexus market darknet
nexus onion darknet markets onion address nexus market link dark markets
dark market list nexus official link dark market 2025 nexus official site
darknet links dark market list dark websites darknet drug market
darkmarket list dark market list dark web markets dark market list
nexus darknet shop dark web market urls dark web markets dark market onion
nexus market darknet drug market nexus market nexus link
darknet markets onion darkmarket 2025 darknet market lists nexus darknet market
darknet websites tor drug market darknet markets onion dark web market links
darkmarket best darknet markets dark markets 2025 dark web link
darknet markets 2025 darknet site darknet market links darkmarket list
nexus onion dark web drug marketplace darknet market list darknet markets 2025
nexus onion onion dark website darkmarket list nexus shop url
nexus onion link darknet markets links nexus darknet access onion dark website
darknet drug store tor drug market darknet site nexus url
dark web market links darknet drug links nexus darknet market url dark web drug marketplace
darkmarket list nexus darknet url dark market list dark markets 2025
nexus official link darkmarket list nexus dark darkmarket
best darknet markets nexus shop url nexus shop url nexus darknet url
nexus darknet access nexus darknet link darkmarket 2025 dark web sites
darknet links darknet drug store darknet markets links darkmarket url
darknet drug market dark web link nexus darknet url dark market url
dark market onion dark web marketplaces nexus darknet url dark web marketplaces
tor drug market darknet drug store nexusdarknet site link darknet markets onion address
nexus darknet link darknet market list nexus dark dark market
nexus onion nexus darknet market nexus shop dark web sites
dark markets 2025 darknet site dark websites nexus darknet shop
tor drug market nexus shop url darknet market lists darkmarket
dark market 2025 tor drug market darkmarket dark web marketplaces
darkmarket link dark web market list dark web drug marketplace darknet links
dark market onion darknet market links tor drug market nexus dark
tor drug market nexus darknet market nexus onion nexus shop
nexus url nexus darknet link nexusdarknet site link darknet links
darknet marketplace dark web market list darknet markets nexus darknet market
dark market onion dark web marketplaces dark web market darknet markets onion address
bitcoin dark web nexus darknet market url dark market url darknet market links
nexus market url nexus darknet market darknet site darknet drug links
darknet drug store dark market darknet site nexus market darknet
darknet sites darkmarket list nexus darknet access darknet market
dark markets nexus shop url darknet markets 2025 nexus onion
darknet market list nexus darknet nexus onion mirror darkmarket
dark web marketplaces darknet websites darknet marketplace dark market link
nexus darknet url darknet market list nexus market link dark market onion
dark websites dark market link dark market list nexus onion mirror
nexus darknet access darkmarket 2025 darknet market list nexus onion mirror
dark market link darkmarket dark markets nexus onion link
darkmarket 2025 darkmarket link dark web market list darknet markets 2025
dark markets nexus shop nexus onion link tor drug market
nexus site official link bitcoin dark web dark web market list dark market url
darknet markets links darknet market list dark websites dark market list
darknet drug links darknet marketplace best darknet markets onion dark website
nexus darknet market url dark market link dark web link dark web sites
nexus darknet access dark market link dark web drug marketplace nexus darknet access
darknet links darknet markets url best darknet markets bitcoin dark web
nexus official link nexus market url onion dark website dark web market urls
darknet market links nexus official site best darknet markets darknet markets onion address
nexus market bitcoin dark web dark web link darknet drug store
darknet market links dark web link dark web link nexus darknet url
darknet markets onion address nexus market url nexus market link dark web marketplaces
nexus onion link nexus market dark markets darknet marketplace
darkmarket 2025 nexus darknet nexus dark darknet markets
nexus shop url bitcoin dark web dark market darknet drug links
darknet marketplace bitcoin dark web dark web market dark websites
nexus darknet shop dark web link darknet drug store nexus official site
nexus site official link darknet drug store darknet market links nexus darknet
darknet markets url nexus onion link nexus market url dark market
darknet drug links darknet drug store nexus darknet url nexus onion
darknet markets links darkmarket link nexus darknet url nexus darknet link
nexus darknet market dark market url dark web marketplaces darknet market links
dark websites darknet market links nexus market link dark market url
dark web marketplaces nexus official link darknet marketplace darknet market
darknet market lists dark web market urls darkmarkets darknet market links
dark web market urls dark market onion dark market list darknet sites
darknet market links nexus official site nexus shop url nexus market darknet
nexus darknet url darknet drugs nexus link nexus onion link
best darknet markets dark web market nexus market darknet dark web market urls
nexus darknet market nexus onion link darknet market list nexus market
nexus shop dark web marketplaces nexus market nexusdarknet site link
dark market link dark market link nexus market link dark market link
darknet markets 2025 dark market url tor drug market nexus darknet url
nexus darknet link nexus market link darknet drug store dark market 2025
darknet sites darknet links darknet market lists dark websites
tor drug market nexus darknet site nexus link darknet drug market
darkmarket url darknet market links dark web market darknet drug links
nexus market url nexus darknet link darknet markets url darknet market links
dark web market links darknet site nexus onion nexus shop
darknet market nexus darknet site darknet market lists darkmarket
darknet market links nexus darknet access darkmarket 2025 nexus market darknet
dark market onion nexus market url onion dark website nexus darknet market
dark market dark market onion bitcoin dark web darkmarket
nexusdarknet site link nexus darknet dark market dark market list
nexus shop url nexus official link darknet drugs dark web marketplaces
nexus official link nexus onion link onion dark website nexus darknet site
dark web link darknet markets onion dark web drug marketplace nexus market
dark web market urls nexus shop nexus market bitcoin dark web
dark markets nexus official site dark market onion dark web marketplaces
darknet sites dark market onion dark market url nexus dark
dark web market darknet site nexus link nexus official link
nexus onion nexus darknet shop nexus darknet market url darkmarket url
dark market 2025 dark web markets darknet market lists nexus darknet
nexus url nexus darknet site darknet websites nexus darknet market url
darknet markets darknet websites dark web drug marketplace darknet drugs
darknet websites nexus darknet darkmarket darknet market lists
darkmarkets dark web marketplaces darknet markets url darknet markets 2025
onion dark website darknet market lists dark market 2025 nexus official link
darknet markets onion address darknet market lists dark web market darknet links
nexus onion link darknet marketplace nexus darknet link bitcoin dark web
dark markets nexus market url dark web markets darkmarket link
nexus onion link darknet market lists darknet markets url tor drug market
dark web marketplaces dark market onion nexus market url nexus darknet
dark market url best darknet markets onion dark website darknet markets
dark web sites nexus onion nexus shop nexus darknet url
darknet markets darknet markets url nexus market link nexus site official link
darknet markets url dark web market list darknet sites darknet markets 2025
darknet links darknet market nexus market darknet nexus darknet site
nexus link dark market url dark web drug marketplace darknet links
nexus shop nexus site official link darknet websites nexus market link
dark web sites darknet marketplace darknet site dark market list
dark markets darkmarket list onion dark website nexus darknet market
darknet marketplace darknet websites nexus market nexusdarknet site link
darknet market lists darkmarket nexus shop darknet market list
bitcoin dark web nexus link nexusdarknet site link nexus site official link
nexus darknet link dark web marketplaces darknet site nexus market link
nexus shop url nexus darknet access dark market darkmarket
darknet drugs dark web market darkmarket url dark web market list
darkmarket list dark web market links darknet markets nexus darknet market url
nexus darknet darknet site darknet links best darknet markets
best darknet markets dark markets 2025 nexus official site nexus onion link
dark websites dark web sites darknet markets onion address darkmarket list
darknet market links nexus market dark web sites darkmarkets
72m1sr
e6um5h
3vlyu7
uoneal
xwg2om
u28iaz
Hi there, You've done a fantastic job. I'll definitely digg it and personally suggest to my friends. I am sure they'll be benefited from this web site.
This was neat and clean cheetsheet 👍👍👍. Thanks for post
I do consider all of the ideas you've presented to your post. They are very convincing and will definitely work. Nonetheless, the posts are very brief for starters. May you please extend them a little from subsequent time? Thank you for the post.
2c1sy3
1

1

1

1

1

1

1

1

1

u4eyfn
1

1

1

1

1

1

Greetings! Verry helpful adevice iin thius particular post!
It iis thhe little changes tht maoe thhe
most significnt changes. Thanks ffor sharing!
1

1

1

If spme one wants expeert view regarding bloggiing annd site-building after that i recomnmend him/her tto visit thios webpage,
Keep up the fastidious job.
1

1

1

Yourr mopde off decribing eveything in his paagraph is
genuinely pleasant, aall cann effortpessly bbe awqare oof it,
Thankks a lot.
v6xnna
What's up to all, the contents existing at this site are in fact amazing for people knowledge, well, keep up the nice work fellows.
site
What's up Dear, are you truly visiting this web site on a regular basis,
if so then you will absolutely obtain good knowledge.
web site
Please let me know if you're looking for a article author for your blog.
You have some really good articles and I feel I would be a good asset.
If you ever want to take some of the load off, I'd absolutely love to write some articles for your
blog in exchange for a link back to mine. Please send me an e-mail if interested.
Thank you!
website
At this time I am ready to do my breakfast, after having my breakfast coming yet again to
read further news.
meilleur casino en ligne
No matter if some one searches for his essential thing,
thus he/she desires to be available that in detail, therefore that thing
is maintained over here.
homepage
I'm not sure exactly why but this blog is loading incredibly slow for me.
Is anyone else having this problem or is it a problem on my end?
I'll check back later and see if the problem still exists.
casino en ligne
What's up, just wanted to tell you, I loved this article.
It was helpful. Keep on posting!
casino en ligne fiable
Hello, i think that i saw you visited my weblog thus i came to “return the
favor”.I'm attempting to find things to enhance my web site!I suppose its ok to use
a few of your ideas!!
casino en ligne fiable
Heya this is kind of of off topic but I was wanting to know if blogs use WYSIWYG editors or if you have to manually code with HTML.
I'm starting a blog soon but have no coding knowledge so I wanted to get advice from someone with experience.
Any help would be greatly appreciated!
webpage
Hey I know this is off topic but I was wondering if you knew of any widgets I could
add to my blog that automatically tweet my newest twitter updates.
I've been looking for a plug-in like this for quite some time and was hoping
maybe you would have some experience with something like this.
Please let me know if you run into anything.
I truly enjoy reading your blog and I look forward to your new updates.
meilleur casino en ligne
Inventonslemondedapres vous guide vers des casinos en ligne où les gains sont équitables et les règles parfaitement claires.
ggbb2a
z7rh7n
5afxgp
4csjja
ye4v4d
wld9ss