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
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
tar xf linux-220.127.116.11-ovh.tar.bz2
mv 2.6-config-xxxx-std-ipv4-32 .config
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 emacs
cp arch/i386/boot/bzImage /boot/2.6-config-custom-std-ipv4-32
shutdown -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/18.104.22.168-xxxx-std-ipv4-32
Just manually create the missing directory with
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
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-22.214.171.124-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
# 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 ACCEPT
service 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.