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