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