Author

I am Joannes Vermorel, founder at Lokad. I am also an engineer from the Corps des Mines who initially graduated from the ENS.

I have been passionate about computer science, software matters and data mining for almost two decades. (RSS - ATOM)

Meta
Tags

Sunday
Nov022008

## Installing VMWare Server 2.0 on a OVH RPS

A French hosting company called OVH provides an interesting offer named Real Private Server (RPS) as a intermediate solution between cloud computing and classical dedicated hosting. In a nutshell, RPS is a true dedicated server that comes with a virtual storage starting at 10 GB and going up to 1 TB.

OVH is pricing RPS very aggressively - 20EUR/month for a dual-core AMD64 and 2EUR /month/10GB - makes the RPS a very interesting offer for backup servers that essentially need a lot of reliable storage. It's roughly at the level of the Amazon S3 storage pricing (but you get a regular drive for that price).

Disclaimer: OVH offers rock-bottom hosting prices, but do not expect any support from the OVH staff. This approach might not suit your needs, make sure that you can live without contacts with the staff of your hosting provider before migrating anything to OVH. Then, don't expect much less than 48h of delay for almost any operation that need to be performed on the OVH side. Thus, if you plan to migrate to OVH, consider at least two weeks of delay to get things started smoothly (I mean delay and not actual work).

In this post, I will explain how to install VMWare Server 2.0 on a RPS box of OVH. Having little experience with Linux, I spend two full days on the case, and I got the feeling that it was quite a complicated and painful process. May this guide helps those who might follow the same path.

The process goes with

• Preparing your partitions and OS install.

• Getting the kernel source.

• Adding modules and recompiling the kernel

• Rebooting in HD mode.

• Some preliminary tweaks for modules

• Grab VMWare through Lynx

• Install VMWare

• Tweak your IPTables to get a remote access

First, go to the OVH website, select your RSP and pay. I suggest to go for RSP 3 (because of the 2 GB of RAM) and to directly opt for at least 10 GB of extra storage - otherwise you're likely to be short of storage when running your virtual machines. At this point, you're good for 48h of delay to get your RPS ready. Once your RPS is ready the first step consists of reinstalling the OS because the default one is not very suited for the VMWare install.

Go to the Manager webapp provided by OVH, select your RPS and choose Reinstall OS. I have been using the following parameters

• Fedora Core 8 - English

• iSCSI with 5 GB for / and the rest for /home.

Fedora Core 8 has been chosen for its support of the RPM packages. Indeed, in my experience the RPM install VMWare Server 2.0 was the least dreadful option.

Caution: do not select NFS, I learned the hard way that RSP is not able to boot on a NFS disk which will be necessary for VMWare. Then, the default partition settings is granting only 3 GB for the root partition with is too short, I suggest to go for 5 GB which was sufficient in my situation.

Launch the reinstall. The process is likely to take 1h - upon termination you get a notification email with the new access codes of your server.

At that point comes the difficult part: VMWare Server needs kernel modules that aren't included in any Linux distributions offered by OVH. Thus, you need to grad the kernel sources, recompile them with modules and finally deploy your fresh boot image.

You can download the kernel sources provided by OVH and compile them with

cd /usr/srcwget ftp://ftp.ovh.net/made-in-ovh/bzImage/linux-2.6.24.5-ovh.tar.bz2tar xf linux-2.6.24.5-ovh.tar.bz2cd linux-2.6.24.5-ovhwget ftp://ftp.ovh.net/made-in-ovh/bzImage/2.6-config-xxxx-std-ipv4-32mv 2.6-config-xxxx-std-ipv4-32 .configmake menuconfigmake

When the kernel configuration screen appears, just select Load alternative configuration, open the .config file, then selects the modules (initially unchecked) and exit and save. See also made-in-ovh for more stuff provided by OVH to tweak your Linux servers.

The kernel compilation takes about 30min.
Time to get a cup of coffee.

Now that you have a freshly compiled kernel, you need to copy the boot image into your /boot directly. First, go to OVH Manager, select your RPS, and within the Netboot options, choose HD which stands for local hard drive. For performance RPS are normally booting on shared kernel instances, thus you need to force the RPS to boot on its local drive, otherwise your boot changes will have no effect.

Then, in your RPS, you go with

yum install emacscp arch/i386/boot/bzImage /boot/2.6-config-custom-std-ipv4-32emacs /etc/lilo.conf/sbin/liloshutdown -r now

