Difference between revisions of "Installing openVZ on Cent OS"
From Notes_Wiki
m |
m |
||
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 6.x]] > [[Virtualization tools]] > [[OpenvZ]] > [[Installing openVZ on Cent OS]] | |||
Installation steps have been learned from http://wiki.openvz.org/Quick_installation | Installation steps have been learned from http://wiki.openvz.org/Quick_installation | ||
Line 7: | Line 6: | ||
#Download openvz.repo file from http://download.openvz.org/openvz.repo | #Download openvz.repo file from http://download.openvz.org/openvz.repo | ||
#<tt>mv openvz.repo /etc/yum.repos.d</tt> | #<tt>mv openvz.repo /etc/yum.repos.d</tt> | ||
#<tt>yum install | #<tt>yum install vzkernel.x86_64 ovzkernel.x86_64 vzctl.x86_64 vzquota.x86_64 ploop</tt> | ||
#Disable SELinux | #Disable SELinux | ||
#Enable forwarding of packets in iptables firewall | #Enable forwarding of packets in iptables firewall | ||
#Enable packet forwardng in /etc/sysctl.conf (net.ipv4.ip_forward=1) | |||
#Create a folder where you want to store openVZ related stuff. Create symbolic link of choosen folder as /vz. | #Create a folder where you want to store openVZ related stuff. Create symbolic link of choosen folder as /vz. | ||
#Download templates from http://download.openvz.org/template/precreated/ to '<tt>/vz/template/cache</tt> | #Download templates from http://download.openvz.org/template/precreated/ to '<tt>/vz/template/cache</tt>. | ||
#'''Optionally''' Edit file '<tt>/etc/grub.conf</tt>' and change title of kernel with word stab in it to openVZ. Remove all parameters passed to this kernel except "ro root=...". The setup works better without doing this as it does not leads to printing of too many messages during boot. | #'''Optionally''' Edit file '<tt>/etc/grub.conf</tt>' and change title of kernel with word stab in it to openVZ. Remove all parameters passed to this kernel except "ro root=...". The setup works better without doing this as it does not leads to printing of too many messages during boot. | ||
#Edit or create '<tt>/etc/vz/vznet.conf</tt>' and write following line in it: | |||
#:<pre> | |||
#::EXTERNAL_SCRIPT="/usr/sbin/vznetaddbr" | |||
#:</pre> | |||
#Edit '<tt>/etc/vz/vz.conf</tt>' and set '<tt>VE_LAYOUT=simfs</tt>' | |||
#Edit '<tt>/etc/modprobe.d/openvz.conf</tt>' so that it has | |||
#:<pre> | |||
#::options nf_conntrack ip_conntrack_disable_ve0=0 | |||
#:</pre> | |||
#Edit '<tt>/etc/vz/conf/ve-vswap-256m.conf-sample</tt>' to change value of NETFILER to | |||
#:<pre> | |||
#::NETFILTER="full" | |||
#:</pre> | |||
#Reboot into openVZ kernel | #Reboot into openVZ kernel | ||
Note that container filesystems get stored in /vz/private/<container_id> | Note that container filesystems get stored in /vz/private/<container_id> | ||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 6.x]] > [[Virtualization tools]] > [[OpenvZ]] > [[Installing openVZ on Cent OS]] |
Latest revision as of 13:14, 24 August 2022
Home > CentOS > CentOS 6.x > Virtualization tools > OpenvZ > Installing openVZ on Cent OS
Installation steps have been learned from http://wiki.openvz.org/Quick_installation
Following steps can be used to install openVZ on CentOS machine:
- Download openvz.repo file from http://download.openvz.org/openvz.repo
- mv openvz.repo /etc/yum.repos.d
- yum install vzkernel.x86_64 ovzkernel.x86_64 vzctl.x86_64 vzquota.x86_64 ploop
- Disable SELinux
- Enable forwarding of packets in iptables firewall
- Enable packet forwardng in /etc/sysctl.conf (net.ipv4.ip_forward=1)
- Create a folder where you want to store openVZ related stuff. Create symbolic link of choosen folder as /vz.
- Download templates from http://download.openvz.org/template/precreated/ to '/vz/template/cache.
- Optionally Edit file '/etc/grub.conf' and change title of kernel with word stab in it to openVZ. Remove all parameters passed to this kernel except "ro root=...". The setup works better without doing this as it does not leads to printing of too many messages during boot.
- Edit or create '/etc/vz/vznet.conf' and write following line in it:
- EXTERNAL_SCRIPT="/usr/sbin/vznetaddbr"
- Edit '/etc/vz/vz.conf' and set 'VE_LAYOUT=simfs'
- Edit '/etc/modprobe.d/openvz.conf' so that it has
- options nf_conntrack ip_conntrack_disable_ve0=0
- Edit '/etc/vz/conf/ve-vswap-256m.conf-sample' to change value of NETFILER to
- NETFILTER="full"
- Reboot into openVZ kernel
Note that container filesystems get stored in /vz/private/<container_id>
Home > CentOS > CentOS 6.x > Virtualization tools > OpenvZ > Installing openVZ on Cent OS