]> git.proxmox.com Git - pve-docs.git/blame - pct.1-synopsis.adoc
update generated docs
[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
5d9c884c 140`-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 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
5d9c884c 176`-rootfs` `[volume=]<volume> [,acl=<1|0>] [,quota=<1|0>] [,replicate=<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
6875b729
DM
355`-restart` `<boolean>` ::
356
357Use restart migration
358
359`-timeout` `<integer>` ('default =' `180`)::
360
361Timeout in seconds for shutdown for restart migration
362
1f554f76
DM
363
364
9b3e4991
DM
365
366*pct mount* `<vmid>`
367
368Mount the container's filesystem on the host. This will hold a lock on the
369container and is meant for emergency maintenance only as it will prevent
370further operations on the container other than start and stop.
371
013dc89f 372`<vmid>`: `<integer> (1 - N)` ::
9b3e4991
DM
373
374The (unique) ID of the VM.
375
376
377
378*pct pull* `<vmid> <path> <destination>` `[OPTIONS]`
379
380Copy a file from the container to the local system.
381
013dc89f 382`<vmid>`: `<integer> (1 - N)` ::
9b3e4991
DM
383
384The (unique) ID of the VM.
385
013dc89f 386`<path>`: `<string>` ::
9b3e4991
DM
387
388Path to a file inside the container to pull.
389
013dc89f 390`<destination>`: `<string>` ::
9b3e4991
DM
391
392Destination
393
013dc89f 394`-group` `<string>` ::
9b3e4991
DM
395
396Owner group name or id.
397
013dc89f 398`-perms` `<string>` ::
9b3e4991 399
c2993fe5 400File permissions to use (octal by default, prefix with '0x' for hexadecimal).
9b3e4991 401
013dc89f 402`-user` `<string>` ::
9b3e4991
DM
403
404Owner user name or id.
405
406
407
408*pct push* `<vmid> <file> <destination>` `[OPTIONS]`
409
410Copy a local file to the container.
411
013dc89f 412`<vmid>`: `<integer> (1 - N)` ::
9b3e4991
DM
413
414The (unique) ID of the VM.
415
013dc89f 416`<file>`: `<string>` ::
9b3e4991
DM
417
418Path to a local file.
419
013dc89f 420`<destination>`: `<string>` ::
9b3e4991
DM
421
422Destination inside the container to write to.
423
013dc89f 424`-group` `<string>` ::
9b3e4991 425
c2993fe5 426Owner group name or id. When using a name it must exist inside the container.
9b3e4991 427
013dc89f 428`-perms` `<string>` ::
9b3e4991 429
c2993fe5 430File permissions to use (octal by default, prefix with '0x' for hexadecimal).
9b3e4991 431
013dc89f 432`-user` `<string>` ::
9b3e4991 433
c2993fe5 434Owner user name or id. When using a name it must exist inside the container.
9b3e4991
DM
435
436
437
438
1f554f76
DM
439*pct resize* `<vmid> <disk> <size>` `[OPTIONS]`
440
de0983cb 441Resize a container mount point.
1f554f76 442
013dc89f 443`<vmid>`: `<integer> (1 - N)` ::
1f554f76
DM
444
445The (unique) ID of the VM.
446
013dc89f 447`<disk>`: `<mp0 | mp1 | mp2 | mp3 | mp4 | mp5 | mp6 | mp7 | mp8 | mp9 | rootfs>` ::
1f554f76
DM
448
449The disk you want to resize.
450
013dc89f 451`<size>`: `\+?\d+(\.\d+)?[KMGT]?` ::
1f554f76 452
c2993fe5 453The 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 454
013dc89f 455`-digest` `<string>` ::
1f554f76 456
c2993fe5 457Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
1f554f76
DM
458
459
460
461*pct restore* `<vmid> <ostemplate>` `[OPTIONS]`
462
463Create or restore a container.
464
013dc89f 465`<vmid>`: `<integer> (1 - N)` ::
1f554f76
DM
466
467The (unique) ID of the VM.
468
013dc89f 469`<ostemplate>`: `<string>` ::
1f554f76
DM
470
471The OS template or backup file.
472
013dc89f 473`-arch` `<amd64 | i386>` ('default =' `amd64`)::
1f554f76
DM
474
475OS architecture type.
476
013dc89f 477`-cmode` `<console | shell | tty>` ('default =' `tty`)::
1f554f76 478
c2993fe5 479Console 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 480
013dc89f 481`-console` `<boolean>` ('default =' `1`)::
1f554f76
DM
482
483Attach a console device (/dev/console) to the container.
484
013dc89f 485`-cores` `<integer> (1 - 128)` ::
de0983cb
DM
486
487The number of cores assigned to the container. A container can use all available cores by default.
488
013dc89f 489`-cpulimit` `<number> (0 - 128)` ('default =' `0`)::
1f554f76 490
9b3e4991
DM
491Limit of CPU usage.
492+
c2993fe5 493NOTE: If the computer has 2 CPUs, it has a total of '2' CPU time. Value '0' indicates no CPU limit.
1f554f76 494
013dc89f 495`-cpuunits` `<integer> (0 - 500000)` ('default =' `1024`)::
1f554f76 496
c2993fe5 497CPU 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 498+
1f554f76
DM
499NOTE: You can disable fair-scheduler configuration by setting this to 0.
500
013dc89f 501`-description` `<string>` ::
1f554f76
DM
502
503Container description. Only used on the configuration web interface.
504
013dc89f 505`-force` `<boolean>` ::
1f554f76
DM
506
507Allow to overwrite existing container.
508
013dc89f 509`-hostname` `<string>` ::
1f554f76
DM
510
511Set a host name for the container.
512
013dc89f 513`-ignore-unpack-errors` `<boolean>` ::
1f554f76
DM
514
515Ignore errors when extracting the template.
516
013dc89f 517`-lock` `<backup | migrate | rollback | snapshot>` ::
1f554f76
DM
518
519Lock/unlock the VM.
520
013dc89f 521`-memory` `<integer> (16 - N)` ('default =' `512`)::
1f554f76
DM
522
523Amount of RAM for the VM in MB.
524
5d9c884c 525`-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 526
c2993fe5 527Use volume as container mount point.
1f554f76 528
013dc89f 529`-nameserver` `<string>` ::
1f554f76 530
c2993fe5 531Sets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.
1f554f76 532
f004f5b9 533`-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
534
535Specifies network interfaces for the container.
536
013dc89f 537`-onboot` `<boolean>` ('default =' `0`)::
1f554f76
DM
538
539Specifies whether a VM will be started during system bootup.
540
013dc89f 541`-ostype` `<alpine | archlinux | centos | debian | fedora | gentoo | opensuse | ubuntu | unmanaged>` ::
1f554f76 542
c2993fe5 543OS 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 544
9b3e4991 545`-password` ::
1f554f76
DM
546
547Sets root password inside container.
548
013dc89f 549`-pool` `<string>` ::
1f554f76
DM
550
551Add the VM to the specified pool.
552
013dc89f 553`-protection` `<boolean>` ('default =' `0`)::
1f554f76 554
c2993fe5 555Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation.
1f554f76 556
5d9c884c 557`-rootfs` `[volume=]<volume> [,acl=<1|0>] [,quota=<1|0>] [,replicate=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=<DiskSize>]` ::
1f554f76
DM
558
559Use volume as container root.
560
013dc89f 561`-searchdomain` `<string>` ::
1f554f76 562
c2993fe5 563Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.
9b3e4991 564
013dc89f 565`-ssh-public-keys` `<string>` ::
9b3e4991
DM
566
567Setup public SSH keys (one key per line, OpenSSH format).
1f554f76
DM
568
569`-startup` `[[order=]\d+] [,up=\d+] [,down=\d+] ` ::
570
c2993fe5 571Startup 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 572
013dc89f 573`-storage` `<string>` ('default =' `local`)::
1f554f76
DM
574
575Default Storage.
576
013dc89f 577`-swap` `<integer> (0 - N)` ('default =' `512`)::
1f554f76
DM
578
579Amount of SWAP for the VM in MB.
580
013dc89f 581`-template` `<boolean>` ('default =' `0`)::
1f554f76
DM
582
583Enable/disable Template.
584
013dc89f 585`-tty` `<integer> (0 - 6)` ('default =' `2`)::
1f554f76
DM
586
587Specify the number of tty available to the container
588
013dc89f 589`-unprivileged` `<boolean>` ('default =' `0`)::
1f554f76 590
c2993fe5 591Makes the container run as unprivileged user. (Should not be modified manually.)
1f554f76 592
013dc89f 593`-unused[n]` `<string>` ::
1f554f76 594
c2993fe5 595Reference to unused volumes. This is used internally, and should not be modified manually.
1f554f76
DM
596
597
598
599
600*pct resume* `<vmid>`
601
602Resume the container.
603
013dc89f 604`<vmid>`: `<integer> (1 - N)` ::
1f554f76
DM
605
606The (unique) ID of the VM.
607
608
609
610
611*pct rollback* `<vmid> <snapname>`
612
613Rollback LXC state to specified snapshot.
614
013dc89f 615`<vmid>`: `<integer> (1 - N)` ::
1f554f76
DM
616
617The (unique) ID of the VM.
618
013dc89f 619`<snapname>`: `<string>` ::
1f554f76
DM
620
621The name of the snapshot.
622
623
624
625
626*pct set* `<vmid>` `[OPTIONS]`
627
628Set container options.
629
013dc89f 630`<vmid>`: `<integer> (1 - N)` ::
1f554f76
DM
631
632The (unique) ID of the VM.
633
013dc89f 634`-arch` `<amd64 | i386>` ('default =' `amd64`)::
1f554f76
DM
635
636OS architecture type.
637
013dc89f 638`-cmode` `<console | shell | tty>` ('default =' `tty`)::
1f554f76 639
c2993fe5 640Console 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 641
013dc89f 642`-console` `<boolean>` ('default =' `1`)::
1f554f76
DM
643
644Attach a console device (/dev/console) to the container.
645
013dc89f 646`-cores` `<integer> (1 - 128)` ::
de0983cb
DM
647
648The number of cores assigned to the container. A container can use all available cores by default.
649
013dc89f 650`-cpulimit` `<number> (0 - 128)` ('default =' `0`)::
1f554f76 651
9b3e4991
DM
652Limit of CPU usage.
653+
c2993fe5 654NOTE: If the computer has 2 CPUs, it has a total of '2' CPU time. Value '0' indicates no CPU limit.
1f554f76 655
013dc89f 656`-cpuunits` `<integer> (0 - 500000)` ('default =' `1024`)::
1f554f76 657
c2993fe5 658CPU 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 659+
1f554f76
DM
660NOTE: You can disable fair-scheduler configuration by setting this to 0.
661
013dc89f 662`-delete` `<string>` ::
1f554f76
DM
663
664A list of settings you want to delete.
665
013dc89f 666`-description` `<string>` ::
1f554f76
DM
667
668Container description. Only used on the configuration web interface.
669
013dc89f 670`-digest` `<string>` ::
1f554f76 671
c2993fe5 672Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
1f554f76 673
013dc89f 674`-hostname` `<string>` ::
1f554f76
DM
675
676Set a host name for the container.
677
013dc89f 678`-lock` `<backup | migrate | rollback | snapshot>` ::
1f554f76
DM
679
680Lock/unlock the VM.
681
013dc89f 682`-memory` `<integer> (16 - N)` ('default =' `512`)::
1f554f76
DM
683
684Amount of RAM for the VM in MB.
685
5d9c884c 686`-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 687
c2993fe5 688Use volume as container mount point.
1f554f76 689
013dc89f 690`-nameserver` `<string>` ::
1f554f76 691
c2993fe5 692Sets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.
1f554f76 693
f004f5b9 694`-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
695
696Specifies network interfaces for the container.
697
013dc89f 698`-onboot` `<boolean>` ('default =' `0`)::
1f554f76
DM
699
700Specifies whether a VM will be started during system bootup.
701
013dc89f 702`-ostype` `<alpine | archlinux | centos | debian | fedora | gentoo | opensuse | ubuntu | unmanaged>` ::
1f554f76 703
c2993fe5 704OS 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 705
013dc89f 706`-protection` `<boolean>` ('default =' `0`)::
1f554f76 707
c2993fe5 708Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation.
1f554f76 709
5d9c884c 710`-rootfs` `[volume=]<volume> [,acl=<1|0>] [,quota=<1|0>] [,replicate=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=<DiskSize>]` ::
1f554f76
DM
711
712Use volume as container root.
713
013dc89f 714`-searchdomain` `<string>` ::
1f554f76 715
c2993fe5 716Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.
1f554f76
DM
717
718`-startup` `[[order=]\d+] [,up=\d+] [,down=\d+] ` ::
719
c2993fe5 720Startup 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 721
013dc89f 722`-swap` `<integer> (0 - N)` ('default =' `512`)::
1f554f76
DM
723
724Amount of SWAP for the VM in MB.
725
013dc89f 726`-template` `<boolean>` ('default =' `0`)::
1f554f76
DM
727
728Enable/disable Template.
729
013dc89f 730`-tty` `<integer> (0 - 6)` ('default =' `2`)::
1f554f76
DM
731
732Specify the number of tty available to the container
733
013dc89f 734`-unprivileged` `<boolean>` ('default =' `0`)::
1f554f76 735
c2993fe5 736Makes the container run as unprivileged user. (Should not be modified manually.)
1f554f76 737
013dc89f 738`-unused[n]` `<string>` ::
1f554f76 739
c2993fe5 740Reference to unused volumes. This is used internally, and should not be modified manually.
1f554f76
DM
741
742
743
744
745*pct shutdown* `<vmid>` `[OPTIONS]`
746
9b3e4991
DM
747Shutdown the container. This will trigger a clean shutdown of the
748container, see lxc-stop(1) for details.
1f554f76 749
013dc89f 750`<vmid>`: `<integer> (1 - N)` ::
1f554f76
DM
751
752The (unique) ID of the VM.
753
013dc89f 754`-forceStop` `<boolean>` ('default =' `0`)::
1f554f76
DM
755
756Make sure the Container stops.
757
013dc89f 758`-timeout` `<integer> (0 - N)` ('default =' `60`)::
1f554f76
DM
759
760Wait maximal timeout seconds.
761
762
763
764
765*pct snapshot* `<vmid> <snapname>` `[OPTIONS]`
766
767Snapshot a container.
768
013dc89f 769`<vmid>`: `<integer> (1 - N)` ::
1f554f76
DM
770
771The (unique) ID of the VM.
772
013dc89f 773`<snapname>`: `<string>` ::
1f554f76
DM
774
775The name of the snapshot.
776
013dc89f 777`-description` `<string>` ::
1f554f76
DM
778
779A textual description or comment.
780
781
782
783
9b3e4991 784*pct start* `<vmid>` `[OPTIONS]`
1f554f76
DM
785
786Start the container.
787
013dc89f 788`<vmid>`: `<integer> (1 - N)` ::
1f554f76
DM
789
790The (unique) ID of the VM.
791
013dc89f 792`-skiplock` `<boolean>` ::
9b3e4991
DM
793
794Ignore locks - only root is allowed to use this option.
795
1f554f76
DM
796
797
2c0dde61
DM
798
799*pct status* `<vmid>` `[OPTIONS]`
800
801Show CT status.
802
013dc89f 803`<vmid>`: `<integer> (1 - N)` ::
2c0dde61
DM
804
805The (unique) ID of the VM.
806
013dc89f 807`-verbose` `<boolean>` ::
2c0dde61
DM
808
809Verbose output format
810
811
812
813
9b3e4991 814*pct stop* `<vmid>` `[OPTIONS]`
1f554f76 815
9b3e4991
DM
816Stop the container. This will abruptly stop all processes running in the
817container.
1f554f76 818
013dc89f 819`<vmid>`: `<integer> (1 - N)` ::
1f554f76
DM
820
821The (unique) ID of the VM.
822
013dc89f 823`-skiplock` `<boolean>` ::
9b3e4991
DM
824
825Ignore locks - only root is allowed to use this option.
826
1f554f76
DM
827
828
829*pct suspend* `<vmid>`
830
831Suspend the container.
832
013dc89f 833`<vmid>`: `<integer> (1 - N)` ::
1f554f76
DM
834
835The (unique) ID of the VM.
836
837
838
839
9b3e4991 840*pct template* `<vmid> -experimental <boolean>` `[OPTIONS]`
1f554f76
DM
841
842Create a Template.
843
013dc89f 844`<vmid>`: `<integer> (1 - N)` ::
1f554f76
DM
845
846The (unique) ID of the VM.
847
013dc89f 848`-experimental` `<boolean>` ('default =' `0`)::
9b3e4991 849
c2993fe5 850The template feature is experimental, set this flag if you know what you are doing.
9b3e4991 851
1f554f76
DM
852
853
854
855*pct unlock* `<vmid>`
856
857Unlock the VM.
858
013dc89f 859`<vmid>`: `<integer> (1 - N)` ::
1f554f76
DM
860
861The (unique) ID of the VM.
862
863
864
9b3e4991
DM
865*pct unmount* `<vmid>`
866
867Unmount the container's filesystem.
868
013dc89f 869`<vmid>`: `<integer> (1 - N)` ::
9b3e4991
DM
870
871The (unique) ID of the VM.
872
873
874
1f554f76 875