]> git.proxmox.com Git - pve-docs.git/blame - pct.1-synopsis.adoc
Add description for mountpoint property
[pve-docs.git] / pct.1-synopsis.adoc
CommitLineData
1f554f76
DM
1*pct* `<COMMAND> [ARGS] [OPTIONS]`
2
27a7acb2 3*pct clone* `<vmid> <newid>` `[OPTIONS]`
9b3e4991
DM
4
5Create a container clone/copy
6
013dc89f 7`<vmid>`: `<integer> (1 - N)` ::
9b3e4991
DM
8
9The (unique) ID of the VM.
10
013dc89f 11`<newid>`: `<integer> (1 - N)` ::
9b3e4991
DM
12
13VMID for the clone.
14
95895385
TL
15`--bwlimit` `<number> (0 - N)` ('default =' `clone limit from datacenter or storage config`)::
16
17Override I/O bandwidth limit (in KiB/s).
18
2489d6df 19`--description` `<string>` ::
9b3e4991
DM
20
21Description for the new CT.
22
27a7acb2 23`--full` `<boolean>` ::
9b3e4991 24
27a7acb2 25Create a full copy of all disks. This is always done when you clone a normal CT. For CT templates, we try to create a linked clone by default.
9b3e4991 26
2489d6df 27`--hostname` `<string>` ::
9b3e4991
DM
28
29Set a hostname for the new CT.
30
2489d6df 31`--pool` `<string>` ::
9b3e4991
DM
32
33Add the new CT to the specified pool.
34
2489d6df 35`--snapname` `<string>` ::
9b3e4991
DM
36
37The name of the snapshot.
38
2489d6df 39`--storage` `<string>` ::
9b3e4991
DM
40
41Target storage for full clone.
27a7acb2
DM
42
43`--target` `<string>` ::
44
45Target node. Only allowed if the original VM is on shared storage.
9b3e4991 46
5f26e15b 47*pct config* `<vmid>` `[OPTIONS]`
1f554f76
DM
48
49Get container configuration.
50
013dc89f 51`<vmid>`: `<integer> (1 - N)` ::
1f554f76
DM
52
53The (unique) ID of the VM.
54
1c532546
TL
55`--current` `<boolean>` ('default =' `0`)::
56
57Get current values (instead of pending values).
58
5f26e15b
TL
59`--snapshot` `<string>` ::
60
61Fetch config values from given snapshot.
62
4d47f125 63*pct console* `<vmid>` `[OPTIONS]`
1f554f76
DM
64
65Launch a console for the specified container.
66
013dc89f 67`<vmid>`: `<integer> (1 - N)` ::
1f554f76
DM
68
69The (unique) ID of the VM.
70
4d47f125
TL
71`--escape` `\^?[a-z]` ('default =' `^a`)::
72
73Escape sequence prefix. For example to use <Ctrl+b q> as the escape sequence pass '^b'.
74
de0983cb
DM
75*pct cpusets*
76
77Print the list of assigned CPU sets.
78
1f554f76
DM
79*pct create* `<vmid> <ostemplate>` `[OPTIONS]`
80
81Create or restore a container.
82
013dc89f 83`<vmid>`: `<integer> (1 - N)` ::
1f554f76
DM
84
85The (unique) ID of the VM.
86
013dc89f 87`<ostemplate>`: `<string>` ::
1f554f76
DM
88
89The OS template or backup file.
90
4d47f125 91`--arch` `<amd64 | arm64 | armhf | i386>` ('default =' `amd64`)::
1f554f76
DM
92
93OS architecture type.
94
95895385 95`--bwlimit` `<number> (0 - N)` ('default =' `restore limit from datacenter or storage config`)::
27a7acb2 96
95895385 97Override I/O bandwidth limit (in KiB/s).
27a7acb2 98
2489d6df 99`--cmode` `<console | shell | tty>` ('default =' `tty`)::
1f554f76 100
c2993fe5 101Console mode. By default, the console command tries to open a connection to one of the available tty devices. By setting cmode to 'console' it tries to attach to /dev/console instead. If you set cmode to 'shell', it simply invokes a shell inside the container (no login).
1f554f76 102
2489d6df 103`--console` `<boolean>` ('default =' `1`)::
1f554f76
DM
104
105Attach a console device (/dev/console) to the container.
106
2489d6df 107`--cores` `<integer> (1 - 128)` ::
de0983cb
DM
108
109The number of cores assigned to the container. A container can use all available cores by default.
110
2489d6df 111`--cpulimit` `<number> (0 - 128)` ('default =' `0`)::
1f554f76 112
9b3e4991
DM
113Limit of CPU usage.
114+
c2993fe5 115NOTE: If the computer has 2 CPUs, it has a total of '2' CPU time. Value '0' indicates no CPU limit.
1f554f76 116
2489d6df 117`--cpuunits` `<integer> (0 - 500000)` ('default =' `1024`)::
1f554f76 118
c2993fe5 119CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to the weights of all the other running VMs.
9b3e4991 120+
1f554f76
DM
121NOTE: You can disable fair-scheduler configuration by setting this to 0.
122
2489d6df 123`--description` `<string>` ::
1f554f76
DM
124
125Container description. Only used on the configuration web interface.
126
e2d681b3 127`--features` `[fuse=<1|0>] [,keyctl=<1|0>] [,mount=<fstype;fstype;...>] [,nesting=<1|0>]` ::
4d47f125
TL
128
129Allow containers access to advanced features.
130
2489d6df 131`--force` `<boolean>` ::
1f554f76
DM
132
133Allow to overwrite existing container.
134
5f26e15b
TL
135`--hookscript` `<string>` ::
136
137Script that will be exectued during various steps in the containers lifetime.
138
2489d6df 139`--hostname` `<string>` ::
1f554f76
DM
140
141Set a host name for the container.
142
2489d6df 143`--ignore-unpack-errors` `<boolean>` ::
1f554f76
DM
144
145Ignore errors when extracting the template.
146
1c532546 147`--lock` `<backup | create | destroyed | disk | fstrim | migrate | mounted | rollback | snapshot | snapshot-delete>` ::
1f554f76
DM
148
149Lock/unlock the VM.
150
2489d6df 151`--memory` `<integer> (16 - N)` ('default =' `512`)::
1f554f76
DM
152
153Amount of RAM for the VM in MB.
154
7cbed89a 155`--mp[n]` `[volume=]<volume> ,mp=<Path> [,acl=<1|0>] [,backup=<1|0>] [,mountoptions=<opt[;opt...]>] [,quota=<1|0>] [,replicate=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=<DiskSize>]` ::
1f554f76 156
c2993fe5 157Use volume as container mount point.
1f554f76 158
2489d6df 159`--nameserver` `<string>` ::
1f554f76 160
c2993fe5 161Sets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.
1f554f76 162
2489d6df 163`--net[n]` `name=<string> [,bridge=<bridge>] [,firewall=<1|0>] [,gw=<GatewayIPv4>] [,gw6=<GatewayIPv6>] [,hwaddr=<XX:XX:XX:XX:XX:XX>] [,ip=<(IPv4/CIDR|dhcp|manual)>] [,ip6=<(IPv6/CIDR|auto|dhcp|manual)>] [,mtu=<integer>] [,rate=<mbps>] [,tag=<integer>] [,trunks=<vlanid[;vlanid...]>] [,type=<veth>]` ::
1f554f76
DM
164
165Specifies network interfaces for the container.
166
2489d6df 167`--onboot` `<boolean>` ('default =' `0`)::
1f554f76
DM
168
169Specifies whether a VM will be started during system bootup.
170
2489d6df 171`--ostype` `<alpine | archlinux | centos | debian | fedora | gentoo | opensuse | ubuntu | unmanaged>` ::
1f554f76 172
c2993fe5 173OS type. This is used to setup configuration inside the container, and corresponds to lxc setup scripts in /usr/share/lxc/config/<ostype>.common.conf. Value 'unmanaged' can be used to skip and OS specific setup.
1f554f76 174
5da3d723 175`--password` `<password>` ::
1f554f76
DM
176
177Sets root password inside container.
178
2489d6df 179`--pool` `<string>` ::
1f554f76
DM
180
181Add the VM to the specified pool.
182
2489d6df 183`--protection` `<boolean>` ('default =' `0`)::
1f554f76 184
c2993fe5 185Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation.
1f554f76 186
2489d6df 187`--restore` `<boolean>` ::
1f554f76
DM
188
189Mark this as restore task.
190
7cbed89a 191`--rootfs` `[volume=]<volume> [,acl=<1|0>] [,mountoptions=<opt[;opt...]>] [,quota=<1|0>] [,replicate=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=<DiskSize>]` ::
1f554f76
DM
192
193Use volume as container root.
194
2489d6df 195`--searchdomain` `<string>` ::
1f554f76 196
c2993fe5 197Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.
9b3e4991 198
2489d6df 199`--ssh-public-keys` `<filepath>` ::
9b3e4991
DM
200
201Setup public SSH keys (one key per line, OpenSSH format).
1f554f76 202
5da3d723
TL
203`--start` `<boolean>` ('default =' `0`)::
204
205Start the CT after its creation finished successfully.
206
2489d6df 207`--startup` `[[order=]\d+] [,up=\d+] [,down=\d+] ` ::
1f554f76 208
c2993fe5 209Startup and shutdown behavior. Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering. Additionally you can set the 'up' or 'down' delay in seconds, which specifies a delay to wait before the next VM is started or stopped.
1f554f76 210
2489d6df 211`--storage` `<string>` ('default =' `local`)::
1f554f76
DM
212
213Default Storage.
214
2489d6df 215`--swap` `<integer> (0 - N)` ('default =' `512`)::
1f554f76
DM
216
217Amount of SWAP for the VM in MB.
218
2489d6df 219`--template` `<boolean>` ('default =' `0`)::
1f554f76
DM
220
221Enable/disable Template.
222
2489d6df 223`--tty` `<integer> (0 - 6)` ('default =' `2`)::
1f554f76
DM
224
225Specify the number of tty available to the container
226
95895385
TL
227`--unique` `<boolean>` ::
228
229Assign a unique random ethernet address.
230+
231NOTE: Requires option(s): `restore`
232
2489d6df 233`--unprivileged` `<boolean>` ('default =' `0`)::
1f554f76 234
c2993fe5 235Makes the container run as unprivileged user. (Should not be modified manually.)
1f554f76 236
2489d6df 237`--unused[n]` `<string>` ::
1f554f76 238
c2993fe5 239Reference to unused volumes. This is used internally, and should not be modified manually.
1f554f76 240
1f554f76
DM
241*pct delsnapshot* `<vmid> <snapname>` `[OPTIONS]`
242
243Delete a LXC snapshot.
244
013dc89f 245`<vmid>`: `<integer> (1 - N)` ::
1f554f76
DM
246
247The (unique) ID of the VM.
248
013dc89f 249`<snapname>`: `<string>` ::
1f554f76
DM
250
251The name of the snapshot.
252
2489d6df 253`--force` `<boolean>` ::
1f554f76
DM
254
255For removal from config file, even if removing disk snapshots fails.
256
1c532546 257*pct destroy* `<vmid>` `[OPTIONS]`
1f554f76
DM
258
259Destroy the container (also delete all uses files).
260
013dc89f 261`<vmid>`: `<integer> (1 - N)` ::
1f554f76
DM
262
263The (unique) ID of the VM.
264
1c532546
TL
265`--purge` `<boolean>` ::
266
267Remove vmid from backup cron jobs.
268
2c0dde61
DM
269*pct df* `<vmid>`
270
271Get the container's current disk usage.
272
013dc89f 273`<vmid>`: `<integer> (1 - N)` ::
2c0dde61
DM
274
275The (unique) ID of the VM.
276
1f554f76
DM
277*pct enter* `<vmid>`
278
279Launch a shell for the specified container.
280
013dc89f 281`<vmid>`: `<integer> (1 - N)` ::
1f554f76
DM
282
283The (unique) ID of the VM.
284
1f554f76
DM
285*pct exec* `<vmid> [<extra-args>]`
286
287Launch a command inside the specified container.
288
013dc89f 289`<vmid>`: `<integer> (1 - N)` ::
1f554f76
DM
290
291The (unique) ID of the VM.
292
013dc89f 293`<extra-args>`: `<array>` ::
1f554f76
DM
294
295Extra arguments as array
296
1f554f76
DM
297*pct fsck* `<vmid>` `[OPTIONS]`
298
299Run a filesystem check (fsck) on a container volume.
300
013dc89f 301`<vmid>`: `<integer> (1 - N)` ::
1f554f76
DM
302
303The (unique) ID of the VM.
304
4d47f125 305`--device` `<mp0 | mp1 | mp10 | mp100 | mp101 | mp102 | mp103 | mp104 | mp105 | mp106 | mp107 | mp108 | mp109 | mp11 | mp110 | mp111 | mp112 | mp113 | mp114 | mp115 | mp116 | mp117 | mp118 | mp119 | mp12 | mp120 | mp121 | mp122 | mp123 | mp124 | mp125 | mp126 | mp127 | mp128 | mp129 | mp13 | mp130 | mp131 | mp132 | mp133 | mp134 | mp135 | mp136 | mp137 | mp138 | mp139 | mp14 | mp140 | mp141 | mp142 | mp143 | mp144 | mp145 | mp146 | mp147 | mp148 | mp149 | mp15 | mp150 | mp151 | mp152 | mp153 | mp154 | mp155 | mp156 | mp157 | mp158 | mp159 | mp16 | mp160 | mp161 | mp162 | mp163 | mp164 | mp165 | mp166 | mp167 | mp168 | mp169 | mp17 | mp170 | mp171 | mp172 | mp173 | mp174 | mp175 | mp176 | mp177 | mp178 | mp179 | mp18 | mp180 | mp181 | mp182 | mp183 | mp184 | mp185 | mp186 | mp187 | mp188 | mp189 | mp19 | mp190 | mp191 | mp192 | mp193 | mp194 | mp195 | mp196 | mp197 | mp198 | mp199 | mp2 | mp20 | mp200 | mp201 | mp202 | mp203 | mp204 | mp205 | mp206 | mp207 | mp208 | mp209 | mp21 | mp210 | mp211 | mp212 | mp213 | mp214 | mp215 | mp216 | mp217 | mp218 | mp219 | mp22 | mp220 | mp221 | mp222 | mp223 | mp224 | mp225 | mp226 | mp227 | mp228 | mp229 | mp23 | mp230 | mp231 | mp232 | mp233 | mp234 | mp235 | mp236 | mp237 | mp238 | mp239 | mp24 | mp240 | mp241 | mp242 | mp243 | mp244 | mp245 | mp246 | mp247 | mp248 | mp249 | mp25 | mp250 | mp251 | mp252 | mp253 | mp254 | mp255 | mp26 | mp27 | mp28 | mp29 | mp3 | mp30 | mp31 | mp32 | mp33 | mp34 | mp35 | mp36 | mp37 | mp38 | mp39 | mp4 | mp40 | mp41 | mp42 | mp43 | mp44 | mp45 | mp46 | mp47 | mp48 | mp49 | mp5 | mp50 | mp51 | mp52 | mp53 | mp54 | mp55 | mp56 | mp57 | mp58 | mp59 | mp6 | mp60 | mp61 | mp62 | mp63 | mp64 | mp65 | mp66 | mp67 | mp68 | mp69 | mp7 | mp70 | mp71 | mp72 | mp73 | mp74 | mp75 | mp76 | mp77 | mp78 | mp79 | mp8 | mp80 | mp81 | mp82 | mp83 | mp84 | mp85 | mp86 | mp87 | mp88 | mp89 | mp9 | mp90 | mp91 | mp92 | mp93 | mp94 | mp95 | mp96 | mp97 | mp98 | mp99 | rootfs>` ::
1f554f76
DM
306
307A volume on which to run the filesystem check
308
2489d6df 309`--force` `<boolean>` ('default =' `0`)::
1f554f76
DM
310
311Force checking, even if the filesystem seems clean
312
95895385
TL
313*pct fstrim* `<vmid>`
314
315Run fstrim on a chosen CT and its mountpoints.
316
317`<vmid>`: `<integer> (1 - N)` ::
318
319The (unique) ID of the VM.
320
35a75dd3 321*pct help* `[OPTIONS]`
1f554f76
DM
322
323Get help about specified command.
324
35a75dd3 325`--extra-args` `<array>` ::
1f554f76 326
35a75dd3 327Shows help for a specific command
1f554f76 328
2489d6df 329`--verbose` `<boolean>` ::
1f554f76
DM
330
331Verbose output format.
332
1f554f76
DM
333*pct list*
334
335LXC container index (per node).
336
1f554f76
DM
337*pct listsnapshot* `<vmid>`
338
339List all snapshots.
340
013dc89f 341`<vmid>`: `<integer> (1 - N)` ::
1f554f76
DM
342
343The (unique) ID of the VM.
344
1f554f76
DM
345*pct migrate* `<vmid> <target>` `[OPTIONS]`
346
347Migrate the container to another node. Creates a new migration task.
348
013dc89f 349`<vmid>`: `<integer> (1 - N)` ::
1f554f76
DM
350
351The (unique) ID of the VM.
352
013dc89f 353`<target>`: `<string>` ::
1f554f76
DM
354
355Target node.
356
95895385
TL
357`--bwlimit` `<number> (0 - N)` ('default =' `migrate limit from datacenter or storage config`)::
358
359Override I/O bandwidth limit (in KiB/s).
360
2489d6df 361`--force` `<boolean>` ::
9b3e4991 362
de0983cb 363Force migration despite local bind / device mounts. NOTE: deprecated, use 'shared' property of mount point instead.
9b3e4991 364
2489d6df 365`--online` `<boolean>` ::
1f554f76
DM
366
367Use online/live migration.
368
2489d6df 369`--restart` `<boolean>` ::
6875b729
DM
370
371Use restart migration
372
2489d6df 373`--timeout` `<integer>` ('default =' `180`)::
6875b729
DM
374
375Timeout in seconds for shutdown for restart migration
376
9b3e4991
DM
377*pct mount* `<vmid>`
378
379Mount the container's filesystem on the host. This will hold a lock on the
380container and is meant for emergency maintenance only as it will prevent
381further operations on the container other than start and stop.
382
013dc89f 383`<vmid>`: `<integer> (1 - N)` ::
9b3e4991
DM
384
385The (unique) ID of the VM.
386
27a7acb2
DM
387*pct move_volume* `<vmid> <volume> <storage>` `[OPTIONS]`
388
389Move a rootfs-/mp-volume to a different storage
390
391`<vmid>`: `<integer> (1 - N)` ::
392
393The (unique) ID of the VM.
394
4d47f125 395`<volume>`: `<mp0 | mp1 | mp10 | mp100 | mp101 | mp102 | mp103 | mp104 | mp105 | mp106 | mp107 | mp108 | mp109 | mp11 | mp110 | mp111 | mp112 | mp113 | mp114 | mp115 | mp116 | mp117 | mp118 | mp119 | mp12 | mp120 | mp121 | mp122 | mp123 | mp124 | mp125 | mp126 | mp127 | mp128 | mp129 | mp13 | mp130 | mp131 | mp132 | mp133 | mp134 | mp135 | mp136 | mp137 | mp138 | mp139 | mp14 | mp140 | mp141 | mp142 | mp143 | mp144 | mp145 | mp146 | mp147 | mp148 | mp149 | mp15 | mp150 | mp151 | mp152 | mp153 | mp154 | mp155 | mp156 | mp157 | mp158 | mp159 | mp16 | mp160 | mp161 | mp162 | mp163 | mp164 | mp165 | mp166 | mp167 | mp168 | mp169 | mp17 | mp170 | mp171 | mp172 | mp173 | mp174 | mp175 | mp176 | mp177 | mp178 | mp179 | mp18 | mp180 | mp181 | mp182 | mp183 | mp184 | mp185 | mp186 | mp187 | mp188 | mp189 | mp19 | mp190 | mp191 | mp192 | mp193 | mp194 | mp195 | mp196 | mp197 | mp198 | mp199 | mp2 | mp20 | mp200 | mp201 | mp202 | mp203 | mp204 | mp205 | mp206 | mp207 | mp208 | mp209 | mp21 | mp210 | mp211 | mp212 | mp213 | mp214 | mp215 | mp216 | mp217 | mp218 | mp219 | mp22 | mp220 | mp221 | mp222 | mp223 | mp224 | mp225 | mp226 | mp227 | mp228 | mp229 | mp23 | mp230 | mp231 | mp232 | mp233 | mp234 | mp235 | mp236 | mp237 | mp238 | mp239 | mp24 | mp240 | mp241 | mp242 | mp243 | mp244 | mp245 | mp246 | mp247 | mp248 | mp249 | mp25 | mp250 | mp251 | mp252 | mp253 | mp254 | mp255 | mp26 | mp27 | mp28 | mp29 | mp3 | mp30 | mp31 | mp32 | mp33 | mp34 | mp35 | mp36 | mp37 | mp38 | mp39 | mp4 | mp40 | mp41 | mp42 | mp43 | mp44 | mp45 | mp46 | mp47 | mp48 | mp49 | mp5 | mp50 | mp51 | mp52 | mp53 | mp54 | mp55 | mp56 | mp57 | mp58 | mp59 | mp6 | mp60 | mp61 | mp62 | mp63 | mp64 | mp65 | mp66 | mp67 | mp68 | mp69 | mp7 | mp70 | mp71 | mp72 | mp73 | mp74 | mp75 | mp76 | mp77 | mp78 | mp79 | mp8 | mp80 | mp81 | mp82 | mp83 | mp84 | mp85 | mp86 | mp87 | mp88 | mp89 | mp9 | mp90 | mp91 | mp92 | mp93 | mp94 | mp95 | mp96 | mp97 | mp98 | mp99 | rootfs>` ::
27a7acb2
DM
396
397Volume which will be moved.
398
399`<storage>`: `<string>` ::
400
401Target Storage.
402
95895385
TL
403`--bwlimit` `<number> (0 - N)` ('default =' `clone limit from datacenter or storage config`)::
404
405Override I/O bandwidth limit (in KiB/s).
406
27a7acb2
DM
407`--delete` `<boolean>` ('default =' `0`)::
408
409Delete the original volume after successful copy. By default the original is kept as an unused volume entry.
410
411`--digest` `<string>` ::
412
413Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
414
1c532546
TL
415*pct pending* `<vmid>`
416
417Get container configuration, including pending changes.
418
419`<vmid>`: `<integer> (1 - N)` ::
420
421The (unique) ID of the VM.
422
9b3e4991
DM
423*pct pull* `<vmid> <path> <destination>` `[OPTIONS]`
424
425Copy a file from the container to the local system.
426
013dc89f 427`<vmid>`: `<integer> (1 - N)` ::
9b3e4991
DM
428
429The (unique) ID of the VM.
430
013dc89f 431`<path>`: `<string>` ::
9b3e4991
DM
432
433Path to a file inside the container to pull.
434
013dc89f 435`<destination>`: `<string>` ::
9b3e4991
DM
436
437Destination
438
2489d6df 439`--group` `<string>` ::
9b3e4991
DM
440
441Owner group name or id.
442
2489d6df 443`--perms` `<string>` ::
9b3e4991 444
c2993fe5 445File permissions to use (octal by default, prefix with '0x' for hexadecimal).
9b3e4991 446
2489d6df 447`--user` `<string>` ::
9b3e4991
DM
448
449Owner user name or id.
450
9b3e4991
DM
451*pct push* `<vmid> <file> <destination>` `[OPTIONS]`
452
453Copy a local file to the container.
454
013dc89f 455`<vmid>`: `<integer> (1 - N)` ::
9b3e4991
DM
456
457The (unique) ID of the VM.
458
013dc89f 459`<file>`: `<string>` ::
9b3e4991
DM
460
461Path to a local file.
462
013dc89f 463`<destination>`: `<string>` ::
9b3e4991
DM
464
465Destination inside the container to write to.
466
2489d6df 467`--group` `<string>` ::
9b3e4991 468
c2993fe5 469Owner group name or id. When using a name it must exist inside the container.
9b3e4991 470
2489d6df 471`--perms` `<string>` ::
9b3e4991 472
c2993fe5 473File permissions to use (octal by default, prefix with '0x' for hexadecimal).
9b3e4991 474
2489d6df 475`--user` `<string>` ::
9b3e4991 476
c2993fe5 477Owner user name or id. When using a name it must exist inside the container.
9b3e4991 478
e2d681b3
TL
479*pct rescan* `[OPTIONS]`
480
481Rescan all storages and update disk sizes and unused disk images.
482
483`--dryrun` `<boolean>` ('default =' `0`)::
484
485Do not actually write changes out to conifg.
486
487`--vmid` `<integer> (1 - N)` ::
488
489The (unique) ID of the VM.
490
1f554f76
DM
491*pct resize* `<vmid> <disk> <size>` `[OPTIONS]`
492
de0983cb 493Resize a container mount point.
1f554f76 494
013dc89f 495`<vmid>`: `<integer> (1 - N)` ::
1f554f76
DM
496
497The (unique) ID of the VM.
498
4d47f125 499`<disk>`: `<mp0 | mp1 | mp10 | mp100 | mp101 | mp102 | mp103 | mp104 | mp105 | mp106 | mp107 | mp108 | mp109 | mp11 | mp110 | mp111 | mp112 | mp113 | mp114 | mp115 | mp116 | mp117 | mp118 | mp119 | mp12 | mp120 | mp121 | mp122 | mp123 | mp124 | mp125 | mp126 | mp127 | mp128 | mp129 | mp13 | mp130 | mp131 | mp132 | mp133 | mp134 | mp135 | mp136 | mp137 | mp138 | mp139 | mp14 | mp140 | mp141 | mp142 | mp143 | mp144 | mp145 | mp146 | mp147 | mp148 | mp149 | mp15 | mp150 | mp151 | mp152 | mp153 | mp154 | mp155 | mp156 | mp157 | mp158 | mp159 | mp16 | mp160 | mp161 | mp162 | mp163 | mp164 | mp165 | mp166 | mp167 | mp168 | mp169 | mp17 | mp170 | mp171 | mp172 | mp173 | mp174 | mp175 | mp176 | mp177 | mp178 | mp179 | mp18 | mp180 | mp181 | mp182 | mp183 | mp184 | mp185 | mp186 | mp187 | mp188 | mp189 | mp19 | mp190 | mp191 | mp192 | mp193 | mp194 | mp195 | mp196 | mp197 | mp198 | mp199 | mp2 | mp20 | mp200 | mp201 | mp202 | mp203 | mp204 | mp205 | mp206 | mp207 | mp208 | mp209 | mp21 | mp210 | mp211 | mp212 | mp213 | mp214 | mp215 | mp216 | mp217 | mp218 | mp219 | mp22 | mp220 | mp221 | mp222 | mp223 | mp224 | mp225 | mp226 | mp227 | mp228 | mp229 | mp23 | mp230 | mp231 | mp232 | mp233 | mp234 | mp235 | mp236 | mp237 | mp238 | mp239 | mp24 | mp240 | mp241 | mp242 | mp243 | mp244 | mp245 | mp246 | mp247 | mp248 | mp249 | mp25 | mp250 | mp251 | mp252 | mp253 | mp254 | mp255 | mp26 | mp27 | mp28 | mp29 | mp3 | mp30 | mp31 | mp32 | mp33 | mp34 | mp35 | mp36 | mp37 | mp38 | mp39 | mp4 | mp40 | mp41 | mp42 | mp43 | mp44 | mp45 | mp46 | mp47 | mp48 | mp49 | mp5 | mp50 | mp51 | mp52 | mp53 | mp54 | mp55 | mp56 | mp57 | mp58 | mp59 | mp6 | mp60 | mp61 | mp62 | mp63 | mp64 | mp65 | mp66 | mp67 | mp68 | mp69 | mp7 | mp70 | mp71 | mp72 | mp73 | mp74 | mp75 | mp76 | mp77 | mp78 | mp79 | mp8 | mp80 | mp81 | mp82 | mp83 | mp84 | mp85 | mp86 | mp87 | mp88 | mp89 | mp9 | mp90 | mp91 | mp92 | mp93 | mp94 | mp95 | mp96 | mp97 | mp98 | mp99 | rootfs>` ::
1f554f76
DM
500
501The disk you want to resize.
502
013dc89f 503`<size>`: `\+?\d+(\.\d+)?[KMGT]?` ::
1f554f76 504
c2993fe5 505The new size. With the '+' sign the value is added to the actual size of the volume and without it, the value is taken as an absolute one. Shrinking disk size is not supported.
1f554f76 506
2489d6df 507`--digest` `<string>` ::
1f554f76 508
c2993fe5 509Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
1f554f76 510
1f554f76
DM
511*pct restore* `<vmid> <ostemplate>` `[OPTIONS]`
512
513Create or restore a container.
514
013dc89f 515`<vmid>`: `<integer> (1 - N)` ::
1f554f76
DM
516
517The (unique) ID of the VM.
518
013dc89f 519`<ostemplate>`: `<string>` ::
1f554f76
DM
520
521The OS template or backup file.
522
4d47f125 523`--arch` `<amd64 | arm64 | armhf | i386>` ('default =' `amd64`)::
1f554f76
DM
524
525OS architecture type.
526
95895385 527`--bwlimit` `<number> (0 - N)` ('default =' `restore limit from datacenter or storage config`)::
27a7acb2 528
95895385 529Override I/O bandwidth limit (in KiB/s).
27a7acb2 530
2489d6df 531`--cmode` `<console | shell | tty>` ('default =' `tty`)::
1f554f76 532
c2993fe5 533Console mode. By default, the console command tries to open a connection to one of the available tty devices. By setting cmode to 'console' it tries to attach to /dev/console instead. If you set cmode to 'shell', it simply invokes a shell inside the container (no login).
1f554f76 534
2489d6df 535`--console` `<boolean>` ('default =' `1`)::
1f554f76
DM
536
537Attach a console device (/dev/console) to the container.
538
2489d6df 539`--cores` `<integer> (1 - 128)` ::
de0983cb
DM
540
541The number of cores assigned to the container. A container can use all available cores by default.
542
2489d6df 543`--cpulimit` `<number> (0 - 128)` ('default =' `0`)::
1f554f76 544
9b3e4991
DM
545Limit of CPU usage.
546+
c2993fe5 547NOTE: If the computer has 2 CPUs, it has a total of '2' CPU time. Value '0' indicates no CPU limit.
1f554f76 548
2489d6df 549`--cpuunits` `<integer> (0 - 500000)` ('default =' `1024`)::
1f554f76 550
c2993fe5 551CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to the weights of all the other running VMs.
9b3e4991 552+
1f554f76
DM
553NOTE: You can disable fair-scheduler configuration by setting this to 0.
554
2489d6df 555`--description` `<string>` ::
1f554f76
DM
556
557Container description. Only used on the configuration web interface.
558
e2d681b3 559`--features` `[fuse=<1|0>] [,keyctl=<1|0>] [,mount=<fstype;fstype;...>] [,nesting=<1|0>]` ::
4d47f125
TL
560
561Allow containers access to advanced features.
562
2489d6df 563`--force` `<boolean>` ::
1f554f76
DM
564
565Allow to overwrite existing container.
566
5f26e15b
TL
567`--hookscript` `<string>` ::
568
569Script that will be exectued during various steps in the containers lifetime.
570
2489d6df 571`--hostname` `<string>` ::
1f554f76
DM
572
573Set a host name for the container.
574
2489d6df 575`--ignore-unpack-errors` `<boolean>` ::
1f554f76
DM
576
577Ignore errors when extracting the template.
578
1c532546 579`--lock` `<backup | create | destroyed | disk | fstrim | migrate | mounted | rollback | snapshot | snapshot-delete>` ::
1f554f76
DM
580
581Lock/unlock the VM.
582
2489d6df 583`--memory` `<integer> (16 - N)` ('default =' `512`)::
1f554f76
DM
584
585Amount of RAM for the VM in MB.
586
7cbed89a 587`--mp[n]` `[volume=]<volume> ,mp=<Path> [,acl=<1|0>] [,backup=<1|0>] [,mountoptions=<opt[;opt...]>] [,quota=<1|0>] [,replicate=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=<DiskSize>]` ::
1f554f76 588
c2993fe5 589Use volume as container mount point.
1f554f76 590
2489d6df 591`--nameserver` `<string>` ::
1f554f76 592
c2993fe5 593Sets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.
1f554f76 594
2489d6df 595`--net[n]` `name=<string> [,bridge=<bridge>] [,firewall=<1|0>] [,gw=<GatewayIPv4>] [,gw6=<GatewayIPv6>] [,hwaddr=<XX:XX:XX:XX:XX:XX>] [,ip=<(IPv4/CIDR|dhcp|manual)>] [,ip6=<(IPv6/CIDR|auto|dhcp|manual)>] [,mtu=<integer>] [,rate=<mbps>] [,tag=<integer>] [,trunks=<vlanid[;vlanid...]>] [,type=<veth>]` ::
1f554f76
DM
596
597Specifies network interfaces for the container.
598
2489d6df 599`--onboot` `<boolean>` ('default =' `0`)::
1f554f76
DM
600
601Specifies whether a VM will be started during system bootup.
602
2489d6df 603`--ostype` `<alpine | archlinux | centos | debian | fedora | gentoo | opensuse | ubuntu | unmanaged>` ::
1f554f76 604
c2993fe5 605OS type. This is used to setup configuration inside the container, and corresponds to lxc setup scripts in /usr/share/lxc/config/<ostype>.common.conf. Value 'unmanaged' can be used to skip and OS specific setup.
1f554f76 606
5da3d723 607`--password` `<password>` ::
1f554f76
DM
608
609Sets root password inside container.
610
2489d6df 611`--pool` `<string>` ::
1f554f76
DM
612
613Add the VM to the specified pool.
614
2489d6df 615`--protection` `<boolean>` ('default =' `0`)::
1f554f76 616
c2993fe5 617Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation.
1f554f76 618
7cbed89a 619`--rootfs` `[volume=]<volume> [,acl=<1|0>] [,mountoptions=<opt[;opt...]>] [,quota=<1|0>] [,replicate=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=<DiskSize>]` ::
1f554f76
DM
620
621Use volume as container root.
622
2489d6df 623`--searchdomain` `<string>` ::
1f554f76 624
c2993fe5 625Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.
9b3e4991 626
2489d6df 627`--ssh-public-keys` `<filepath>` ::
9b3e4991
DM
628
629Setup public SSH keys (one key per line, OpenSSH format).
1f554f76 630
5da3d723
TL
631`--start` `<boolean>` ('default =' `0`)::
632
633Start the CT after its creation finished successfully.
634
2489d6df 635`--startup` `[[order=]\d+] [,up=\d+] [,down=\d+] ` ::
1f554f76 636
c2993fe5 637Startup and shutdown behavior. Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering. Additionally you can set the 'up' or 'down' delay in seconds, which specifies a delay to wait before the next VM is started or stopped.
1f554f76 638
2489d6df 639`--storage` `<string>` ('default =' `local`)::
1f554f76
DM
640
641Default Storage.
642
2489d6df 643`--swap` `<integer> (0 - N)` ('default =' `512`)::
1f554f76
DM
644
645Amount of SWAP for the VM in MB.
646
2489d6df 647`--template` `<boolean>` ('default =' `0`)::
1f554f76
DM
648
649Enable/disable Template.
650
2489d6df 651`--tty` `<integer> (0 - 6)` ('default =' `2`)::
1f554f76
DM
652
653Specify the number of tty available to the container
654
95895385
TL
655`--unique` `<boolean>` ::
656
657Assign a unique random ethernet address.
658+
659NOTE: Requires option(s): `restore`
660
2489d6df 661`--unprivileged` `<boolean>` ('default =' `0`)::
1f554f76 662
c2993fe5 663Makes the container run as unprivileged user. (Should not be modified manually.)
1f554f76 664
2489d6df 665`--unused[n]` `<string>` ::
1f554f76 666
c2993fe5 667Reference to unused volumes. This is used internally, and should not be modified manually.
1f554f76 668
1f554f76
DM
669*pct resume* `<vmid>`
670
671Resume the container.
672
013dc89f 673`<vmid>`: `<integer> (1 - N)` ::
1f554f76
DM
674
675The (unique) ID of the VM.
676
1f554f76
DM
677*pct rollback* `<vmid> <snapname>`
678
679Rollback LXC state to specified snapshot.
680
013dc89f 681`<vmid>`: `<integer> (1 - N)` ::
1f554f76
DM
682
683The (unique) ID of the VM.
684
013dc89f 685`<snapname>`: `<string>` ::
1f554f76
DM
686
687The name of the snapshot.
688
1f554f76
DM
689*pct set* `<vmid>` `[OPTIONS]`
690
691Set container options.
692
013dc89f 693`<vmid>`: `<integer> (1 - N)` ::
1f554f76
DM
694
695The (unique) ID of the VM.
696
4d47f125 697`--arch` `<amd64 | arm64 | armhf | i386>` ('default =' `amd64`)::
1f554f76
DM
698
699OS architecture type.
700
2489d6df 701`--cmode` `<console | shell | tty>` ('default =' `tty`)::
1f554f76 702
c2993fe5 703Console mode. By default, the console command tries to open a connection to one of the available tty devices. By setting cmode to 'console' it tries to attach to /dev/console instead. If you set cmode to 'shell', it simply invokes a shell inside the container (no login).
1f554f76 704
2489d6df 705`--console` `<boolean>` ('default =' `1`)::
1f554f76
DM
706
707Attach a console device (/dev/console) to the container.
708
2489d6df 709`--cores` `<integer> (1 - 128)` ::
de0983cb
DM
710
711The number of cores assigned to the container. A container can use all available cores by default.
712
2489d6df 713`--cpulimit` `<number> (0 - 128)` ('default =' `0`)::
1f554f76 714
9b3e4991
DM
715Limit of CPU usage.
716+
c2993fe5 717NOTE: If the computer has 2 CPUs, it has a total of '2' CPU time. Value '0' indicates no CPU limit.
1f554f76 718
2489d6df 719`--cpuunits` `<integer> (0 - 500000)` ('default =' `1024`)::
1f554f76 720
c2993fe5 721CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to the weights of all the other running VMs.
9b3e4991 722+
1f554f76
DM
723NOTE: You can disable fair-scheduler configuration by setting this to 0.
724
2489d6df 725`--delete` `<string>` ::
1f554f76
DM
726
727A list of settings you want to delete.
728
2489d6df 729`--description` `<string>` ::
1f554f76
DM
730
731Container description. Only used on the configuration web interface.
732
2489d6df 733`--digest` `<string>` ::
1f554f76 734
c2993fe5 735Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
1f554f76 736
e2d681b3 737`--features` `[fuse=<1|0>] [,keyctl=<1|0>] [,mount=<fstype;fstype;...>] [,nesting=<1|0>]` ::
4d47f125
TL
738
739Allow containers access to advanced features.
740
5f26e15b
TL
741`--hookscript` `<string>` ::
742
743Script that will be exectued during various steps in the containers lifetime.
744
2489d6df 745`--hostname` `<string>` ::
1f554f76
DM
746
747Set a host name for the container.
748
1c532546 749`--lock` `<backup | create | destroyed | disk | fstrim | migrate | mounted | rollback | snapshot | snapshot-delete>` ::
1f554f76
DM
750
751Lock/unlock the VM.
752
2489d6df 753`--memory` `<integer> (16 - N)` ('default =' `512`)::
1f554f76
DM
754
755Amount of RAM for the VM in MB.
756
7cbed89a 757`--mp[n]` `[volume=]<volume> ,mp=<Path> [,acl=<1|0>] [,backup=<1|0>] [,mountoptions=<opt[;opt...]>] [,quota=<1|0>] [,replicate=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=<DiskSize>]` ::
1f554f76 758
c2993fe5 759Use volume as container mount point.
1f554f76 760
2489d6df 761`--nameserver` `<string>` ::
1f554f76 762
c2993fe5 763Sets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.
1f554f76 764
2489d6df 765`--net[n]` `name=<string> [,bridge=<bridge>] [,firewall=<1|0>] [,gw=<GatewayIPv4>] [,gw6=<GatewayIPv6>] [,hwaddr=<XX:XX:XX:XX:XX:XX>] [,ip=<(IPv4/CIDR|dhcp|manual)>] [,ip6=<(IPv6/CIDR|auto|dhcp|manual)>] [,mtu=<integer>] [,rate=<mbps>] [,tag=<integer>] [,trunks=<vlanid[;vlanid...]>] [,type=<veth>]` ::
1f554f76
DM
766
767Specifies network interfaces for the container.
768
2489d6df 769`--onboot` `<boolean>` ('default =' `0`)::
1f554f76
DM
770
771Specifies whether a VM will be started during system bootup.
772
2489d6df 773`--ostype` `<alpine | archlinux | centos | debian | fedora | gentoo | opensuse | ubuntu | unmanaged>` ::
1f554f76 774
c2993fe5 775OS type. This is used to setup configuration inside the container, and corresponds to lxc setup scripts in /usr/share/lxc/config/<ostype>.common.conf. Value 'unmanaged' can be used to skip and OS specific setup.
1f554f76 776
2489d6df 777`--protection` `<boolean>` ('default =' `0`)::
1f554f76 778
c2993fe5 779Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation.
1f554f76 780
1c532546
TL
781`--revert` `<string>` ::
782
783Revert a pending change.
784
7cbed89a 785`--rootfs` `[volume=]<volume> [,acl=<1|0>] [,mountoptions=<opt[;opt...]>] [,quota=<1|0>] [,replicate=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=<DiskSize>]` ::
1f554f76
DM
786
787Use volume as container root.
788
2489d6df 789`--searchdomain` `<string>` ::
1f554f76 790
c2993fe5 791Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.
1f554f76 792
2489d6df 793`--startup` `[[order=]\d+] [,up=\d+] [,down=\d+] ` ::
1f554f76 794
c2993fe5 795Startup and shutdown behavior. Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering. Additionally you can set the 'up' or 'down' delay in seconds, which specifies a delay to wait before the next VM is started or stopped.
1f554f76 796
2489d6df 797`--swap` `<integer> (0 - N)` ('default =' `512`)::
1f554f76
DM
798
799Amount of SWAP for the VM in MB.
800
2489d6df 801`--template` `<boolean>` ('default =' `0`)::
1f554f76
DM
802
803Enable/disable Template.
804
2489d6df 805`--tty` `<integer> (0 - 6)` ('default =' `2`)::
1f554f76
DM
806
807Specify the number of tty available to the container
808
2489d6df 809`--unprivileged` `<boolean>` ('default =' `0`)::
1f554f76 810
c2993fe5 811Makes the container run as unprivileged user. (Should not be modified manually.)
1f554f76 812
2489d6df 813`--unused[n]` `<string>` ::
1f554f76 814
c2993fe5 815Reference to unused volumes. This is used internally, and should not be modified manually.
1f554f76 816
1f554f76
DM
817*pct shutdown* `<vmid>` `[OPTIONS]`
818
9b3e4991
DM
819Shutdown the container. This will trigger a clean shutdown of the
820container, see lxc-stop(1) for details.
1f554f76 821
013dc89f 822`<vmid>`: `<integer> (1 - N)` ::
1f554f76
DM
823
824The (unique) ID of the VM.
825
2489d6df 826`--forceStop` `<boolean>` ('default =' `0`)::
1f554f76
DM
827
828Make sure the Container stops.
829
2489d6df 830`--timeout` `<integer> (0 - N)` ('default =' `60`)::
1f554f76
DM
831
832Wait maximal timeout seconds.
833
1f554f76
DM
834*pct snapshot* `<vmid> <snapname>` `[OPTIONS]`
835
836Snapshot a container.
837
013dc89f 838`<vmid>`: `<integer> (1 - N)` ::
1f554f76
DM
839
840The (unique) ID of the VM.
841
013dc89f 842`<snapname>`: `<string>` ::
1f554f76
DM
843
844The name of the snapshot.
845
2489d6df 846`--description` `<string>` ::
1f554f76
DM
847
848A textual description or comment.
849
9b3e4991 850*pct start* `<vmid>` `[OPTIONS]`
1f554f76
DM
851
852Start the container.
853
013dc89f 854`<vmid>`: `<integer> (1 - N)` ::
1f554f76
DM
855
856The (unique) ID of the VM.
857
2489d6df 858`--skiplock` `<boolean>` ::
9b3e4991
DM
859
860Ignore locks - only root is allowed to use this option.
861
2c0dde61
DM
862*pct status* `<vmid>` `[OPTIONS]`
863
864Show CT status.
865
013dc89f 866`<vmid>`: `<integer> (1 - N)` ::
2c0dde61
DM
867
868The (unique) ID of the VM.
869
2489d6df 870`--verbose` `<boolean>` ::
2c0dde61
DM
871
872Verbose output format
873
9b3e4991 874*pct stop* `<vmid>` `[OPTIONS]`
1f554f76 875
9b3e4991
DM
876Stop the container. This will abruptly stop all processes running in the
877container.
1f554f76 878
013dc89f 879`<vmid>`: `<integer> (1 - N)` ::
1f554f76
DM
880
881The (unique) ID of the VM.
882
2489d6df 883`--skiplock` `<boolean>` ::
9b3e4991
DM
884
885Ignore locks - only root is allowed to use this option.
886
1f554f76
DM
887*pct suspend* `<vmid>`
888
889Suspend the container.
890
013dc89f 891`<vmid>`: `<integer> (1 - N)` ::
1f554f76
DM
892
893The (unique) ID of the VM.
894
27a7acb2 895*pct template* `<vmid>`
1f554f76
DM
896
897Create a Template.
898
013dc89f 899`<vmid>`: `<integer> (1 - N)` ::
1f554f76
DM
900
901The (unique) ID of the VM.
902
1f554f76
DM
903*pct unlock* `<vmid>`
904
905Unlock the VM.
906
013dc89f 907`<vmid>`: `<integer> (1 - N)` ::
1f554f76
DM
908
909The (unique) ID of the VM.
910
9b3e4991
DM
911*pct unmount* `<vmid>`
912
913Unmount the container's filesystem.
914
013dc89f 915`<vmid>`: `<integer> (1 - N)` ::
9b3e4991
DM
916
917The (unique) ID of the VM.
918
919