ADMIN
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
VirtuAlizAtion<br />
openVz<br />
© sculpies, Fotolia.com<br />
Operating system virtualization with OpenVZ<br />
Container Service<br />
the virtualization technology market is currently concentrating on hypervisor-based systems, but hosting providers<br />
often use an alternative technology. container-based solutions such as openVz/ Virtuozzo are the most<br />
efficient way to go if the guest and host systems are both linux. By thomas drilling<br />
Hypervisor-based virtualization<br />
solutions are all the rage. Many companies<br />
use Xen, KVM, or VMware<br />
to gradually abstract their hardware<br />
landscape from its physical underpinnings.<br />
The situation is different if<br />
you look at leased servers, however.<br />
People who decide to lease a virtual<br />
server are not typically given a fully<br />
virtualized system based on Xen or<br />
ESXi, and definitely not a root server.<br />
Instead, they might be given a resource<br />
container, which is several<br />
magnitudes more efficient for Linux<br />
guest systems and also easier to set<br />
up and manage. A resource container<br />
can be implemented with the use of<br />
Linux VServer [1], OpenVZ [2], or<br />
Virtuozzo [3].<br />
Benefits<br />
Hypervisor-based virtualization solutions<br />
emulate a complete hardware<br />
layer for the guest system. Ideally,<br />
any operating system including applications<br />
can be installed on the guest,<br />
which will seem to have total control<br />
of the CPU, chipset, and peripherals.<br />
If you have state-of-the-art hardware<br />
(a CPU with a virtualization extension<br />
– VT), the performance is good.<br />
However, hypervisor-based systems<br />
do have some disadvantages. Because<br />
each guest installs its own operating<br />
system, it will perform many tasks in<br />
its own context just like the host system<br />
does, meaning that some services<br />
might run multiple times. This can<br />
affect performance because of overlapping<br />
– one example of this being<br />
cache strategies for the hard disk subsystem.<br />
Caching the emulated disks<br />
on the guest system is a waste of time<br />
because the host system already does<br />
this, and emulated hard disks are actually<br />
just files on the filesystem.<br />
Parallel Universes<br />
Resource containers use a different<br />
principle on the basis that – from the<br />
application’s point of view – every<br />
operating system comprises a filesystem<br />
with installed software, space for<br />
data, and a number of functions for<br />
accessing devices. For the application,<br />
all of this appears to be a separate<br />
universe. A container has to be designed<br />
so that the application thinks<br />
it has access to a complete operating<br />
system with a run-time environment.<br />
From the host’s point of view, containers<br />
are simply directories. Because<br />
all the guests share the same kernel,<br />
they can only be of the same type as<br />
the host operating system or its kernel.<br />
This means a Linux-based container<br />
solution like OpenVZ can only<br />
host Linux guests. From a technical<br />
point of view, resource containers extend<br />
the host system’s kernel. Adding<br />
an abstraction layer then isolates the<br />
containers from one another and provides<br />
resources, such as CPU cycles,<br />
memory, and disk capacity (Figure 1).<br />
Installing a container means creating<br />
a sub-filesystem in a directory on the<br />
host system, such as /var/lib/vz/<br />
gast1; this is the root directory for the<br />
guest. Below /var/lib/vz/gast1 is a<br />
regular Linux filesystem hierarchy but<br />
without a kernel, just as in a normal<br />
chroot environment.<br />
52 Admin 01 www.Admin-mAgAzine.com