- David's Church Information Technology - https://infotech.davidszpunar.com -

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 [1], MySQL). PHP [1] and MySQL, in particular, are quite out of date, so much so that things I run many, many copies of, like WordPress [2], are not compatible with the MySQL [3] 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 [4], 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 [5], 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 [6], 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 [7] (especially in the comments as far as doing a hot-copy), and here [8]. 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 :-)

9 Comments (Open | Close)

9 Comments To "Need to convert Linux machine to Virtual"

#1 Comment By Justin Moore On December 18, 2007 @ 6:28 pm

David,

Dreamhost will give non-profits a free hosting package. Just in case you didn’t know.

#2 Comment By David Szpunar On December 18, 2007 @ 7:39 pm

Thanks Justin–are you trying to steal my future topics? ;-)

I did discover that DreamHost offers [9], after setting up an account for the church, and they were kind enough to give me a refund for our prepaid account and make it free! We are still paying for Private Servers ($24/mo for both, including a 20% discount for having one of each type), but the basic account is free.

I maintain a separate DreamHost account for personal use, which is the one I mentioned in this post, but the church site that was on my server–it’s officially on the church’s DreamHost account as of today!

#3 Comment By Justin Moore On December 18, 2007 @ 9:56 pm

Not only did I steal your topic, I used your referrer code when I signed up for MozyHome earlier, so consider that extra bump in storage as payment for thieving your ideas. :)

#4 Comment By David Szpunar On December 18, 2007 @ 10:02 pm

“Why you thieving rapscallion” comes the reply from my appreciative self :-)

Now maybe I can back up some music to Mozy with all my important stuff, and still be cheap…

#5 Comment By Micah Webner On December 20, 2007 @ 11:39 am

David,

FWIW, I blogged my first Linux P2V experience, which was a hot copy of an old Fedora Core 2 system, now running happily on the free VMware Server. Maybe you’ll find these notes useful:

[10]

As you can see from the blog posting, I was able to resize partitions, and that I gave up on hardware detection and just stuffed values from a known working VM.

HTH,
Micah

#6 Comment By David Szpunar On December 20, 2007 @ 11:27 pm

Hi Micah,

Thanks for the link! I definitely picked up some good info from a quick skim through, and I’ll be back to your post when I’m ready to transfer for some more in-depth guidance! That’s a good cpio walkthough you linked as well!

#7 Comment By Pyro On December 31, 2007 @ 7:16 am

Dave,
You have enough processes. Just reminded you that CentOS is a one for one binary compile of RHE. So starting with CentOS 3 would give you the best compatibility without buying RHE IE good place to start.

#8 Comment By David Szpunar On December 31, 2007 @ 4:50 pm

Thanks Pyro. I thought Whitebox Linux was based on RHEL and maybe is is as well, but it’s good to know that about CentOS! I’m still debating whether or not I want to go to the trouble of replicating the system for posterity or not, or if I can bear to just toss it after I get the important stuff off (which is what I’m focusing on now). If I do go ahead and try the virtual-conversion route, I’ll probably install CentOS 3 in a VM and then try an rsync with the server. That should cut way down on bandwidth and transfer time if CentOS is essentially RHEL, since most files will be the same! I love rsync :-) (There’s a program called [11] for Windows that purports to be a Windows GUI Rsync, trying it is on my to-do list as it would be more efficient than robocopy!)

#9 Comment By David Szpunar On April 7, 2008 @ 10:42 am

Just an update on this: I didn’t end up having the time or energy to do the transition for my box, which is now gone. I just kept a backup of everything I wanted. But thanks for the tips everyone, I know the links here will help others in the same situation and probably me in the future!