David Szpunar: Owner, PC Help Services & indeedIT

David's Church Information Technology

December 18th, 2007 at 2:14 pm Print This Post Print This Post

Need to convert Linux machine to Virtual

I have a dedicated web hosting server that is currently hosted at a large hosting datacenter. I’ve had the server for a few years and it’s served me well, but I don’t need the power and I don’t want to hassle with (or pay for technician time for) upgrades to the control panel software or the system software (Apache, PHP, MySQL). PHP and MySQL, in particular, are quite out of date, so much so that things I run many, many copies of, like WordPress, are not compatible with the MySQL version installed! The server is running Red Hat Enterprise Linux 3 (RHEL 3), and I’ve learned quite a bit having root access to a Linux server. However, it’s too expensive for me to continue renting, in addition to my above reasons, and to top it off with VMWare’s Virtual Server, I can install and play with as many virtual Linux machines as I want at any time!

So I am switching all of my domains (mostly mine and those of some friends, but I have hosted a Lakeview website on this server for over a year as well) over to a shared account on DreamHost, which is inexpensive and allows for unlimited domains and more disk space and bandwidth than my dedicated server, should I need it. They also offer a cool new service called DreamHost Private Servers, which lets you move from a shared server to a server with dedicated resources (CPU and RAM) that can not only spike above your guaranteed minimums as the server has capacity, but will also let you reconfigure (and pay more for) more resources incrementally at any time for that Private Server, with the change taking place in minutes. You can choose from regular and MySQL Private Servers, or both (they split out MySQL servers onto different machines than the web hosting files on all accounts). Each Private Server starts at only $15/mo for 150MHz processor and 150MB  memory guaranteed resources, and goes up from there depending on how many resources you want (you are only charged for your resource usage at each setting for the time you are at that setting).

I am in the process of moving the hosting for all of my domain names to my DreamHost account, and the process is going smoothly. However, there is a lot of useful information on the dedicated server that I’d like to keep for posterity, preferably in an accessible format and not just an archive file. It doesn’t have to be on the internet, but having it running as a virtual machine on my local computer would rock! My main limitation in converting the machine to a virtual server is that I can’t reboot it into a special CD or something, since it needs to remain running and accessible to me remotely at all times via SSH. The hard drive on the dedicated server is 60GB, but only 20GB of that is used, so it will take a while to move everything but it shouldn’t be too bad.

I have done a little bit of research on moving a Linux machine into a virtual machine, and have found interesting articles here (especially in the comments as far as doing a hot-copy), and here. I haven’t done the research to decide for sure, but I like the idea of installing the same or similar Linux distribution on a virtual machine and using rsync to copy the changed files from the physical server. This would likely reduce the amount of data transfer by an order of magnitude. Then I still have to determine all the fun details of how to get the virtualized server to recognize the new hardware properly and get all of those tweaks done, which is harder to find information on due to the differences between specific Linux distributions.

My goal is to complete this as well as the transfer of all my remaining domains over to my DreamHost account by the end of this month so I am not billed for the dedicated server next month. We’ll see how that goes. If you have any bright ideas (especially if you’re a Linux guru), I’m certainly open to suggestions and recommendations!

Disclosure: The link to DreamHost above is an affiliate link. If you sign up through that link without using a promo code, I get the referral credit, which I would of course appreciate but is not required. You can visit www.dreamhost.com directly yourself. Or you can get $50 off an account and give me the credit and some of the referral amount by using promo code SZP50OFF, which is a better deal for both of us :-)