[CentOS-virt] Xen/VMWare Server comparison and "best Xen practices"?

Scott Dowdle

dowdle at montanalinux.org
Mon Oct 15 18:50:20 UTC 2007


----- "Kai Schaetzl" <maillists at conactive.com> wrote:
> Strictly CentOS 5. CentOS 5 host and CentOS 5 guest
> Usage will be for web/mail server related tasks  (especially heavy MySQL usage 
> with several GB databases), no desktop and no fileserver tasks.

Sorry for butting in with some ideas that might be considered off topic for your particular discussion but you sound like perfect customer for OS Virtualization.  Although running OpenVZ (or Linux-VServer) would be going outside of the official CentOS repositories (and upstream)... since you want to run Linux on Linux with no need to run different kernels... and are seeking performance... I'd recommend you give the OS Virtualization guys (aka containers aka security contexts) a try.

If you'd like to see a comparison between Xen and OpenVZ, here's a completely independent white paper for you in PDF format:


> There will be only two or three DomUs.

That's a shame.  With OS Virtualization, you can easily fit more virtual machines than you can with machine virtualization.  Again, OS Virtualization isn't the better solution for every case, but where appropriate, it kicks ass.

> On the production machine I wouldn't be using/installing Gnome at all. 
> But for getting acquainted to the stuff it's much easier to install and manage 
> a new VM with virtual machine manager.

While there has been some work putting OpenVZ support into virt-manager, those haven't quite made it into the upstream... but for comparison, here's how you create a virtual machine (aka Virtual Private Server or Virtual Environment) in OpenVZ:

$ vzctl create {VEID} --hostname {FQDN} --ipadd {ip address} --ostemplate centos-4 --config vps.basic

$ vzctl set {VEID} --name {name} --nameserver {nameserver ip address} --searchdomain {desired search domainname} --diskspace {min:max} --userpasswd root:{password} --onboot yes --save

$ vzctl start {name}

Now you have a fully functioning server you can reach just like a Xen virtual or a real machine.   For --ostemplate (which is is basically a .tar.gz form of install media) you can use a pre-created OS Template file (see: http://openvz.org/download/template/cache/) or build your own with vzpkgcache and a OS Template Metadata package.

There is an additional access method available from the host machine:

$ vzctl enter {name}

Get a VPS installed with all of the software you want on it and configured as desired and you can easily  clone it or make it into an OS Template from which other VPSes can be installed:

1) Stop the VPS: 
     $ vzctl stop {name}

2) cd into the VPS' private directory: 
     cd /vz/private/{VEID}

3) tar gz up the private dir and place it in template cache directory:
     tar -cvzf /vz/template/cache/my-new-os-template.tar.gz .

4) Now use vzctl create to create as many machines as you like giving my-new-os-template as parameter given for --ostemplate.

VPS host name and network configuration are stored in a separate config file on the host machine rather than being embedded inside the VPS' directory space.

Here's a screencast I did on installing OpenVZ, creating a virtual machine, and migration:

Here's a short screencast that shows live migration of a desktop VPS:

Feel free to email me with any questions or comments... and flames too if desired. :)

Scott Dowdle
704 Church Street
Belgrade, MT 59714
(406)388-0827 [home]
(406)994-3931 [work]

More information about the CentOS-virt mailing list