]> git.proxmox.com Git - pve-docs.git/blob - pct.1-synopsis.adoc
add auto-generated cluster firewall options
[pve-docs.git] / pct.1-synopsis.adoc
1 *pct* `<COMMAND> [ARGS] [OPTIONS]`
2
3 *pct config* `<vmid>`
4
5 Get container configuration.
6
7 `<vmid>` `integer (1 - N)` ::
8
9 The (unique) ID of the VM.
10
11
12
13
14 *pct console* `<vmid>`
15
16 Launch a console for the specified container.
17
18 `<vmid>` `integer (1 - N)` ::
19
20 The (unique) ID of the VM.
21
22
23
24
25 *pct create* `<vmid> <ostemplate>` `[OPTIONS]`
26
27 Create or restore a container.
28
29 `<vmid>` `integer (1 - N)` ::
30
31 The (unique) ID of the VM.
32
33 `<ostemplate>` `string` ::
34
35 The OS template or backup file.
36
37 `-arch` `(amd64 | i386)` (default=`amd64`)::
38
39 OS architecture type.
40
41 `-cmode` `(console | shell | tty)` (default=`tty`)::
42
43 Console mode. By default, the console command tries to open a connection to
44 one of the available tty devices. By setting cmode to 'console' it tries to
45 attach to /dev/console instead. If you set cmode to 'shell', it simply
46 invokes a shell inside the container (no login).
47
48 `-console` `boolean` (default=`1`)::
49
50 Attach a console device (/dev/console) to the container.
51
52 `-cpulimit` `number (0 - 128)` (default=`0`)::
53
54 Limit of CPU usage. Note if the computer has 2 CPUs, it has total of '2'
55 CPU time. Value '0' indicates no CPU limit.
56
57 `-cpuunits` `integer (0 - 500000)` (default=`1024`)::
58
59 CPU weight for a VM. Argument is used in the kernel fair scheduler. The
60 larger the number is, the more CPU time this VM gets. Number is relative to
61 weights of all the other running VMs.
62
63 NOTE: You can disable fair-scheduler configuration by setting this to 0.
64
65 `-description` `string` ::
66
67 Container description. Only used on the configuration web interface.
68
69 `-force` `boolean` ::
70
71 Allow to overwrite existing container.
72
73 `-hostname` `string` ::
74
75 Set a host name for the container.
76
77 `-ignore-unpack-errors` `boolean` ::
78
79 Ignore errors when extracting the template.
80
81 `-lock` `(backup | migrate | rollback | snapshot)` ::
82
83 Lock/unlock the VM.
84
85 `-memory` `integer (16 - N)` (default=`512`)::
86
87 Amount of RAM for the VM in MB.
88
89 `-mp[n]` `[volume=]<volume> [,backup=<[1|0]>] [,mp=<Path>] [,size=<DiskSize>]` ::
90
91 Use volume as container mount point (experimental feature).
92
93 `-nameserver` `string` ::
94
95 Sets DNS server IP address for a container. Create will automatically use
96 the setting from the host if you neither set searchdomain or nameserver.
97
98 `-net[n]` `name=<String> [,bridge=<vmbr<Number>>] [,firewall=<[1|0]>] [,gw=<GatewayIPv4>] [,gw6=<GatewayIPv6>] [,hwaddr=<MAC>] [,ip=<IPv4Format/CIDR>] [,ip6=<IPv6Format/CIDR>] [,mtu=<Number>] [,tag=<VlanNo>]` ::
99
100 Specifies network interfaces for the container.
101
102 `-onboot` `boolean` (default=`0`)::
103
104 Specifies whether a VM will be started during system bootup.
105
106 `-ostype` `(archlinux | centos | debian | fedora | opensuse | ubuntu)` ::
107
108 OS type. Corresponds to lxc setup scripts in
109 /usr/share/lxc/config/<ostype>.common.conf.
110
111 `-password` `string` ::
112
113 Sets root password inside container.
114
115 `-pool` `string` ::
116
117 Add the VM to the specified pool.
118
119 `-protection` `boolean` (default=`0`)::
120
121 Sets the protection flag of the container. This will prevent the remove
122 operation. This will prevent the CT or CT's disk remove/update operation.
123
124 `-restore` `boolean` ::
125
126 Mark this as restore task.
127
128 `-rootfs` `[volume=]<volume> [,backup=<[1|0]>] [,size=<DiskSize>]` ::
129
130 Use volume as container root.
131
132 `-searchdomain` `string` ::
133
134 Sets DNS search domains for a container. Create will automatically use the
135 setting from the host if you neither set searchdomain or nameserver.
136
137 `-startup` `[[order=]\d+] [,up=\d+] [,down=\d+] ` ::
138
139 Startup and shutdown behavior. Order is a non-negative number defining the
140 general startup order. Shutdown in done with reverse ordering. Additionally
141 you can set the 'up' or 'down' delay in seconds, which specifies a delay to
142 wait before the next VM is started or stopped.
143
144 `-storage` `string` (default=`local`)::
145
146 Default Storage.
147
148 `-swap` `integer (0 - N)` (default=`512`)::
149
150 Amount of SWAP for the VM in MB.
151
152 `-template` `boolean` (default=`0`)::
153
154 Enable/disable Template.
155
156 `-tty` `integer (0 - 6)` (default=`2`)::
157
158 Specify the number of tty available to the container
159
160 `-unprivileged` `boolean` (default=`0`)::
161
162 Makes the container run as unprivileged user. (Should not be modified
163 manually.)
164
165 `-unused[n]` `string` ::
166
167 Reference to unused volumes.
168
169
170
171
172 *pct delsnapshot* `<vmid> <snapname>` `[OPTIONS]`
173
174 Delete a LXC snapshot.
175
176 `<vmid>` `integer (1 - N)` ::
177
178 The (unique) ID of the VM.
179
180 `<snapname>` `string` ::
181
182 The name of the snapshot.
183
184 `-force` `boolean` ::
185
186 For removal from config file, even if removing disk snapshots fails.
187
188
189
190
191 *pct destroy* `<vmid>`
192
193 Destroy the container (also delete all uses files).
194
195 `<vmid>` `integer (1 - N)` ::
196
197 The (unique) ID of the VM.
198
199
200
201
202 *pct enter* `<vmid>`
203
204 Launch a shell for the specified container.
205
206 `<vmid>` `integer (1 - N)` ::
207
208 The (unique) ID of the VM.
209
210
211
212 *pct exec* `<vmid> [<extra-args>]`
213
214 Launch a command inside the specified container.
215
216 `<vmid>` `integer (1 - N)` ::
217
218 The (unique) ID of the VM.
219
220 `<extra-args>` `array` ::
221
222 Extra arguments as array
223
224
225
226 *pct fsck* `<vmid>` `[OPTIONS]`
227
228 Run a filesystem check (fsck) on a container volume.
229
230 `<vmid>` `integer (1 - N)` ::
231
232 The (unique) ID of the VM.
233
234 `-device` `(mp0 | mp1 | mp2 | mp3 | mp4 | mp5 | mp6 | mp7 | mp8 | mp9 | rootfs)` ::
235
236 A volume on which to run the filesystem check
237
238 `-force` `boolean` (default=`0`)::
239
240 Force checking, even if the filesystem seems clean
241
242
243
244
245 *pct help* `[<cmd>]` `[OPTIONS]`
246
247 Get help about specified command.
248
249 `<cmd>` `string` ::
250
251 Command name
252
253 `-verbose` `boolean` ::
254
255 Verbose output format.
256
257
258
259
260 *pct list*
261
262 LXC container index (per node).
263
264
265
266
267 *pct listsnapshot* `<vmid>`
268
269 List all snapshots.
270
271 `<vmid>` `integer (1 - N)` ::
272
273 The (unique) ID of the VM.
274
275
276
277
278 *pct migrate* `<vmid> <target>` `[OPTIONS]`
279
280 Migrate the container to another node. Creates a new migration task.
281
282 `<vmid>` `integer (1 - N)` ::
283
284 The (unique) ID of the VM.
285
286 `<target>` `string` ::
287
288 Target node.
289
290 `-online` `boolean` ::
291
292 Use online/live migration.
293
294
295
296 *pct resize* `<vmid> <disk> <size>` `[OPTIONS]`
297
298 Resize a container mountpoint.
299
300 `<vmid>` `integer (1 - N)` ::
301
302 The (unique) ID of the VM.
303
304 `<disk>` `(mp0 | mp1 | mp2 | mp3 | mp4 | mp5 | mp6 | mp7 | mp8 | mp9 | rootfs)` ::
305
306 The disk you want to resize.
307
308 `<size>` `\+?\d+(\.\d+)?[KMGT]?` ::
309
310 The new size. With the '+' sign the value is added to the actual size of
311 the volume and without it, the value is taken as an absolute one. Shrinking
312 disk size is not supported.
313
314 `-digest` `string` ::
315
316 Prevent changes if current configuration file has different SHA1 digest.
317 This can be used to prevent concurrent modifications.
318
319
320
321 *pct restore* `<vmid> <ostemplate>` `[OPTIONS]`
322
323 Create or restore a container.
324
325 `<vmid>` `integer (1 - N)` ::
326
327 The (unique) ID of the VM.
328
329 `<ostemplate>` `string` ::
330
331 The OS template or backup file.
332
333 `-arch` `(amd64 | i386)` (default=`amd64`)::
334
335 OS architecture type.
336
337 `-cmode` `(console | shell | tty)` (default=`tty`)::
338
339 Console mode. By default, the console command tries to open a connection to
340 one of the available tty devices. By setting cmode to 'console' it tries to
341 attach to /dev/console instead. If you set cmode to 'shell', it simply
342 invokes a shell inside the container (no login).
343
344 `-console` `boolean` (default=`1`)::
345
346 Attach a console device (/dev/console) to the container.
347
348 `-cpulimit` `number (0 - 128)` (default=`0`)::
349
350 Limit of CPU usage. Note if the computer has 2 CPUs, it has total of '2'
351 CPU time. Value '0' indicates no CPU limit.
352
353 `-cpuunits` `integer (0 - 500000)` (default=`1024`)::
354
355 CPU weight for a VM. Argument is used in the kernel fair scheduler. The
356 larger the number is, the more CPU time this VM gets. Number is relative to
357 weights of all the other running VMs.
358
359 NOTE: You can disable fair-scheduler configuration by setting this to 0.
360
361 `-description` `string` ::
362
363 Container description. Only used on the configuration web interface.
364
365 `-force` `boolean` ::
366
367 Allow to overwrite existing container.
368
369 `-hostname` `string` ::
370
371 Set a host name for the container.
372
373 `-ignore-unpack-errors` `boolean` ::
374
375 Ignore errors when extracting the template.
376
377 `-lock` `(backup | migrate | rollback | snapshot)` ::
378
379 Lock/unlock the VM.
380
381 `-memory` `integer (16 - N)` (default=`512`)::
382
383 Amount of RAM for the VM in MB.
384
385 `-mp[n]` `[volume=]<volume> [,backup=<[1|0]>] [,mp=<Path>] [,size=<DiskSize>]` ::
386
387 Use volume as container mount point (experimental feature).
388
389 `-nameserver` `string` ::
390
391 Sets DNS server IP address for a container. Create will automatically use
392 the setting from the host if you neither set searchdomain or nameserver.
393
394 `-net[n]` `name=<String> [,bridge=<vmbr<Number>>] [,firewall=<[1|0]>] [,gw=<GatewayIPv4>] [,gw6=<GatewayIPv6>] [,hwaddr=<MAC>] [,ip=<IPv4Format/CIDR>] [,ip6=<IPv6Format/CIDR>] [,mtu=<Number>] [,tag=<VlanNo>]` ::
395
396 Specifies network interfaces for the container.
397
398 `-onboot` `boolean` (default=`0`)::
399
400 Specifies whether a VM will be started during system bootup.
401
402 `-ostype` `(archlinux | centos | debian | fedora | opensuse | ubuntu)` ::
403
404 OS type. Corresponds to lxc setup scripts in
405 /usr/share/lxc/config/<ostype>.common.conf.
406
407 `-password` `string` ::
408
409 Sets root password inside container.
410
411 `-pool` `string` ::
412
413 Add the VM to the specified pool.
414
415 `-protection` `boolean` (default=`0`)::
416
417 Sets the protection flag of the container. This will prevent the remove
418 operation. This will prevent the CT or CT's disk remove/update operation.
419
420 `-rootfs` `[volume=]<volume> [,backup=<[1|0]>] [,size=<DiskSize>]` ::
421
422 Use volume as container root.
423
424 `-searchdomain` `string` ::
425
426 Sets DNS search domains for a container. Create will automatically use the
427 setting from the host if you neither set searchdomain or nameserver.
428
429 `-startup` `[[order=]\d+] [,up=\d+] [,down=\d+] ` ::
430
431 Startup and shutdown behavior. Order is a non-negative number defining the
432 general startup order. Shutdown in done with reverse ordering. Additionally
433 you can set the 'up' or 'down' delay in seconds, which specifies a delay to
434 wait before the next VM is started or stopped.
435
436 `-storage` `string` (default=`local`)::
437
438 Default Storage.
439
440 `-swap` `integer (0 - N)` (default=`512`)::
441
442 Amount of SWAP for the VM in MB.
443
444 `-template` `boolean` (default=`0`)::
445
446 Enable/disable Template.
447
448 `-tty` `integer (0 - 6)` (default=`2`)::
449
450 Specify the number of tty available to the container
451
452 `-unprivileged` `boolean` (default=`0`)::
453
454 Makes the container run as unprivileged user. (Should not be modified
455 manually.)
456
457 `-unused[n]` `string` ::
458
459 Reference to unused volumes.
460
461
462
463
464 *pct resume* `<vmid>`
465
466 Resume the container.
467
468 `<vmid>` `integer (1 - N)` ::
469
470 The (unique) ID of the VM.
471
472
473
474
475 *pct rollback* `<vmid> <snapname>`
476
477 Rollback LXC state to specified snapshot.
478
479 `<vmid>` `integer (1 - N)` ::
480
481 The (unique) ID of the VM.
482
483 `<snapname>` `string` ::
484
485 The name of the snapshot.
486
487
488
489
490 *pct set* `<vmid>` `[OPTIONS]`
491
492 Set container options.
493
494 `<vmid>` `integer (1 - N)` ::
495
496 The (unique) ID of the VM.
497
498 `-arch` `(amd64 | i386)` (default=`amd64`)::
499
500 OS architecture type.
501
502 `-cmode` `(console | shell | tty)` (default=`tty`)::
503
504 Console mode. By default, the console command tries to open a connection to
505 one of the available tty devices. By setting cmode to 'console' it tries to
506 attach to /dev/console instead. If you set cmode to 'shell', it simply
507 invokes a shell inside the container (no login).
508
509 `-console` `boolean` (default=`1`)::
510
511 Attach a console device (/dev/console) to the container.
512
513 `-cpulimit` `number (0 - 128)` (default=`0`)::
514
515 Limit of CPU usage. Note if the computer has 2 CPUs, it has total of '2'
516 CPU time. Value '0' indicates no CPU limit.
517
518 `-cpuunits` `integer (0 - 500000)` (default=`1024`)::
519
520 CPU weight for a VM. Argument is used in the kernel fair scheduler. The
521 larger the number is, the more CPU time this VM gets. Number is relative to
522 weights of all the other running VMs.
523
524 NOTE: You can disable fair-scheduler configuration by setting this to 0.
525
526 `-delete` `string` ::
527
528 A list of settings you want to delete.
529
530 `-description` `string` ::
531
532 Container description. Only used on the configuration web interface.
533
534 `-digest` `string` ::
535
536 Prevent changes if current configuration file has different SHA1 digest.
537 This can be used to prevent concurrent modifications.
538
539 `-hostname` `string` ::
540
541 Set a host name for the container.
542
543 `-lock` `(backup | migrate | rollback | snapshot)` ::
544
545 Lock/unlock the VM.
546
547 `-memory` `integer (16 - N)` (default=`512`)::
548
549 Amount of RAM for the VM in MB.
550
551 `-mp[n]` `[volume=]<volume> [,backup=<[1|0]>] [,mp=<Path>] [,size=<DiskSize>]` ::
552
553 Use volume as container mount point (experimental feature).
554
555 `-nameserver` `string` ::
556
557 Sets DNS server IP address for a container. Create will automatically use
558 the setting from the host if you neither set searchdomain or nameserver.
559
560 `-net[n]` `name=<String> [,bridge=<vmbr<Number>>] [,firewall=<[1|0]>] [,gw=<GatewayIPv4>] [,gw6=<GatewayIPv6>] [,hwaddr=<MAC>] [,ip=<IPv4Format/CIDR>] [,ip6=<IPv6Format/CIDR>] [,mtu=<Number>] [,tag=<VlanNo>]` ::
561
562 Specifies network interfaces for the container.
563
564 `-onboot` `boolean` (default=`0`)::
565
566 Specifies whether a VM will be started during system bootup.
567
568 `-ostype` `(archlinux | centos | debian | fedora | opensuse | ubuntu)` ::
569
570 OS type. Corresponds to lxc setup scripts in
571 /usr/share/lxc/config/<ostype>.common.conf.
572
573 `-protection` `boolean` (default=`0`)::
574
575 Sets the protection flag of the container. This will prevent the remove
576 operation. This will prevent the CT or CT's disk remove/update operation.
577
578 `-rootfs` `[volume=]<volume> [,backup=<[1|0]>] [,size=<DiskSize>]` ::
579
580 Use volume as container root.
581
582 `-searchdomain` `string` ::
583
584 Sets DNS search domains for a container. Create will automatically use the
585 setting from the host if you neither set searchdomain or nameserver.
586
587 `-startup` `[[order=]\d+] [,up=\d+] [,down=\d+] ` ::
588
589 Startup and shutdown behavior. Order is a non-negative number defining the
590 general startup order. Shutdown in done with reverse ordering. Additionally
591 you can set the 'up' or 'down' delay in seconds, which specifies a delay to
592 wait before the next VM is started or stopped.
593
594 `-swap` `integer (0 - N)` (default=`512`)::
595
596 Amount of SWAP for the VM in MB.
597
598 `-template` `boolean` (default=`0`)::
599
600 Enable/disable Template.
601
602 `-tty` `integer (0 - 6)` (default=`2`)::
603
604 Specify the number of tty available to the container
605
606 `-unprivileged` `boolean` (default=`0`)::
607
608 Makes the container run as unprivileged user. (Should not be modified
609 manually.)
610
611 `-unused[n]` `string` ::
612
613 Reference to unused volumes.
614
615
616
617
618 *pct shutdown* `<vmid>` `[OPTIONS]`
619
620 Shutdown the container.
621
622 `<vmid>` `integer (1 - N)` ::
623
624 The (unique) ID of the VM.
625
626 `-forceStop` `boolean` (default=`0`)::
627
628 Make sure the Container stops.
629
630 `-timeout` `integer (0 - N)` (default=`60`)::
631
632 Wait maximal timeout seconds.
633
634
635
636
637 *pct snapshot* `<vmid> <snapname>` `[OPTIONS]`
638
639 Snapshot a container.
640
641 `<vmid>` `integer (1 - N)` ::
642
643 The (unique) ID of the VM.
644
645 `<snapname>` `string` ::
646
647 The name of the snapshot.
648
649 `-description` `string` ::
650
651 A textual description or comment.
652
653
654
655
656 *pct start* `<vmid>`
657
658 Start the container.
659
660 `<vmid>` `integer (1 - N)` ::
661
662 The (unique) ID of the VM.
663
664
665
666 *pct stop* `<vmid>`
667
668 Stop the container.
669
670 `<vmid>` `integer (1 - N)` ::
671
672 The (unique) ID of the VM.
673
674
675
676 *pct suspend* `<vmid>`
677
678 Suspend the container.
679
680 `<vmid>` `integer (1 - N)` ::
681
682 The (unique) ID of the VM.
683
684
685
686
687 *pct template* `<vmid>`
688
689 Create a Template.
690
691 `<vmid>` `integer (1 - N)` ::
692
693 The (unique) ID of the VM.
694
695
696
697
698 *pct unlock* `<vmid>`
699
700 Unlock the VM.
701
702 `<vmid>` `integer (1 - N)` ::
703
704 The (unique) ID of the VM.
705
706
707
708