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