[Cialug] virtualization option

Matthew Nuzum newz at bearfruit.org
Fri Sep 21 09:37:41 CDT 2007


For several years (maybe 5?) I've been using a product called
linux-vserver. Its not true virtualization, though it shares many of
the same goals. Its more like Solaris Containers, or a chroot on
steroids.

A virtual machine uses up a set amount of disk space and RAM and
because it has to run its own kernel it uses up a certain amount of
CPU time even when idle.

Linux vserver instead uses a custom kernel on the host which allows
better control of processes locked into the chroot. It also allows
some accounting so that guests can't use more cpu or ram than you
like. However, when there are no processes running in the virtual
server it uses practically no resources (really, none, but the
overhead of the kernel patches may contribute a tiny amount).

This makes it more convenient to virtualize services. If one starts to
outgrow a box, you can migrate it to a dedicated machine with little
reconfiguration.

If the vservers share a filesystem you can use "unification" to avoid
wasting disk space. It looks for identical files in the various
vservers and turns them into hard links. If one of the guests changes
the file, it breaks the hard link so that the file does not change on
the other guests. This means you can do a full Ubuntu Server install
and have it use less than 100M per guest after the first guest.

Here's an example of some ways I'm using it...

On one server I virtualize SMTP, POP/IMAP/WEB and DNS each into their
own guest server. The servers are on a virtual network and I use
NAT/Iptables on the physical interface to route traffic to the correct
hidden ip address.

Also, on the web guest server I have a loopback filesystem mounted (on
the host) so that it maps to the location in the guest where the
websites are hosted. This allows me to enable quotas. By doing this it
allows me to benefit from unification and also to keep track of how
much disk space my websites are using.

Just thought I'd share my experience.

Oh, I just updated the employment page on ubuntu.com. If you see
something you like, tell HR I sent you, they've recently implemented
referral bonuses. :-)
-- 
Matthew Nuzum
newz2000 on freenode


More information about the Cialug mailing list