From 0892a2c2795fac6da38170ed14403dc1b19a7591 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Fri, 14 Feb 2020 17:26:27 +0100 Subject: [PATCH] pct: move "guest OS config" below CT settings Signed-off-by: Thomas Lamprecht --- pct.adoc | 132 +++++++++++++++++++++++++++---------------------------- 1 file changed, 66 insertions(+), 66 deletions(-) diff --git a/pct.adoc b/pct.adoc index be3ccf4..27db7a6 100644 --- a/pct.adoc +++ b/pct.adoc @@ -106,72 +106,6 @@ To trace AppArmor activity, use: # dmesg | grep apparmor ---- -Guest Operating System Configuration ------------------------------------- - -{pve} tries to detect the Linux distribution in the container, and modifies -some files. Here is a short list of things done at container startup: - -set /etc/hostname:: to set the container name - -modify /etc/hosts:: to allow lookup of the local hostname - -network setup:: pass the complete network setup to the container - -configure DNS:: pass information about DNS servers - -adapt the init system:: for example, fix the number of spawned getty processes - -set the root password:: when creating a new container - -rewrite ssh_host_keys:: so that each container has unique keys - -randomize crontab:: so that cron does not start at the same time on all containers - -Changes made by {PVE} are enclosed by comment markers: - ----- -# --- BEGIN PVE --- - -# --- END PVE --- ----- - -Those markers will be inserted at a reasonable location in the file. If such a -section already exists, it will be updated in place and will not be moved. - -Modification of a file can be prevented by adding a `.pve-ignore.` file for it. -For instance, if the file `/etc/.pve-ignore.hosts` exists then the `/etc/hosts` -file will not be touched. This can be a simple empty file created via: - ----- -# touch /etc/.pve-ignore.hosts ----- - -Most modifications are OS dependent, so they differ between different -distributions and versions. You can completely disable modifications by -manually setting the `ostype` to `unmanaged`. - -OS type detection is done by testing for certain files inside the -container: - -Ubuntu:: inspect /etc/lsb-release (`DISTRIB_ID=Ubuntu`) - -Debian:: test /etc/debian_version - -Fedora:: test /etc/fedora-release - -RedHat or CentOS:: test /etc/redhat-release - -ArchLinux:: test /etc/arch-release - -Alpine:: test /etc/alpine-release - -Gentoo:: test /etc/gentoo-release - -NOTE: Container start fails if the configured `ostype` differs from the auto -detected type. - - [[pct_container_images]] Container Images ---------------- @@ -642,6 +576,72 @@ It will be called during various phases of the guests lifetime. For an example and documentation see the example script under `/usr/share/pve-docs/examples/guest-example-hookscript.pl`. +Guest Operating System Configuration +------------------------------------ + +{pve} tries to detect the Linux distribution in the container, and modifies +some files. Here is a short list of things done at container startup: + +set /etc/hostname:: to set the container name + +modify /etc/hosts:: to allow lookup of the local hostname + +network setup:: pass the complete network setup to the container + +configure DNS:: pass information about DNS servers + +adapt the init system:: for example, fix the number of spawned getty processes + +set the root password:: when creating a new container + +rewrite ssh_host_keys:: so that each container has unique keys + +randomize crontab:: so that cron does not start at the same time on all containers + +Changes made by {PVE} are enclosed by comment markers: + +---- +# --- BEGIN PVE --- + +# --- END PVE --- +---- + +Those markers will be inserted at a reasonable location in the file. If such a +section already exists, it will be updated in place and will not be moved. + +Modification of a file can be prevented by adding a `.pve-ignore.` file for it. +For instance, if the file `/etc/.pve-ignore.hosts` exists then the `/etc/hosts` +file will not be touched. This can be a simple empty file created via: + +---- +# touch /etc/.pve-ignore.hosts +---- + +Most modifications are OS dependent, so they differ between different +distributions and versions. You can completely disable modifications by +manually setting the `ostype` to `unmanaged`. + +OS type detection is done by testing for certain files inside the +container: + +Ubuntu:: inspect /etc/lsb-release (`DISTRIB_ID=Ubuntu`) + +Debian:: test /etc/debian_version + +Fedora:: test /etc/fedora-release + +RedHat or CentOS:: test /etc/redhat-release + +ArchLinux:: test /etc/arch-release + +Alpine:: test /etc/alpine-release + +Gentoo:: test /etc/gentoo-release + +NOTE: Container start fails if the configured `ostype` differs from the auto +detected type. + + Backup and Restore ------------------ -- 2.39.2