]> git.proxmox.com Git - pve-docs.git/blob - pct.1-synopsis.adoc
pvenode: add WOL section to doc
[pve-docs.git] / pct.1-synopsis.adoc
1 *pct* `<COMMAND> [ARGS] [OPTIONS]`
2
3 *pct clone* `<vmid> <newid>` `[OPTIONS]`
4
5 Create a container clone/copy
6
7 `<vmid>`: `<integer> (1 - N)` ::
8
9 The (unique) ID of the VM.
10
11 `<newid>`: `<integer> (1 - N)` ::
12
13 VMID for the clone.
14
15 `--description` `<string>` ::
16
17 Description for the new CT.
18
19 `--full` `<boolean>` ::
20
21 Create 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.
22
23 `--hostname` `<string>` ::
24
25 Set a hostname for the new CT.
26
27 `--pool` `<string>` ::
28
29 Add the new CT to the specified pool.
30
31 `--snapname` `<string>` ::
32
33 The name of the snapshot.
34
35 `--storage` `<string>` ::
36
37 Target storage for full clone.
38
39 `--target` `<string>` ::
40
41 Target node. Only allowed if the original VM is on shared storage.
42
43 *pct config* `<vmid>`
44
45 Get container configuration.
46
47 `<vmid>`: `<integer> (1 - N)` ::
48
49 The (unique) ID of the VM.
50
51 *pct console* `<vmid>` `[OPTIONS]`
52
53 Launch a console for the specified container.
54
55 `<vmid>`: `<integer> (1 - N)` ::
56
57 The (unique) ID of the VM.
58
59 `--escape` `\^?[a-z]` ('default =' `^a`)::
60
61 Escape sequence prefix. For example to use <Ctrl+b q> as the escape sequence pass '^b'.
62
63 *pct cpusets*
64
65 Print the list of assigned CPU sets.
66
67 *pct create* `<vmid> <ostemplate>` `[OPTIONS]`
68
69 Create or restore a container.
70
71 `<vmid>`: `<integer> (1 - N)` ::
72
73 The (unique) ID of the VM.
74
75 `<ostemplate>`: `<string>` ::
76
77 The OS template or backup file.
78
79 `--arch` `<amd64 | arm64 | armhf | i386>` ('default =' `amd64`)::
80
81 OS architecture type.
82
83 `--bwlimit` `<number> (0 - N)` ::
84
85 Override i/o bandwidth limit (in KiB/s).
86
87 `--cmode` `<console | shell | tty>` ('default =' `tty`)::
88
89 Console 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).
90
91 `--console` `<boolean>` ('default =' `1`)::
92
93 Attach a console device (/dev/console) to the container.
94
95 `--cores` `<integer> (1 - 128)` ::
96
97 The number of cores assigned to the container. A container can use all available cores by default.
98
99 `--cpulimit` `<number> (0 - 128)` ('default =' `0`)::
100
101 Limit of CPU usage.
102 +
103 NOTE: If the computer has 2 CPUs, it has a total of '2' CPU time. Value '0' indicates no CPU limit.
104
105 `--cpuunits` `<integer> (0 - 500000)` ('default =' `1024`)::
106
107 CPU 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.
108 +
109 NOTE: You can disable fair-scheduler configuration by setting this to 0.
110
111 `--description` `<string>` ::
112
113 Container description. Only used on the configuration web interface.
114
115 `--features` `[fuse=<1|0>] [,keyctl=<1|0>] [,mount=<fstype;fstype;...>] [,nesting=<1|0>]` ::
116
117 Allow containers access to advanced features.
118
119 `--force` `<boolean>` ::
120
121 Allow to overwrite existing container.
122
123 `--hostname` `<string>` ::
124
125 Set a host name for the container.
126
127 `--ignore-unpack-errors` `<boolean>` ::
128
129 Ignore errors when extracting the template.
130
131 `--lock` `<backup | disk | migrate | mounted | rollback | snapshot | snapshot-delete>` ::
132
133 Lock/unlock the VM.
134
135 `--memory` `<integer> (16 - N)` ('default =' `512`)::
136
137 Amount of RAM for the VM in MB.
138
139 `--mp[n]` `[volume=]<volume> ,mp=<Path> [,acl=<1|0>] [,backup=<1|0>] [,quota=<1|0>] [,replicate=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=<DiskSize>]` ::
140
141 Use volume as container mount point.
142
143 `--nameserver` `<string>` ::
144
145 Sets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.
146
147 `--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>]` ::
148
149 Specifies network interfaces for the container.
150
151 `--onboot` `<boolean>` ('default =' `0`)::
152
153 Specifies whether a VM will be started during system bootup.
154
155 `--ostype` `<alpine | archlinux | centos | debian | fedora | gentoo | opensuse | ubuntu | unmanaged>` ::
156
157 OS 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.
158
159 `--password` `<password>` ::
160
161 Sets root password inside container.
162
163 `--pool` `<string>` ::
164
165 Add the VM to the specified pool.
166
167 `--protection` `<boolean>` ('default =' `0`)::
168
169 Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation.
170
171 `--restore` `<boolean>` ::
172
173 Mark this as restore task.
174
175 `--rootfs` `[volume=]<volume> [,acl=<1|0>] [,quota=<1|0>] [,replicate=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=<DiskSize>]` ::
176
177 Use volume as container root.
178
179 `--searchdomain` `<string>` ::
180
181 Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.
182
183 `--ssh-public-keys` `<filepath>` ::
184
185 Setup public SSH keys (one key per line, OpenSSH format).
186
187 `--start` `<boolean>` ('default =' `0`)::
188
189 Start the CT after its creation finished successfully.
190
191 `--startup` `[[order=]\d+] [,up=\d+] [,down=\d+] ` ::
192
193 Startup 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.
194
195 `--storage` `<string>` ('default =' `local`)::
196
197 Default Storage.
198
199 `--swap` `<integer> (0 - N)` ('default =' `512`)::
200
201 Amount of SWAP for the VM in MB.
202
203 `--template` `<boolean>` ('default =' `0`)::
204
205 Enable/disable Template.
206
207 `--tty` `<integer> (0 - 6)` ('default =' `2`)::
208
209 Specify the number of tty available to the container
210
211 `--unprivileged` `<boolean>` ('default =' `0`)::
212
213 Makes the container run as unprivileged user. (Should not be modified manually.)
214
215 `--unused[n]` `<string>` ::
216
217 Reference to unused volumes. This is used internally, and should not be modified manually.
218
219 *pct delsnapshot* `<vmid> <snapname>` `[OPTIONS]`
220
221 Delete a LXC snapshot.
222
223 `<vmid>`: `<integer> (1 - N)` ::
224
225 The (unique) ID of the VM.
226
227 `<snapname>`: `<string>` ::
228
229 The name of the snapshot.
230
231 `--force` `<boolean>` ::
232
233 For removal from config file, even if removing disk snapshots fails.
234
235 *pct destroy* `<vmid>`
236
237 Destroy the container (also delete all uses files).
238
239 `<vmid>`: `<integer> (1 - N)` ::
240
241 The (unique) ID of the VM.
242
243 *pct df* `<vmid>`
244
245 Get the container's current disk usage.
246
247 `<vmid>`: `<integer> (1 - N)` ::
248
249 The (unique) ID of the VM.
250
251 *pct enter* `<vmid>`
252
253 Launch a shell for the specified container.
254
255 `<vmid>`: `<integer> (1 - N)` ::
256
257 The (unique) ID of the VM.
258
259 *pct exec* `<vmid> [<extra-args>]`
260
261 Launch a command inside the specified container.
262
263 `<vmid>`: `<integer> (1 - N)` ::
264
265 The (unique) ID of the VM.
266
267 `<extra-args>`: `<array>` ::
268
269 Extra arguments as array
270
271 *pct fsck* `<vmid>` `[OPTIONS]`
272
273 Run a filesystem check (fsck) on a container volume.
274
275 `<vmid>`: `<integer> (1 - N)` ::
276
277 The (unique) ID of the VM.
278
279 `--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>` ::
280
281 A volume on which to run the filesystem check
282
283 `--force` `<boolean>` ('default =' `0`)::
284
285 Force checking, even if the filesystem seems clean
286
287 *pct help* `[OPTIONS]`
288
289 Get help about specified command.
290
291 `--extra-args` `<array>` ::
292
293 Shows help for a specific command
294
295 `--verbose` `<boolean>` ::
296
297 Verbose output format.
298
299 *pct list*
300
301 LXC container index (per node).
302
303 *pct listsnapshot* `<vmid>`
304
305 List all snapshots.
306
307 `<vmid>`: `<integer> (1 - N)` ::
308
309 The (unique) ID of the VM.
310
311 *pct migrate* `<vmid> <target>` `[OPTIONS]`
312
313 Migrate the container to another node. Creates a new migration task.
314
315 `<vmid>`: `<integer> (1 - N)` ::
316
317 The (unique) ID of the VM.
318
319 `<target>`: `<string>` ::
320
321 Target node.
322
323 `--force` `<boolean>` ::
324
325 Force migration despite local bind / device mounts. NOTE: deprecated, use 'shared' property of mount point instead.
326
327 `--online` `<boolean>` ::
328
329 Use online/live migration.
330
331 `--restart` `<boolean>` ::
332
333 Use restart migration
334
335 `--timeout` `<integer>` ('default =' `180`)::
336
337 Timeout in seconds for shutdown for restart migration
338
339 *pct mount* `<vmid>`
340
341 Mount the container's filesystem on the host. This will hold a lock on the
342 container and is meant for emergency maintenance only as it will prevent
343 further operations on the container other than start and stop.
344
345 `<vmid>`: `<integer> (1 - N)` ::
346
347 The (unique) ID of the VM.
348
349 *pct move_volume* `<vmid> <volume> <storage>` `[OPTIONS]`
350
351 Move a rootfs-/mp-volume to a different storage
352
353 `<vmid>`: `<integer> (1 - N)` ::
354
355 The (unique) ID of the VM.
356
357 `<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>` ::
358
359 Volume which will be moved.
360
361 `<storage>`: `<string>` ::
362
363 Target Storage.
364
365 `--delete` `<boolean>` ('default =' `0`)::
366
367 Delete the original volume after successful copy. By default the original is kept as an unused volume entry.
368
369 `--digest` `<string>` ::
370
371 Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
372
373 *pct pull* `<vmid> <path> <destination>` `[OPTIONS]`
374
375 Copy a file from the container to the local system.
376
377 `<vmid>`: `<integer> (1 - N)` ::
378
379 The (unique) ID of the VM.
380
381 `<path>`: `<string>` ::
382
383 Path to a file inside the container to pull.
384
385 `<destination>`: `<string>` ::
386
387 Destination
388
389 `--group` `<string>` ::
390
391 Owner group name or id.
392
393 `--perms` `<string>` ::
394
395 File permissions to use (octal by default, prefix with '0x' for hexadecimal).
396
397 `--user` `<string>` ::
398
399 Owner user name or id.
400
401 *pct push* `<vmid> <file> <destination>` `[OPTIONS]`
402
403 Copy a local file to the container.
404
405 `<vmid>`: `<integer> (1 - N)` ::
406
407 The (unique) ID of the VM.
408
409 `<file>`: `<string>` ::
410
411 Path to a local file.
412
413 `<destination>`: `<string>` ::
414
415 Destination inside the container to write to.
416
417 `--group` `<string>` ::
418
419 Owner group name or id. When using a name it must exist inside the container.
420
421 `--perms` `<string>` ::
422
423 File permissions to use (octal by default, prefix with '0x' for hexadecimal).
424
425 `--user` `<string>` ::
426
427 Owner user name or id. When using a name it must exist inside the container.
428
429 *pct rescan* `[OPTIONS]`
430
431 Rescan all storages and update disk sizes and unused disk images.
432
433 `--dryrun` `<boolean>` ('default =' `0`)::
434
435 Do not actually write changes out to conifg.
436
437 `--vmid` `<integer> (1 - N)` ::
438
439 The (unique) ID of the VM.
440
441 *pct resize* `<vmid> <disk> <size>` `[OPTIONS]`
442
443 Resize a container mount point.
444
445 `<vmid>`: `<integer> (1 - N)` ::
446
447 The (unique) ID of the VM.
448
449 `<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>` ::
450
451 The disk you want to resize.
452
453 `<size>`: `\+?\d+(\.\d+)?[KMGT]?` ::
454
455 The 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.
456
457 `--digest` `<string>` ::
458
459 Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
460
461 *pct restore* `<vmid> <ostemplate>` `[OPTIONS]`
462
463 Create or restore a container.
464
465 `<vmid>`: `<integer> (1 - N)` ::
466
467 The (unique) ID of the VM.
468
469 `<ostemplate>`: `<string>` ::
470
471 The OS template or backup file.
472
473 `--arch` `<amd64 | arm64 | armhf | i386>` ('default =' `amd64`)::
474
475 OS architecture type.
476
477 `--bwlimit` `<number> (0 - N)` ::
478
479 Override i/o bandwidth limit (in KiB/s).
480
481 `--cmode` `<console | shell | tty>` ('default =' `tty`)::
482
483 Console 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).
484
485 `--console` `<boolean>` ('default =' `1`)::
486
487 Attach a console device (/dev/console) to the container.
488
489 `--cores` `<integer> (1 - 128)` ::
490
491 The number of cores assigned to the container. A container can use all available cores by default.
492
493 `--cpulimit` `<number> (0 - 128)` ('default =' `0`)::
494
495 Limit of CPU usage.
496 +
497 NOTE: If the computer has 2 CPUs, it has a total of '2' CPU time. Value '0' indicates no CPU limit.
498
499 `--cpuunits` `<integer> (0 - 500000)` ('default =' `1024`)::
500
501 CPU 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.
502 +
503 NOTE: You can disable fair-scheduler configuration by setting this to 0.
504
505 `--description` `<string>` ::
506
507 Container description. Only used on the configuration web interface.
508
509 `--features` `[fuse=<1|0>] [,keyctl=<1|0>] [,mount=<fstype;fstype;...>] [,nesting=<1|0>]` ::
510
511 Allow containers access to advanced features.
512
513 `--force` `<boolean>` ::
514
515 Allow to overwrite existing container.
516
517 `--hostname` `<string>` ::
518
519 Set a host name for the container.
520
521 `--ignore-unpack-errors` `<boolean>` ::
522
523 Ignore errors when extracting the template.
524
525 `--lock` `<backup | disk | migrate | mounted | rollback | snapshot | snapshot-delete>` ::
526
527 Lock/unlock the VM.
528
529 `--memory` `<integer> (16 - N)` ('default =' `512`)::
530
531 Amount of RAM for the VM in MB.
532
533 `--mp[n]` `[volume=]<volume> ,mp=<Path> [,acl=<1|0>] [,backup=<1|0>] [,quota=<1|0>] [,replicate=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=<DiskSize>]` ::
534
535 Use volume as container mount point.
536
537 `--nameserver` `<string>` ::
538
539 Sets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.
540
541 `--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>]` ::
542
543 Specifies network interfaces for the container.
544
545 `--onboot` `<boolean>` ('default =' `0`)::
546
547 Specifies whether a VM will be started during system bootup.
548
549 `--ostype` `<alpine | archlinux | centos | debian | fedora | gentoo | opensuse | ubuntu | unmanaged>` ::
550
551 OS 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.
552
553 `--password` `<password>` ::
554
555 Sets root password inside container.
556
557 `--pool` `<string>` ::
558
559 Add the VM to the specified pool.
560
561 `--protection` `<boolean>` ('default =' `0`)::
562
563 Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation.
564
565 `--rootfs` `[volume=]<volume> [,acl=<1|0>] [,quota=<1|0>] [,replicate=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=<DiskSize>]` ::
566
567 Use volume as container root.
568
569 `--searchdomain` `<string>` ::
570
571 Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.
572
573 `--ssh-public-keys` `<filepath>` ::
574
575 Setup public SSH keys (one key per line, OpenSSH format).
576
577 `--start` `<boolean>` ('default =' `0`)::
578
579 Start the CT after its creation finished successfully.
580
581 `--startup` `[[order=]\d+] [,up=\d+] [,down=\d+] ` ::
582
583 Startup 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.
584
585 `--storage` `<string>` ('default =' `local`)::
586
587 Default Storage.
588
589 `--swap` `<integer> (0 - N)` ('default =' `512`)::
590
591 Amount of SWAP for the VM in MB.
592
593 `--template` `<boolean>` ('default =' `0`)::
594
595 Enable/disable Template.
596
597 `--tty` `<integer> (0 - 6)` ('default =' `2`)::
598
599 Specify the number of tty available to the container
600
601 `--unprivileged` `<boolean>` ('default =' `0`)::
602
603 Makes the container run as unprivileged user. (Should not be modified manually.)
604
605 `--unused[n]` `<string>` ::
606
607 Reference to unused volumes. This is used internally, and should not be modified manually.
608
609 *pct resume* `<vmid>`
610
611 Resume the container.
612
613 `<vmid>`: `<integer> (1 - N)` ::
614
615 The (unique) ID of the VM.
616
617 *pct rollback* `<vmid> <snapname>`
618
619 Rollback LXC state to specified snapshot.
620
621 `<vmid>`: `<integer> (1 - N)` ::
622
623 The (unique) ID of the VM.
624
625 `<snapname>`: `<string>` ::
626
627 The name of the snapshot.
628
629 *pct set* `<vmid>` `[OPTIONS]`
630
631 Set container options.
632
633 `<vmid>`: `<integer> (1 - N)` ::
634
635 The (unique) ID of the VM.
636
637 `--arch` `<amd64 | arm64 | armhf | i386>` ('default =' `amd64`)::
638
639 OS architecture type.
640
641 `--cmode` `<console | shell | tty>` ('default =' `tty`)::
642
643 Console 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).
644
645 `--console` `<boolean>` ('default =' `1`)::
646
647 Attach a console device (/dev/console) to the container.
648
649 `--cores` `<integer> (1 - 128)` ::
650
651 The number of cores assigned to the container. A container can use all available cores by default.
652
653 `--cpulimit` `<number> (0 - 128)` ('default =' `0`)::
654
655 Limit of CPU usage.
656 +
657 NOTE: If the computer has 2 CPUs, it has a total of '2' CPU time. Value '0' indicates no CPU limit.
658
659 `--cpuunits` `<integer> (0 - 500000)` ('default =' `1024`)::
660
661 CPU 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.
662 +
663 NOTE: You can disable fair-scheduler configuration by setting this to 0.
664
665 `--delete` `<string>` ::
666
667 A list of settings you want to delete.
668
669 `--description` `<string>` ::
670
671 Container description. Only used on the configuration web interface.
672
673 `--digest` `<string>` ::
674
675 Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
676
677 `--features` `[fuse=<1|0>] [,keyctl=<1|0>] [,mount=<fstype;fstype;...>] [,nesting=<1|0>]` ::
678
679 Allow containers access to advanced features.
680
681 `--hostname` `<string>` ::
682
683 Set a host name for the container.
684
685 `--lock` `<backup | disk | migrate | mounted | rollback | snapshot | snapshot-delete>` ::
686
687 Lock/unlock the VM.
688
689 `--memory` `<integer> (16 - N)` ('default =' `512`)::
690
691 Amount of RAM for the VM in MB.
692
693 `--mp[n]` `[volume=]<volume> ,mp=<Path> [,acl=<1|0>] [,backup=<1|0>] [,quota=<1|0>] [,replicate=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=<DiskSize>]` ::
694
695 Use volume as container mount point.
696
697 `--nameserver` `<string>` ::
698
699 Sets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.
700
701 `--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>]` ::
702
703 Specifies network interfaces for the container.
704
705 `--onboot` `<boolean>` ('default =' `0`)::
706
707 Specifies whether a VM will be started during system bootup.
708
709 `--ostype` `<alpine | archlinux | centos | debian | fedora | gentoo | opensuse | ubuntu | unmanaged>` ::
710
711 OS 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.
712
713 `--protection` `<boolean>` ('default =' `0`)::
714
715 Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation.
716
717 `--rootfs` `[volume=]<volume> [,acl=<1|0>] [,quota=<1|0>] [,replicate=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=<DiskSize>]` ::
718
719 Use volume as container root.
720
721 `--searchdomain` `<string>` ::
722
723 Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.
724
725 `--startup` `[[order=]\d+] [,up=\d+] [,down=\d+] ` ::
726
727 Startup 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.
728
729 `--swap` `<integer> (0 - N)` ('default =' `512`)::
730
731 Amount of SWAP for the VM in MB.
732
733 `--template` `<boolean>` ('default =' `0`)::
734
735 Enable/disable Template.
736
737 `--tty` `<integer> (0 - 6)` ('default =' `2`)::
738
739 Specify the number of tty available to the container
740
741 `--unprivileged` `<boolean>` ('default =' `0`)::
742
743 Makes the container run as unprivileged user. (Should not be modified manually.)
744
745 `--unused[n]` `<string>` ::
746
747 Reference to unused volumes. This is used internally, and should not be modified manually.
748
749 *pct shutdown* `<vmid>` `[OPTIONS]`
750
751 Shutdown the container. This will trigger a clean shutdown of the
752 container, see lxc-stop(1) for details.
753
754 `<vmid>`: `<integer> (1 - N)` ::
755
756 The (unique) ID of the VM.
757
758 `--forceStop` `<boolean>` ('default =' `0`)::
759
760 Make sure the Container stops.
761
762 `--timeout` `<integer> (0 - N)` ('default =' `60`)::
763
764 Wait maximal timeout seconds.
765
766 *pct snapshot* `<vmid> <snapname>` `[OPTIONS]`
767
768 Snapshot a container.
769
770 `<vmid>`: `<integer> (1 - N)` ::
771
772 The (unique) ID of the VM.
773
774 `<snapname>`: `<string>` ::
775
776 The name of the snapshot.
777
778 `--description` `<string>` ::
779
780 A textual description or comment.
781
782 *pct start* `<vmid>` `[OPTIONS]`
783
784 Start the container.
785
786 `<vmid>`: `<integer> (1 - N)` ::
787
788 The (unique) ID of the VM.
789
790 `--skiplock` `<boolean>` ::
791
792 Ignore locks - only root is allowed to use this option.
793
794 *pct status* `<vmid>` `[OPTIONS]`
795
796 Show CT status.
797
798 `<vmid>`: `<integer> (1 - N)` ::
799
800 The (unique) ID of the VM.
801
802 `--verbose` `<boolean>` ::
803
804 Verbose output format
805
806 *pct stop* `<vmid>` `[OPTIONS]`
807
808 Stop the container. This will abruptly stop all processes running in the
809 container.
810
811 `<vmid>`: `<integer> (1 - N)` ::
812
813 The (unique) ID of the VM.
814
815 `--skiplock` `<boolean>` ::
816
817 Ignore locks - only root is allowed to use this option.
818
819 *pct suspend* `<vmid>`
820
821 Suspend the container.
822
823 `<vmid>`: `<integer> (1 - N)` ::
824
825 The (unique) ID of the VM.
826
827 *pct template* `<vmid>`
828
829 Create a Template.
830
831 `<vmid>`: `<integer> (1 - N)` ::
832
833 The (unique) ID of the VM.
834
835 *pct unlock* `<vmid>`
836
837 Unlock the VM.
838
839 `<vmid>`: `<integer> (1 - N)` ::
840
841 The (unique) ID of the VM.
842
843 *pct unmount* `<vmid>`
844
845 Unmount the container's filesystem.
846
847 `<vmid>`: `<integer> (1 - N)` ::
848
849 The (unique) ID of the VM.
850
851