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