09 Apr 2013

Virtualization with OpenVZ

Ubuntu/linux 0 Comment

== Virtualization with OpenVZ on CentOS 6 ==

OpenVZ is container-based virtualization for Linux. OpenVZ creates multiple secure, isolated Linux containers on a single physical server enabling better server utilization and ensuring that applications do not conflict. Each container performs and executes exactly like a stand-alone server; a container can be rebooted independently and have root access, users, IP addresses, memory, processes, files, applications, system libraries and configuration files.

1. Pre-Requisites for installing openvz server

2. Add the OpenVZ yum repository

3. Ensure the yum repo points to RHEL6 packages

4. Install the OpenVZ kernel and ensure it’s the 1st option in grub

5. Install the standard OpenVZ utilities

6. Modify /etc/sysctl.conf. Add the below content

7. Create a vmbr0 bridge and add the host’s interface to it

8. Create /etc/vz/vznet.conf with the following content. This will automatically add/remove the container’s interface to the bridge when you start/stop the container.

9. Reboot the machine and boot with openvz kernel

10. Create the openvz container with openvz templates

11. Configure the CT