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