Editing Installation on Debian 9
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | This | + | This document briefly describes the steps needed to install OpenVZ 6 (legacy) on your Debian 9 "Stretch" machine. |
− | + | {{Out|Current commercial version of OpenVZ ([[Virtuozzo]] 7) is not installable on Debian GNU/Linux because is developed as an independent GNU/Linux distribution}} | |
− | {{Out|Current commercial version of OpenVZ ([[Virtuozzo]] 7) is not installable on | ||
− | = | + | == Requirements == |
− | + | Debian GNU/Linux without "64bit" feature at Ext4 filesystem. | |
− | == | + | == Filesystem and defaults == |
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | Debian 9 installer formats Ext4 with new features (64bit metadata_csum) and this is incompatible with OpenVZ6 kernel (initrd cannot mount root). Then it's necessary to boot without requiring the mount of this advanced format. Options: | |
− | + | * Root volume (/) as Ext3 and /var/lib/vz separated in an Ext4 | |
− | + | * Install Debian 8 (will format without "64bit") and upgrade to Debian 9 | |
− | + | * Install Debian 9 to a previously formatted Ext4 without "64bit". | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | * | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | == | + | == Partitions and /vz file system == |
− | |||
− | + | It is recommended to use a separate partition for containers (by default '''/var/lib/vz''') and format it to '''ext4'''. | |
− | + | == Change Systemd to SystemV == | |
− | |||
− | + | {{Note|Warning! This operation can make some software to stop working, such as desktop environments.}} | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | {{Note|Warning! This operation can make some | ||
sudo apt install sysvinit-core sysvinit-utils | sudo apt install sysvinit-core sysvinit-utils | ||
Line 74: | Line 26: | ||
sudo reboot | sudo reboot | ||
sudo apt --auto-remove remove systemd | sudo apt --auto-remove remove systemd | ||
− | echo -e 'Package: *systemd*\nPin: release *\nPin-Priority: -1\n' | sudo tee /etc/apt/preferences.d/ | + | echo -e 'Package: *systemd*\nPin: release *\nPin-Priority: -1\n' | sudo tee /etc/apt/preferences.d/systemd |
− | * | + | * Other recipes at [http://without-systemd.org/wiki/index.php/Debian_Stretch without-systemd.org] |
− | = | + | == Register OVZ updated repository == |
RepoFile=/etc/apt/sources.list.d/openvz.list | RepoFile=/etc/apt/sources.list.d/openvz.list | ||
Line 99: | Line 51: | ||
{{Note|For more info about Debian repositories, see http://download.openvz.org/debian.}} | {{Note|For more info about Debian repositories, see http://download.openvz.org/debian.}} | ||
− | = | + | == Install packages == |
KPackage="linux-image-openvz-$(dpkg --print-architecture)" | KPackage="linux-image-openvz-$(dpkg --print-architecture)" | ||
− | sudo apt --allow-unauthenticated --install-recommends install $KPackage vzdump ploop initramfs-tools | + | sudo apt --allow-unauthenticated --install-recommends install $KPackage vzdump ploop initramfs-tools |
if [ ! -d /vz ] ; then sudo ln -s /var/lib/vz/ /vz ; fi | if [ ! -d /vz ] ; then sudo ln -s /var/lib/vz/ /vz ; fi | ||
Line 110: | Line 62: | ||
VE_STOP_MODE=stop | VE_STOP_MODE=stop | ||
− | = | + | == Reboot into OpenVZ kernel == |
− | + | sudo reboot | |
− | + | {{Note|If you don't see a boot manager entry with word "'''openvz'''", you must choose "'''Advanced options'''" to select there first ''openvz'' listed kernel.}} | |
− | Check the OpenVZ processes are running: | + | Check that the OpenVZ processes are running: |
sudo ps ax | grep -v 'grep' | grep 'vzmond' | sudo ps ax | grep -v 'grep' | grep 'vzmond' | ||
== Set OpenVZ as default to boot == | == Set OpenVZ as default to boot == | ||
− | Because of GRUB2 default criteria, default kernel to boot can still be the one from Debian's repository (non OVZ). | + | Because of GRUB2 default criteria, default kernel to boot can still be the one from Debian's repository (non OVZ). If you want to change this behaviour, once you've booted fine into OpenVZ kernel, you can remove other unuseful kernels: |
Packages="$(apt list --installed 'linux-image-*' 2>/dev/null | grep -e '^linux-image-' | grep -ve 'openvz' | cut -f 1 -d '/')" | Packages="$(apt list --installed 'linux-image-*' 2>/dev/null | grep -e '^linux-image-' | grep -ve 'openvz' | cut -f 1 -d '/')" | ||
sudo apt --autoremove remove $Packages | sudo apt --autoremove remove $Packages | ||
− | = Download OS templates = | + | == Download OS templates == |
This step is optional, vzctl is able to download templates on demand. | This step is optional, vzctl is able to download templates on demand. | ||
− | An OS template is a | + | An OS template is a Linux distribution installed into a container |
and then packed into a gzipped tarball. Using such a cache, a new container | and then packed into a gzipped tarball. Using such a cache, a new container | ||
can be created in a minute. | can be created in a minute. | ||
Line 142: | Line 94: | ||
sudo vztmpl-dl --gpg-check debian-8.0-x86_64-minimal | sudo vztmpl-dl --gpg-check debian-8.0-x86_64-minimal | ||
− | + | Alternatively, you can also download precreated template caches from [http://openvz.org/download/template/cache Downloads » Templates » Precreated], or from one of the [https://mirrors.openvz.org/ mirrors]. Put those tarballs '''as-is (no unpacking needed)''' to the <tt>/vz/template/cache/</tt> directory. | |
− | |||
− | |||
− | = Next steps = | + | == Next steps == |
OpenVZ is now set up on your machine. Follow on to [[basic operations in OpenVZ environment]] document. | OpenVZ is now set up on your machine. Follow on to [[basic operations in OpenVZ environment]] document. | ||
− | = See also = | + | == See also == |
− | * [[Installation on Debian 8]] | + | * [[Installation on Debian 8]] oldstable |
[[Category: Installation]] | [[Category: Installation]] | ||
[[Category: HOWTO]] | [[Category: HOWTO]] | ||
[[Category: Debian]] | [[Category: Debian]] |