Open main menu

OpenVZ Virtuozzo Containers Wiki β

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 2: Line 2:
  
 
{{Note|The best and latest Debian version for OpenVZ 6 is [[Installation on Debian 8|Devuan 1.0]], but Debian 9 makes really easy the coexistence of OVZ and unprivileged LXC containers.}}
 
{{Note|The best and latest Debian version for OpenVZ 6 is [[Installation on Debian 8|Devuan 1.0]], but Debian 9 makes really easy the coexistence of OVZ and unprivileged LXC containers.}}
{{Out|Current commercial version of OpenVZ ([[Virtuozzo]] 7) is not installable on Devuan or Debian because is developed as an independent GNU/Linux distribution}}
+
{{Out|Current commercial version of OpenVZ ([[Virtuozzo]] 7) is not installable on Debian GNU/Linux because is developed as an independent GNU/Linux distribution}}
  
 
= '''Volumes and file systems''' =
 
= '''Volumes and file systems''' =
Line 25: Line 25:
 
  Script=/etc/initramfs-tools/scripts/local-premount/tune
 
  Script=/etc/initramfs-tools/scripts/local-premount/tune
 
  echo '#!/bin/sh' | sudo tee $Script
 
  echo '#!/bin/sh' | sudo tee $Script
  echo 'if [ "$1" = "prereqs" ] ; then exit 0 ; fi' | sudo tee -a $Script
+
  echo 'if [ "$readonly" != "y" ] ; then exit 0 ; fi' | sudo tee -a $Script
 
  echo e2fsck -f $Volume | sudo tee -a $Script
 
  echo e2fsck -f $Volume | sudo tee -a $Script
 
  echo tune2fs -O -metadata_csum $Volume | sudo tee -a $Script
 
  echo tune2fs -O -metadata_csum $Volume | sudo tee -a $Script
Line 39: Line 39:
 
  sudo rm /etc/initramfs-tools/scripts/local-premount/tune
 
  sudo rm /etc/initramfs-tools/scripts/local-premount/tune
 
  sudo apt --reinstall install initramfs-tools-core
 
  sudo apt --reinstall install initramfs-tools-core
sudo update-initramfs -u -k all
 
 
This recipe is useful for any volume that can't be neither unmounted nor remounted readonly.
 
This recipe is useful for any volume that can't be neither unmounted nor remounted readonly.
  
Line 68: Line 67:
 
= '''Change Systemd to SystemV''' =
 
= '''Change Systemd to SystemV''' =
  
{{Note|Warning! This operation can make some desktop software to stop working.}}
+
{{Note|Warning! This operation can make some software to stop working, such as desktop environments.}}
  
 
  sudo apt install sysvinit-core sysvinit-utils
 
  sudo apt install sysvinit-core sysvinit-utils
Line 74: Line 73:
 
  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/avoid-systemd
+
  echo -e 'Package: *systemd*\nPin: release *\nPin-Priority: -1\n' | sudo tee /etc/apt/preferences.d/systemd
  
 
* More recipes at [http://without-systemd.org/wiki/index.php/Debian_Stretch without-systemd.org]
 
* More recipes at [http://without-systemd.org/wiki/index.php/Debian_Stretch without-systemd.org]
Line 112: Line 111:
 
= '''Reboot into OpenVZ kernel''' =
 
= '''Reboot into OpenVZ kernel''' =
  
{{Note|At boot manager, in "Advanced options for Debian GNU/Linux", you will find kernels named "2.6.32-openvz". Select the first listed.}}
+
{{Note|At boot manager, in "Advanced options for Debian GNU/Linux", you will find kernels named "openvz". Select the first listed.}}
  
 
  sudo reboot
 
  sudo reboot
Line 130: Line 129:
 
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 GNU distribution for Linux, installed into a container
+
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 141:
 
  sudo vztmpl-dl --gpg-check debian-8.0-x86_64-minimal
 
  sudo vztmpl-dl --gpg-check debian-8.0-x86_64-minimal
  
Alternatives:
+
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.
* Download precreated template caches from [[Download/template/precreated|Download » Template » 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.
 
* '''[https://downloads.actiu.net/ctctl/ ctctl]''' helper to create Debian (or derivative) container without template (caches it as a local template). This tool manages unprivileged LXC containers too.
 
  
 
= Next steps =
 
= Next steps =
Line 151: Line 148:
  
 
= See also =
 
= See also =
* [[Installation on Debian 8]] (oldstable) or Devuan 1.0 (Jessie, stable, SystemV)
+
* [[Installation on Debian 8]] (oldstable) or Devuan 1.0 (Jessie)
  
 
[[Category: Installation]]
 
[[Category: Installation]]
 
[[Category: HOWTO]]
 
[[Category: HOWTO]]
 
[[Category: Debian]]
 
[[Category: Debian]]

Please note that all contributions to OpenVZ Virtuozzo Containers Wiki may be edited, altered, or removed by other contributors. If you don't want your writing to be edited mercilessly, then don't submit it here.
If you are going to add external links to an article, read the External links policy first!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)

Templates used on this page: