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