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