Home > Server Virtualization Tips > Virtualization platforms > OpenVZ -- Getting started with Virtuozzo's parent
Server Virtualization Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

VIRTUALIZATION PLATFORMS

OpenVZ -- Getting started with Virtuozzo's parent


Scott Dowdle, contributer
11.30.2006
Rating: -4.50- (out of 5)


Server virtualization technical tips and expert advice
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


There are a number of virtualization products for Linux and while I have used a number of them, the one that best fits my needs is OpenVZ. OpenVZ uses a form of virtualization called "process containers." OpenVZ is not a hardware emulator nor a virtual machine but a form of operating system-level virtualization that offers a way of grouping processes (running programs or system services) together to create a Virtual Environment (VE) or a Virtual Private Server (VPS).

What is OpenVZ?

OpenVZ is made up of three things: A kernel, a set of utility programs, and OS (operating system) templates.

The kernel - OpenVZ offers pre-built kernel packages for modern Red Hat Enterprise Linux systems/clones, (RHEL, CentOS and so on,) Fedora Core 5 and SUSE 10. OpenVZ has also been integrated into the lastest release of Mandriva Corporate Server and is also available for Gentoo via the Gentoo Portage system. For those who prefer to compile from source, complete source code is available in src.rpm format as well as patches and configs for the mainline Linux kernel source. The main new features provided by the OpenVZ kernel are process id virtualization (PID) and more extensive resource management (user beancounters).

Virtualization products for Linux

1) VMware - www.vmware.com
2) Parallels - www.parallels.com
3) Win4Lin - www.win4lin.com
4) Qemu - www.qemu.com
5) Bochs - bochs.sourceforge.net
6) Xen - www.xensource.com
7) User-mode Linux - user-mode-linux.sourceforge.net
8) Linux-Vserver - linux-vserver.org
9) Virtuozzo - www.virtuozzo.com
10) OpenVZ - www.openvz.org

The utility programs - OpenVZ provides several utility programs for creating, monitoring and managing virtual private servers (VPSes), software package management, OS template management, and taking system snapshots and live migration. vzctl is used to create, configure, modify, start and stop VPSes. The software package management tools include vzrpm and vzyum. The OS template tools include vzpkgadd and vzpkgcache. vzmigrate provides the ability to take system snapshots as well as live migration.

The templates - In an effort to make creating VPSes as easy as possible, OpenVZ includes template packages which are basically a collection of metadata used to define a Linux distribution. OpenVZ also offers pre-built distribution templates. What's the difference? The template package approach allows one to download all of the software packages that represent a given Linux distribution whereas a pre-built template is one big .tar.gz of a VPS.

Setting up an OpenVZ system is fairly quick and easy since you only have to download/install a kernel and a few additional software packages. Creating an OS template or downloading one of the pre-built OS templates can take a bit more time and bandwidth but once your template cache is setup, creating VPSes running any of the supported Linux distributions is really quick and easy. Creating a VPS and starting it can take as little as two minutes.

The process container approach

Scalability - The process container style of virtualization is very light-weight and efficient when compared to the hardware emulation (VMware and Parallels) or the para-virtualization (Xen and User-mode Linux) approaches. A VPS only takes up the resources needed to run the programs and services you want and does not have a separate kernel nor all of the underpinnings of a full OS.

As a result, OpenVZ offers native performance, dynamic resource allocation, and is exceptionally scalable. How scalable? The OpenVZ developers have done some benchmarking and claim to be able to run upto 120 basic VPSes on a single-core Pentium 4 based system with 768MB or RAM and upto 320 basic VPSes in 2GB of RAM.

No, that isn't a typo. With the other virtualization approaches, the main barrier to scalability is RAM, because each virtual machine needs the same amount of memory as a typical single machine. Since an OpenVZ VPS is just a set of processes, a VPS only consumes the CPU and RAM resources needed to run those processes. For example, a basic VPS (running Apache web-server, sshd, sendmail and syslogd) is approximately 15 processes.

Features - While OpenVZ is very light-weight, it does not skimp on the features. Functionally, a VPS is a separate machine with its own administrator (root user), users (system and user accounts), user disk quotas, services and software. OpenVZ comes with an extensive resource management system where the administrator of the host system can configure and dynamically allocate resources on a per-VPS basis. OpenVZ also offers advanced features such as system snapshots and live migration of a VPS from one physical host to another. The live migration implementation does not require shared storage, maintains network connections, and is so fast that the few seconds of downtime is often unnoticeable.

When to use OpenVZ

OpenVZ is well suited for a number of uses including server consolidation, hosting, development and testing, security, and education. If you have a number of Linux servers that are underutilized, OpenVZ can be used to consolidate them into fewer (or possibly one) physical machine(s). Hosting companies love VPSes because they can divide one single machine among many customers. Many system administrators take special care to install server applications into chrooted environments for additional security but a VPS is a much better solution for server application separation. For schools, imagine a system administration class where each student can have their own VPS.

When not to use OpenVZ

If you need to run multiple/different operating systems or kernels on a single machine, the hardware emulation or para-virtualization based virtualization methods are required as OpenVZ is a single OS (Linux), with a single kernel. OpenVZ is completely command line oriented and does not currently include any GUI based applications.. and is probably not appropriate for those who fear the shell prompt.

In the second part of this article I'll take you through the actual process of installing and using OpenVZ as well as introduce some tips and tricks for best practices.

Rate this Tip
To rate tips, you must be a member of SearchServerVirtualization.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Search More Tips on Virtual Implementation and Virtualization Platforms
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersEvents
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2006 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts