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