← 返回命令列表

Linux command

pct-set 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Example

pct set 100 --onboot

Example

pct set 100 --net0 name=eth0,bridge=vmbr0,ip=10.0.0.100/24,gw=10.0.0.1

Example

pct set 100 --memory 8192 --cpulimit 4

Mount

pct set 100 --mp0 /host/path,mp=/guest/mount

Example

pct set 100 --tags tag1,tag2

Delete

pct set 100 --delete net0,mp0

说明

pct set modifies the configuration of a Proxmox LXC container. Changes may require a container restart to take effect. This command can configure networking, resources, mount points, and other container properties.

参数

vmid
The numeric ID of the container
--onboot _boolean_
Start container on host boot
--memory _megabytes_
Memory limit in MB
--cpulimit _number_
CPU time limit (e.g., 4 for 4 cores worth)
--net_N_ _config_
Network interface configuration
--mp_N_ _config_
Mount point configuration for bind mounts
--tags _list_
Comma-separated list of tags
--delete _list_
Remove specified options

FAQ

What is the pct-set command used for?

pct set modifies the configuration of a Proxmox LXC container. Changes may require a container restart to take effect. This command can configure networking, resources, mount points, and other container properties.

How do I run a basic pct-set example?

Run `pct set 100 --onboot` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does vmid do in pct-set?

The numeric ID of the container