Most of this section is taken directly from;
http://www.howtoforge.com/installing-and-using-openvz-on-debian-squeeze-amd64
Comments and instructions are in this font; commands you enter are in bold, and settings in config files you enter or verify are in italic bold .
1] To install the openvz kernel and a few utilities, open a root terminal and enter the following:
apt-get install linux-image-openvz-amd64 vzctl vzquota vzdump
2] Create a symlink from /var/lib/vz to /vz to provide backward compatibility:
ln -s /var/lib/vz /vz
3] Open /etc/sysctl.conf and make sure that you have the following settings.
nano /etc/sysctl.conf
3a] The settings;
net.ipv4.conf.all.rp_filter=1
net.ipv4.icmp_echo_ignore_broadcasts=1
net.ipv4.conf.default.forwarding=1
net.ipv4.conf.default.proxy_arp = 0
net.ipv4.ip_forward=1
kernel.sysrq = 1
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.eth0.proxy_arp=1
Note: If later you need to modify /etc/sysctl.conf, you can run sysctl -p.
4] Edit /etc/vz/vz.conf and set NEIGHBOUR_DEVS to all:
nano /etc/vz/vz.conf
4a] The settings;
NEIGHBOUR_DEVS=all
The above step is important if the IP addresses of your virtual machines are from a different subnet than the host system's IP address. If they are and you don't do this, networking will not work in the virtual machines.
5] Reboot the system;
reboot
Select the openvz kernel on reboot. If your system starts without problems, then everything is ok.
No comments:
Post a Comment