Logo for “Nota Bene / non-blog” goes here. NB main page
Along with navigation links.
I’ve become increasingly dissatisfied with the service from the traditonal Virtual Host providers.
For example, I want to use something in the
.htaccess file, and it’s not supported/enabled/allowed.
Then I wanted to write CGI scripts using Perl version 5.10 and only 5.8 was available. Atlantic.Net
said, “Get a dedicated hosting machine.” Well, not at those prices!
I have become a fan of “Virtual PCs” such as with the VMWare Workstation product, especially with current generations of CPUs that support virtualization natively, and with RAM becoming cheap enough to have plenty of it.
So, I looked into finding a new service provider that would host a Virtual Machine rather than a physical dedicated host. With my own copy of Appache and OS configuration I can do whatever I want, but I don’t need the resources of a fully dedicated motherboard and CPU for a few hundred hits a day.
It turned out to be difficult to find such companies using Google. I find lots of discussion about using VMWare products for that purpose, and companies doing it internally on their own servers, but not much in the way of service providers offering VMWare parking spots for sale on their servers.
I ended up going with HMon VMware Hosting. The proprieter answered my email promptly and discussed details, and the price was indeed affordable. As I write this, HMon is advertising $20/month for 10 GB of storage, and Atlantic.Net offers shared hosting for $22.95 for 10GB! Well, my old account was $14.95 because I don’t have 10 GB of content. Compare that with dedicated hosted machines for $80, and it is clear that VMWare hosting is the way to go.
Shopping for a VMWare service provider is actually simpler, since you don’t need a huge list of how many email addresses, how many aliases, how many SQL databases, etc. are included. You can do anything you want on the machine! The only parameters of interest are bandwidth and actual disk space needed on the physical host. Just remember that the disk space is not just for content, but includes a few GB for the operating system and server software.
VMWare’s web site has numerous Virtual Appliances already built for a variety of purposes including web hosting. But, the ones of interest were out of date, unsupported, and when I tried could not get it working right.
So I did some investigating and installed my own from scratch. I chose Debian, being good for stability of a server, and used the 64-bit build. I based my installation mostly on this one by Falko Timme.
The literature on Linux will tell you that using more partitions is better. For my virtual machine, I made a separate virtual disk file for each partition.
From reading up on VMWare, I learned that using the option to split virtual disks into 2GB files offers technical advantages beyond simply being a convenience to fit on backup media, and is generally better. I made the usr and var partitions large and used the 2GB option, and the others I made only 2GB in size total. In all, I made the following .vmdk files, and created them in this order:
Creating them in this order is significant, as it makes it easy to handle each one during the Debian installation. This will be the order in which they appear on the menu there, and the order it offers by default for the purpose of each partition you take care of.
My idea was to make the
var partition “independent”, which means it will not be included in a snapshot
in VMware. Then, I can take a shapshot, modify the server software, and undo that modification later
without affecting the content that is also on the machine, since the stuff in var will not be rolled back.
Likewise, I can back up the OS and server software by copying the small .vmdk files and not have my
content included there.
But, it turns out that the software stores stuff on
var as well, and in particular the package management
system does so! So not restoring that partition confused it. In order to make it work as intended, I need to
make yet another partition and be explicit about “content” I put on it. The
var partition can’t be independent
after all, but stuff that I know is truely content, such as the www directory root and email storage directories,
I can move to the content partition, which is independent.