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