Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

User Guide/Installation and Preliminary Operations

151 bytes removed, 21:34, 18 October 2015
m
Reverted edits by 212.233.125.98 (talk) to last revision by Paparaciz
==== Software Compatibility ====
The Hardware Node should run either Red Hat Enterprise Linux 3 6 or 45, or Fedora Core 3 CentOS 6 or 45, or CentOS 3.4 Scientific Linux 6 or 45. The detailed instructions on installing these operating systems for the best performance of OpenVZ are provided in the next sections.
This requirement does not restrict the ability of OpenVZ to provide other Linux versions as an operating system for Virtual Private Servers. The Linux distribution installed in a Virtual Private Server may differ from that of the host OS.
|}
Many of the historical specifications for partitioning are outdated in an age where all hard drives and SSD drives are well above 20GB. So all minimums can be increased without any impact if you have plenty of drive space. It is suggested to use the ext3 or ext4 file system for the /vz partition. This partition is used for holding all data of the Virtual Private Servers existing on the Hardware Node. Allocate as much disk space as possible to this partition. It is not recommended to use the reiserfs file system as it is proved to be less stable than the ext3, and stability is of paramount importance for OpenVZ-based computers.
The root partition will host the operating system files. Fresh CentOS 6 install with basic server packages + OpenVZ kernel occupies can occupy up to approximately 2 GB of disk space, so 4 GB is a good minimal size of the root partition. If you have plenty of drive space and think you may add additional software to the Node such as monitoring software then consider using more. The Historically, the recommended size of the swap partition shall be has been two times the size of physical RAM installed on the Hardware Node however. Now, with minimum server RAM often above 2GB a more reasonable specification might be RAM + 2GB if RAM is above 2GB and if HD space is limited consider using RAM + 2GB to conserve space. The figure below presents a system with a 12 GB SCSI hard drive. Figure 4: Fedora Core Installation - Disk DruidPlease keep in mind that Virtual Private Server private areas, containing all data of the Virtual Private Servers shall reside on this single /vz disk partition together with all the templates installed.
=== Finishing OS Installation ===
On the Firewall Configuration screen, choose No firewall. Option Enable SELinux should be set to Disabled.
Figure 5: Fedora Core Installation - Disabling Firewall and SELinux
After finishing the installation and rebooting your computer, you are ready to install OpenVZ on your system.
First of all, you should download the kernel binary RPM from http://openvz.org/download/kernel/. You need only one kernel RPM, so please choose the appropriate kernel binary depending on your hardware:
 
if you use Red Hat Enterprise 5, or Centos 5, or Scientific Linux 5:
* If there is more than one CPU available on your Hardware Node (or a CPU with hyperthreading), select the vzkernel-smp RPM.
* If there is more than 4 Gb of RAM available, select the vzkernel-enterprise RPM.
* Otherwise, select the uniprocessor kernel RPM (vzkernel-version).
 
if you use Red Hat Enterprise 6, or Centos 6, or Scientific Linux 6:
*select the uniprocessor kernel RPM (vzkernel-version).
Next, you shall install the kernel RPM of your choice on your Hardware Node by issuing the following command:
* vzctl: this package is used to perform different tasks on the OpenVZ Virtual Private Servers (create, destroy, start, stop, set parameters etc.).
* vzquota: this package is used to manage the VPS quotas.
* vzpkg: this package is used to work with OpenVZ templates.
You can download the corresponding binary RPMs from http://openvz.org/download/utils/.
On the next step, you should install these utilities by using the following command:
# rpm –Uhv vzctl*.rpm vzquota*.rpm vzpkg*.rpm
{{Note|During the packages installation, you may be presented with a message telling you that rpm has found unresolved dependencies. In this case you have to resolve these dependencies first and then repeat the installation.}}