]> git.proxmox.com Git - pve-docs.git/blame - pct.adoc
qm.adoc: improve Locks section
[pve-docs.git] / pct.adoc
CommitLineData
80c0adcb 1[[chapter_pct]]
0c6b782f 2ifdef::manvolnum[]
b2f242ab 3pct(1)
7e2fdb3d 4======
38fd0958 5include::attributes.txt[]
5f09af76
DM
6:pve-toplevel:
7
0c6b782f
DM
8NAME
9----
10
11pct - Tool to manage Linux Containers (LXC) on Proxmox VE
12
13
49a5e11c 14SYNOPSIS
0c6b782f
DM
15--------
16
17include::pct.1-synopsis.adoc[]
18
19DESCRIPTION
20-----------
21endif::manvolnum[]
22
23ifndef::manvolnum[]
24Proxmox Container Toolkit
25=========================
38fd0958 26include::attributes.txt[]
194d2f29 27:pve-toplevel:
0c6b782f 28endif::manvolnum[]
5f09af76 29ifdef::wiki[]
cb84ed18 30:title: Linux Container
5f09af76 31endif::wiki[]
4a2ae9ed
DM
32
33Containers are a lightweight alternative to fully virtualized
34VMs. Instead of emulating a complete Operating System (OS), containers
35simply use the OS of the host they run on. This implies that all
36containers use the same kernel, and that they can access resources
37from the host directly.
38
39This is great because containers do not waste CPU power nor memory due
40to kernel emulation. Container run-time costs are close to zero and
41usually negligible. But there are also some drawbacks you need to
42consider:
43
44* You can only run Linux based OS inside containers, i.e. it is not
a8e99754 45 possible to run FreeBSD or MS Windows inside.
4a2ae9ed 46
a8e99754 47* For security reasons, access to host resources needs to be
4a2ae9ed 48 restricted. This is done with AppArmor, SecComp filters and other
a8e99754 49 kernel features. Be prepared that some syscalls are not allowed
4a2ae9ed
DM
50 inside containers.
51
52{pve} uses https://linuxcontainers.org/[LXC] as underlying container
53technology. We consider LXC as low-level library, which provides
a8e99754 54countless options. It would be too difficult to use those tools
4a2ae9ed
DM
55directly. Instead, we provide a small wrapper called `pct`, the
56"Proxmox Container Toolkit".
57
a8e99754 58The toolkit is tightly coupled with {pve}. That means that it is aware
4a2ae9ed
DM
59of the cluster setup, and it can use the same network and storage
60resources as fully virtualized VMs. You can even use the {pve}
61firewall, or manage containers using the HA framework.
62
63Our primary goal is to offer an environment as one would get from a
64VM, but without the additional overhead. We call this "System
65Containers".
66
99d2e25b 67NOTE: If you want to run micro-containers (with docker, rkt, ...), it
70a42028 68is best to run them inside a VM.
4a2ae9ed
DM
69
70
71Security Considerations
72-----------------------
73
74Containers use the same kernel as the host, so there is a big attack
75surface for malicious users. You should consider this fact if you
76provide containers to totally untrusted people. In general, fully
a8e99754 77virtualized VMs provide better isolation.
4a2ae9ed
DM
78
79The good news is that LXC uses many kernel security features like
80AppArmor, CGroups and PID and user namespaces, which makes containers
81usage quite secure. We distinguish two types of containers:
82
5eba0743
FG
83
84Privileged Containers
4a2ae9ed
DM
85~~~~~~~~~~~~~~~~~~~~~
86
87Security is done by dropping capabilities, using mandatory access
88control (AppArmor), SecComp filters and namespaces. The LXC team
89considers this kind of container as unsafe, and they will not consider
90new container escape exploits to be security issues worthy of a CVE
91and quick fix. So you should use this kind of containers only inside a
92trusted environment, or when no untrusted task is running as root in
93the container.
94
5eba0743
FG
95
96Unprivileged Containers
4a2ae9ed
DM
97~~~~~~~~~~~~~~~~~~~~~~~
98
a8e99754 99This kind of containers use a new kernel feature called user
5eba0743 100namespaces. The root UID 0 inside the container is mapped to an
4a2ae9ed
DM
101unprivileged user outside the container. This means that most security
102issues (container escape, resource abuse, ...) in those containers
103will affect a random unprivileged user, and so would be a generic
a8e99754 104kernel security bug rather than an LXC issue. The LXC team thinks
4a2ae9ed
DM
105unprivileged containers are safe by design.
106
3bd9d0cf 107
80c0adcb 108[[pct_configuration]]
7fc230db
DM
109Configuration
110-------------
111
8c1189b6
FG
112The `/etc/pve/lxc/<CTID>.conf` file stores container configuration,
113where `<CTID>` is the numeric ID of the given container. Like all
114other files stored inside `/etc/pve/`, they get automatically
166e63d6
FG
115replicated to all other cluster nodes.
116
117NOTE: CTIDs < 100 are reserved for internal purposes, and CTIDs need to be
118unique cluster wide.
7fc230db 119
105bc8f1
DM
120.Example Container Configuration
121----
122ostype: debian
123arch: amd64
124hostname: www
125memory: 512
126swap: 512
127net0: bridge=vmbr0,hwaddr=66:64:66:64:64:36,ip=dhcp,name=eth0,type=veth
128rootfs: local:107/vm-107-disk-1.raw,size=7G
129----
130
7fc230db 131Those configuration files are simple text files, and you can edit them
8c1189b6 132using a normal text editor (`vi`, `nano`, ...). This is sometimes
55fb2a21
DM
133useful to do small corrections, but keep in mind that you need to
134restart the container to apply such changes.
135
8c1189b6 136For that reason, it is usually better to use the `pct` command to
55fb2a21
DM
137generate and modify those files, or do the whole thing using the GUI.
138Our toolkit is smart enough to instantaneously apply most changes to
105bc8f1
DM
139running containers. This feature is called "hot plug", and there is no
140need to restart the container in that case.
7fc230db 141
5eba0743 142
7fc230db
DM
143File Format
144~~~~~~~~~~~
145
146Container configuration files use a simple colon separated key/value
147format. Each line has the following format:
148
083adc34
FG
149-----
150# this is a comment
151OPTION: value
152-----
7fc230db 153
8c1189b6 154Blank lines in those files are ignored, and lines starting with a `#`
7fc230db
DM
155character are treated as comments and are also ignored.
156
157It is possible to add low-level, LXC style configuration directly, for
158example:
159
160 lxc.init_cmd: /sbin/my_own_init
161
162or
163
164 lxc.init_cmd = /sbin/my_own_init
165
166Those settings are directly passed to the LXC low-level tools.
167
5eba0743 168
80c0adcb 169[[pct_snapshots]]
105bc8f1
DM
170Snapshots
171~~~~~~~~~
172
8c1189b6 173When you create a snapshot, `pct` stores the configuration at snapshot
105bc8f1 174time into a separate snapshot section within the same configuration
8c1189b6 175file. For example, after creating a snapshot called ``testsnapshot'',
105bc8f1
DM
176your configuration file will look like this:
177
5eba0743 178.Container configuration with snapshot
105bc8f1
DM
179----
180memory: 512
181swap: 512
182parent: testsnaphot
183...
184
185[testsnaphot]
186memory: 512
187swap: 512
188snaptime: 1457170803
189...
190----
191
8c1189b6
FG
192There are a few snapshot related properties like `parent` and
193`snaptime`. The `parent` property is used to store the parent/child
194relationship between snapshots. `snaptime` is the snapshot creation
195time stamp (Unix epoch).
196
7fc230db 197
3f13c1c3
DM
198Guest Operating System Configuration
199~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
200
201We normally try to detect the operating system type inside the
202container, and then modify some files inside the container to make
203them work as expected. Here is a short list of things we do at
204container startup:
205
206set /etc/hostname:: to set the container name
207
a8e99754 208modify /etc/hosts:: to allow lookup of the local hostname
3f13c1c3
DM
209
210network setup:: pass the complete network setup to the container
211
212configure DNS:: pass information about DNS servers
213
a8e99754 214adapt the init system:: for example, fix the number of spawned getty processes
3f13c1c3
DM
215
216set the root password:: when creating a new container
217
218rewrite ssh_host_keys:: so that each container has unique keys
219
a8e99754 220randomize crontab:: so that cron does not start at the same time on all containers
3f13c1c3 221
25535d34
WB
222Changes made by {PVE} are enclosed by comment markers:
223
37638f59
DM
224----
225# --- BEGIN PVE ---
226<data>
227# --- END PVE ---
228----
25535d34 229
37638f59
DM
230Those markers will be inserted at a reasonable location in the
231file. If such a section already exists, it will be updated in place
232and will not be moved.
25535d34 233
37638f59
DM
234Modification of a file can be prevented by adding a `.pve-ignore.`
235file for it. For instance, if the file `/etc/.pve-ignore.hosts`
236exists then the `/etc/hosts` file will not be touched. This can be a
237simple empty file creatd via:
25535d34
WB
238
239 # touch /etc/.pve-ignore.hosts
240
37638f59
DM
241Most modifications are OS dependent, so they differ between different
242distributions and versions. You can completely disable modifications
8c1189b6 243by manually setting the `ostype` to `unmanaged`.
3f13c1c3
DM
244
245OS type detection is done by testing for certain files inside the
246container:
247
8c1189b6 248Ubuntu:: inspect /etc/lsb-release (`DISTRIB_ID=Ubuntu`)
3f13c1c3
DM
249
250Debian:: test /etc/debian_version
251
252Fedora:: test /etc/fedora-release
253
254RedHat or CentOS:: test /etc/redhat-release
255
256ArchLinux:: test /etc/arch-release
257
258Alpine:: test /etc/alpine-release
259
c617d721
WB
260Gentoo:: test /etc/gentoo-release
261
8c1189b6 262NOTE: Container start fails if the configured `ostype` differs from the auto
3f13c1c3
DM
263detected type.
264
5eba0743 265
80c0adcb 266[[pct_options]]
a7f36905
DM
267Options
268~~~~~~~
269
270include::pct.conf.5-opts.adoc[]
271
d61bab51 272
80c0adcb 273[[pct_container_images]]
d61bab51
DM
274Container Images
275----------------
276
8c1189b6
FG
277Container images, sometimes also referred to as ``templates'' or
278``appliances'', are `tar` archives which contain everything to run a
d61bab51 279container. You can think of it as a tidy container backup. Like most
8c1189b6 280modern container toolkits, `pct` uses those images when you create a
d61bab51
DM
281new container, for example:
282
283 pct create 999 local:vztmpl/debian-8.0-standard_8.0-1_amd64.tar.gz
284
26ca7ff5 285{pve} itself ships a set of basic templates for most common
8c1189b6 286operating systems, and you can download them using the `pveam` (short
d61bab51
DM
287for {pve} Appliance Manager) command line utility. You can also
288download https://www.turnkeylinux.org/[TurnKey Linux] containers using
289that tool (or the graphical user interface).
290
3a6fa247
DM
291Our image repositories contain a list of available images, and there
292is a cron job run each day to download that list. You can trigger that
293update manually with:
294
295 pveam update
296
297After that you can view the list of available images using:
298
299 pveam available
300
8c1189b6
FG
301You can restrict this large list by specifying the `section` you are
302interested in, for example basic `system` images:
3a6fa247
DM
303
304.List available system images
305----
306# pveam available --section system
307system archlinux-base_2015-24-29-1_x86_64.tar.gz
308system centos-7-default_20160205_amd64.tar.xz
309system debian-6.0-standard_6.0-7_amd64.tar.gz
310system debian-7.0-standard_7.0-3_amd64.tar.gz
311system debian-8.0-standard_8.0-1_amd64.tar.gz
312system ubuntu-12.04-standard_12.04-1_amd64.tar.gz
313system ubuntu-14.04-standard_14.04-1_amd64.tar.gz
314system ubuntu-15.04-standard_15.04-1_amd64.tar.gz
315system ubuntu-15.10-standard_15.10-1_amd64.tar.gz
316----
317
a8e99754 318Before you can use such a template, you need to download them into one
8c1189b6 319of your storages. You can simply use storage `local` for that
3a6fa247
DM
320purpose. For clustered installations, it is preferred to use a shared
321storage so that all nodes can access those images.
322
323 pveam download local debian-8.0-standard_8.0-1_amd64.tar.gz
324
24f73a63 325You are now ready to create containers using that image, and you can
8c1189b6 326list all downloaded images on storage `local` with:
24f73a63
DM
327
328----
329# pveam list local
330local:vztmpl/debian-8.0-standard_8.0-1_amd64.tar.gz 190.20MB
331----
332
a8e99754 333The above command shows you the full {pve} volume identifiers. They include
24f73a63 334the storage name, and most other {pve} commands can use them. For
5eba0743 335example you can delete that image later with:
24f73a63
DM
336
337 pveam remove local:vztmpl/debian-8.0-standard_8.0-1_amd64.tar.gz
3a6fa247 338
d61bab51 339
80c0adcb 340[[pct_container_storage]]
70a42028
DM
341Container Storage
342-----------------
343
344Traditional containers use a very simple storage model, only allowing
345a single mount point, the root file system. This was further
8c1189b6
FG
346restricted to specific file system types like `ext4` and `nfs`.
347Additional mounts are often done by user provided scripts. This turned
a8e99754 348out to be complex and error prone, so we try to avoid that now.
70a42028
DM
349
350Our new LXC based container model is more flexible regarding
351storage. First, you can have more than a single mount point. This
352allows you to choose a suitable storage for each application. For
353example, you can use a relatively slow (and thus cheap) storage for
354the container root file system. Then you can use a second mount point
355to mount a very fast, distributed storage for your database
356application.
357
358The second big improvement is that you can use any storage type
359supported by the {pve} storage library. That means that you can store
8c1189b6
FG
360your containers on local `lvmthin` or `zfs`, shared `iSCSI` storage,
361or even on distributed storage systems like `ceph`. It also enables us
362to use advanced storage features like snapshots and clones. `vzdump`
a8e99754 363can also use the snapshot feature to provide consistent container
70a42028
DM
364backups.
365
366Last but not least, you can also mount local devices directly, or
367mount local directories using bind mounts. That way you can access
368local storage inside containers with zero overhead. Such bind mounts
a8e99754 369also provide an easy way to share data between different containers.
70a42028 370
eeecce95 371
9e44e493
DM
372Mount Points
373~~~~~~~~~~~~
eeecce95 374
01639994
FG
375The root mount point is configured with the `rootfs` property, and you can
376configure up to 10 additional mount points. The corresponding options
377are called `mp0` to `mp9`, and they can contain the following setting:
378
379include::pct-mountpoint-opts.adoc[]
380
9e44e493
DM
381Currently there are basically three types of mount points: storage backed
382mount points, bind mounts and device mounts.
383
5eba0743 384.Typical container `rootfs` configuration
4c3b5c77
DM
385----
386rootfs: thin1:base-100-disk-1,size=8G
387----
388
389
5eba0743 390Storage Backed Mount Points
4c3b5c77 391^^^^^^^^^^^^^^^^^^^^^^^^^^^
01639994 392
9e44e493 393Storage backed mount points are managed by the {pve} storage subsystem and come
eeecce95
WB
394in three different flavors:
395
5eba0743 396- Image based: these are raw images containing a single ext4 formatted file
eeecce95 397 system.
5eba0743 398- ZFS subvolumes: these are technically bind mounts, but with managed storage,
eeecce95
WB
399 and thus allow resizing and snapshotting.
400- Directories: passing `size=0` triggers a special case where instead of a raw
401 image a directory is created.
402
4c3b5c77 403
5eba0743 404Bind Mount Points
4c3b5c77 405^^^^^^^^^^^^^^^^^
01639994 406
9baca183
FG
407Bind mounts allow you to access arbitrary directories from your Proxmox VE host
408inside a container. Some potential use cases are:
409
410- Accessing your home directory in the guest
411- Accessing an USB device directory in the guest
acccc49b 412- Accessing an NFS mount from the host in the guest
9baca183 413
eeecce95 414Bind mounts are considered to not be managed by the storage subsystem, so you
9baca183 415cannot make snapshots or deal with quotas from inside the container. With
eeecce95 416unprivileged containers you might run into permission problems caused by the
9baca183
FG
417user mapping and cannot use ACLs.
418
8c1189b6 419NOTE: The contents of bind mount points are not backed up when using `vzdump`.
eeecce95 420
6b707f2c
FG
421WARNING: For security reasons, bind mounts should only be established
422using source directories especially reserved for this purpose, e.g., a
423directory hierarchy under `/mnt/bindmounts`. Never bind mount system
424directories like `/`, `/var` or `/etc` into a container - this poses a
9baca183
FG
425great security risk.
426
427NOTE: The bind mount source path must not contain any symlinks.
428
429For example, to make the directory `/mnt/bindmounts/shared` accessible in the
430container with ID `100` under the path `/shared`, use a configuration line like
8c1189b6
FG
431`mp0: /mnt/bindmounts/shared,mp=/shared` in `/etc/pve/lxc/100.conf`.
432Alternatively, use `pct set 100 -mp0 /mnt/bindmounts/shared,mp=/shared` to
9baca183 433achieve the same result.
6b707f2c 434
4c3b5c77 435
5eba0743 436Device Mount Points
4c3b5c77 437^^^^^^^^^^^^^^^^^^^
fe154a4f 438
7432d78e
FG
439Device mount points allow to mount block devices of the host directly into the
440container. Similar to bind mounts, device mounts are not managed by {PVE}'s
441storage subsystem, but the `quota` and `acl` options will be honored.
442
443NOTE: Device mount points should only be used under special circumstances. In
444most cases a storage backed mount point offers the same performance and a lot
445more features.
446
8c1189b6 447NOTE: The contents of device mount points are not backed up when using `vzdump`.
01639994 448
4c3b5c77 449
5eba0743 450FUSE Mounts
4c3b5c77 451~~~~~~~~~~~
01639994
FG
452
453WARNING: Because of existing issues in the Linux kernel's freezer
454subsystem the usage of FUSE mounts inside a container is strongly
455advised against, as containers need to be frozen for suspend or
456snapshot mode backups.
fe154a4f 457
01639994
FG
458If FUSE mounts cannot be replaced by other mounting mechanisms or storage
459technologies, it is possible to establish the FUSE mount on the Proxmox host
460and use a bind mount point to make it accessible inside the container.
461
01639994 462
5eba0743 463Using Quotas Inside Containers
04c569f6 464~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
d6ed3622 465
9e44e493
DM
466Quotas allow to set limits inside a container for the amount of disk
467space that each user can use. This only works on ext4 image based
468storage types and currently does not work with unprivileged
469containers.
d6ed3622 470
9e44e493
DM
471Activating the `quota` option causes the following mount options to be
472used for a mount point:
473`usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0`
d6ed3622 474
9e44e493
DM
475This allows quotas to be used like you would on any other system. You
476can initialize the `/aquota.user` and `/aquota.group` files by running
d6ed3622 477
9e44e493
DM
478----
479quotacheck -cmug /
480quotaon /
481----
d6ed3622 482
166e63d6
FG
483and edit the quotas via the `edquota` command. Refer to the documentation
484of the distribution running inside the container for details.
485
9e44e493
DM
486NOTE: You need to run the above commands for every mount point by passing
487the mount point's path instead of just `/`.
488
d6ed3622 489
5eba0743 490Using ACLs Inside Containers
04c569f6 491~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6c60aebf 492
5eba0743 493The standard Posix **A**ccess **C**ontrol **L**ists are also available inside containers.
6c60aebf
EK
494ACLs allow you to set more detailed file ownership than the traditional user/
495group/others model.
d6ed3622 496
04c569f6 497
80c0adcb 498[[pct_container_network]]
04c569f6
DM
499Container Network
500-----------------
501
bac8c385 502You can configure up to 10 network interfaces for a single
8c1189b6 503container. The corresponding options are called `net0` to `net9`, and
bac8c385
DM
504they can contain the following setting:
505
506include::pct-network-opts.adoc[]
04c569f6
DM
507
508
51e33128
FG
509Backup and Restore
510------------------
511
5eba0743 512
2175e37b
FG
513Container Backup
514~~~~~~~~~~~~~~~~
515
8c1189b6
FG
516It is possible to use the `vzdump` tool for container backup. Please
517refer to the `vzdump` manual page for details.
518
51e33128 519
2175e37b
FG
520Restoring Container Backups
521~~~~~~~~~~~~~~~~~~~~~~~~~~~
522
8c1189b6
FG
523Restoring container backups made with `vzdump` is possible using the
524`pct restore` command. By default, `pct restore` will attempt to restore as much
2175e37b
FG
525of the backed up container configuration as possible. It is possible to override
526the backed up configuration by manually setting container options on the command
8c1189b6 527line (see the `pct` manual page for details).
2175e37b 528
8c1189b6 529NOTE: `pvesm extractconfig` can be used to view the backed up configuration
2175e37b
FG
530contained in a vzdump archive.
531
532There are two basic restore modes, only differing by their handling of mount
533points:
534
4c3b5c77 535
8c1189b6
FG
536``Simple'' Restore Mode
537^^^^^^^^^^^^^^^^^^^^^^^
2175e37b
FG
538
539If neither the `rootfs` parameter nor any of the optional `mpX` parameters
540are explicitly set, the mount point configuration from the backed up
541configuration file is restored using the following steps:
542
543. Extract mount points and their options from backup
544. Create volumes for storage backed mount points (on storage provided with the
545`storage` parameter, or default local storage if unset)
546. Extract files from backup archive
547. Add bind and device mount points to restored configuration (limited to root user)
548
549NOTE: Since bind and device mount points are never backed up, no files are
550restored in the last step, but only the configuration options. The assumption
551is that such mount points are either backed up with another mechanism (e.g.,
552NFS space that is bind mounted into many containers), or not intended to be
553backed up at all.
554
555This simple mode is also used by the container restore operations in the web
556interface.
557
4c3b5c77 558
8c1189b6
FG
559``Advanced'' Restore Mode
560^^^^^^^^^^^^^^^^^^^^^^^^^
2175e37b
FG
561
562By setting the `rootfs` parameter (and optionally, any combination of `mpX`
8c1189b6 563parameters), the `pct restore` command is automatically switched into an
2175e37b
FG
564advanced mode. This advanced mode completely ignores the `rootfs` and `mpX`
565configuration options contained in the backup archive, and instead only
566uses the options explicitly provided as parameters.
567
568This mode allows flexible configuration of mount point settings at restore time,
569for example:
570
571* Set target storages, volume sizes and other options for each mount point
572individually
573* Redistribute backed up files according to new mount point scheme
574* Restore to device and/or bind mount points (limited to root user)
575
51e33128 576
8c1189b6 577Managing Containers with `pct`
04c569f6
DM
578------------------------------
579
8c1189b6 580`pct` is the tool to manage Linux Containers on {pve}. You can create
04c569f6
DM
581and destroy containers, and control execution (start, stop, migrate,
582...). You can use pct to set parameters in the associated config file,
583like network configuration or memory limits.
584
5eba0743 585
04c569f6
DM
586CLI Usage Examples
587~~~~~~~~~~~~~~~~~~
588
589Create a container based on a Debian template (provided you have
5eba0743 590already downloaded the template via the web interface)
04c569f6
DM
591
592 pct create 100 /var/lib/vz/template/cache/debian-8.0-standard_8.0-1_amd64.tar.gz
593
594Start container 100
595
596 pct start 100
597
598Start a login session via getty
599
600 pct console 100
601
602Enter the LXC namespace and run a shell as root user
603
604 pct enter 100
605
606Display the configuration
607
608 pct config 100
609
8c1189b6 610Add a network interface called `eth0`, bridged to the host bridge `vmbr0`,
04c569f6
DM
611set the address and gateway, while it's running
612
613 pct set 100 -net0 name=eth0,bridge=vmbr0,ip=192.168.15.147/24,gw=192.168.15.1
614
615Reduce the memory of the container to 512MB
616
0585f29a
DM
617 pct set 100 -memory 512
618
04c569f6 619
fe57a420
FG
620Obtaining Debugging Logs
621~~~~~~~~~~~~~~~~~~~~~~~~
622
623In case `pct start` is unable to start a specific container, it might be
624helpful to collect debugging output by running `lxc-start` (replace `ID` with
625the container's ID):
626
627 lxc-start -n ID -F -l DEBUG -o /tmp/lxc-ID.log
628
629This command will attempt to start the container in foreground mode, to stop the container run `pct shutdown ID` or `pct stop ID` in a second terminal.
630
631The collected debug log is written to `/tmp/lxc-ID.log`.
632
633NOTE: If you have changed the container's configuration since the last start
634attempt with `pct start`, you need to run `pct start` at least once to also
635update the configuration used by `lxc-start`.
636
637
0c6b782f
DM
638Container Advantages
639--------------------
640
8c1189b6 641* Simple, and fully integrated into {pve}. Setup looks similar to a normal
0c6b782f
DM
642 VM setup.
643
8c1189b6 644** Storage (ZFS, LVM, NFS, Ceph, ...)
0c6b782f 645
8c1189b6 646** Network
0c6b782f 647
8c1189b6 648** Authentication
0c6b782f 649
8c1189b6 650** Cluster
0c6b782f 651
8c1189b6 652* Fast: minimal overhead, as fast as bare metal
0c6b782f 653
8c1189b6 654* High density (perfect for idle workloads)
0c6b782f 655
8c1189b6 656* REST API
0c6b782f 657
8c1189b6 658* Direct hardware access
0c6b782f
DM
659
660
661Technology Overview
662-------------------
663
80b5819d 664* Integrated into {pve} graphical user interface (GUI)
0c6b782f 665
80b5819d 666* LXC (https://linuxcontainers.org/)
0c6b782f 667
80b5819d 668* lxcfs to provide containerized /proc file system
0c6b782f 669
80b5819d 670* AppArmor
0c6b782f 671
80b5819d 672* CRIU: for live migration (planned)
0c6b782f 673
80b5819d 674* We use latest available kernels (4.4.X)
0c6b782f 675
80b5819d 676* Image based deployment (templates)
0c6b782f 677
80b5819d 678* Container setup from host (network, DNS, storage, ...)
0c6b782f
DM
679
680
681ifdef::manvolnum[]
3bd9d0cf
DM
682
683Files
684------
685
686`/etc/pve/lxc/<CTID>.conf`::
687
688Configuration file for the container '<CTID>'.
689
690
0c6b782f
DM
691include::pve-copyright.adoc[]
692endif::manvolnum[]
693
694
695
696
697
698
699