This will let you edit your LILO boot settings using emacs (you can use whatever editor you like). In the lilo.conf file, change the boot image name for the name of your newly copied image. You are now restarting with a custom kernel that supports modules.

Let's install VMWare Server. OK, the main joke about downloading VMWare is that you can't use wget because you have to go through VMWare web interface instead. Note that you can't cheat VMWare by cut-and-pasting the temporary download links, I tried, it does not work.

So I had to resort to the lynx web text browser (I had not been using it since ages) to actually grab your RPM file. Since lynx isn't exactly a super convenient way of surfing on the web, I suggest to first register on VMWare and then perform the last download step with lynx.

VMWare Server 2.0 is weighting 500 MB, that's why I told you to set 5 GB for your root partition.

Then, install VMWare Server with

rpm -i VMware-server-2.0.0-122956.i386.rpm

The first run is going to fail because VMWare complains that a module directory is missing.

Couldn't open directory /lib/modules/2.6.24.5-xxxx-std-ipv4-32

Just manually create the missing directory with

cd /lib/modulesmkdir 2.6.24.5-xxxx-std-ipv4-32

Although, it's a dirty hack, VMWare does not seem to need those modules anyway. Once the dummy module directory has been created, run the VMWare install.

Lost 4h on that one step.

Now that we have succeeded at installing VMWare Server, let's configure it with

/usr/bin/vmware-config.pl

Choose defaults. When asked for your kernel source code, enter the location where you've just compiled your kernel. It should be /usr/src/linux-2.6.24.5-ovh/include. When asked where to put your virtual machines choose /home/virtual-machines because you've got more storage on the /home partition. Enter your free VMWare license (you get it on the download page of VMWare).

At this point, VMWare Server is running. The version 2.0 comes with a very nice web administration interface (by default at https://localhost:8333/) but this interface is not remotely reachable yet because it's blocked by your default firewall settings. You need to add two lines to your iptables settings.

emacs /etc/sysconfig/iptables# insert the following lines# -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 8222 -j ACCEPT# -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 8333 -j ACCEPTservice iptables restart

Caution: I suggest to add those two lines just below the line that deals with the port 22 (the port used to perform SSH). Indeed, appending the lines at the end of the file is unlikely to work, because the input connections might have been already rejected by another iptables rule. After saving your changes, you need to restart the service.

Check that your VMWare web access console is remotely reachable. Good. Now, one more tweak

service vmware-autostart start

In order to let VMWare starts automatically at boot time.

This completes the setup of VMWare Server 2.0 on a RPS. If you've managed to do it in less than 4h, I am impressed.

Yet, the job isn't finished because you need now to setup your virtual machine. The hard part comes from the network settings, because OVH does not support the bridged networking setup. Stay tuned.

Friday
Mar302007

## The quest of the fail-proof hosted service

There isn't many 100% reliable hosting providers; yet when I buy an hosted subscription plan, I expect no less than a 100% uptime services.

So far, I have discovered only two fail-proof hosting services

• Squarespace.com: blog hosting, not a single issue for more than 3 months of service.

• Hosted-projects.com: Subversion hosting, not a single issue for almost 1 year of service.

Such a quality of services is truly worth to be mentioned and praised.

Sunday
Mar252007

## VPS for continuous integration

Continuous integration is a cornerstone of our development processes at Lokad. We are currently relying on CruiseControl.Net to support continuous integration.

Several months ago, I did ask on various web forums if any company would sell hosting packages that would natively include CruiseControl.Net. The only answer that I did get was Get yourself a $300 PC and use it as your continuous integration server. I was totally unsatisfied with such answers because the maintenance costs associated with the management of an additional machine are terrible. Indeed, if you assume that your time is worth$50/hour (which is already quite a low estimate if you are a moderately skilled developer); then, this additional machine will cost you more than $200/month assuming only 1h of maintenance per week (which is also a very low estimate). At this level, it becomes clearly profitable to go for a rented cheap dedicated server ($100/month). Yet, the idea of paying that much for a server that would be used at 5% of its capacity was not entirely satisfying. Thus, we have finally chosen to go for a Virtual Private Server (VPS) that are available at much cheaper rates (\$30/month).

Bottom line: VPS is really the way to go for continuous integration involving small to midsize software projects.