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