Virtualizing the servers
Currently phred.org/bikelist.org are run off of two servers, one running FreeBSD and one running Windows 2003 and Exchange 2003. We also have a file server for our house, so that is 3 computers powered on 24×7. The total power consumption for all three machines is around 400 watts, which costs us about $25/mo in electricity (“clean” hydro-powered electricity, but that is still a lot of energy).
This month I’m replacing all of those physical servers with a single PC. Using VMWare Server I canrun the operating systems from those three machines at the same time on a single computer. They’ll share a single set of disks, memory, and CPU. This one box will use about the same amount of power as any one of the previous machines.
It’s going okay so far. Last night I spent a lot of time trying to move the FreeBSD machine (phred.org) over to VMWare. This process is called P2V (physical to virtual). There are very good tools for doing this with Windows-based computers, but not much for FreeBSD. Here is what worked for me:
-
Make a backup of the FreeBSD box.
-
Get vdkand dd for windows.
-
Use vmware-vdiskmanager to create a virtual disk that is at least as large as the disk in the FreeBSD machine.
-
Move the FreeBSD machine’s drives to a Windows box with those tools. In my case this couldn’t be the machine that I run VMWare on because that machine runs 64-bit Windows and my FreeBSD drives use an old 3ware RAID controller which isn’t supported in 64-bit Windows. I used an old PC that is being retired.
-
Mount the disk image created with vmware-vdiskmanager using vdk.
-
Use dd to copy from the physical volume that contains the FreeBSD bits to the VMWare disk.
-
Dismount the disk using vdk.
-
Copy the .vmdk file to your VMWare box and mount it in a new VMWare image.
Hopefully someone finds this via a search engine and it is helpful to them.
If you see that phred.org or bikelist.org lists are down for periods of time in the next week or two this is why. I still have one more machine to move over.
I’m excited for the end results. The machines take up a good amount of space in the basement and a single machine is much easier to hide in a corner. Power consumption will be lower. It’ll be easier for me to build out test servers to experiment with. It makes backup and upgrades easier.
The old computers (some of which are only a couple of years old…all will run Windows XP and Office) are going to Global Technology Academy, a non-profit based out of Garfield High School. GTA sends local high school students around the world to setup computer labs in schools in developing countries. I’m excited about this non-profit because it gives Seattle students exposure to developing countries and gets the technology installed in useful ways instead of just dumping it.
Alex, this is too cool! And while you switched over, I never even noticed a glitch. Awesome and THANKS!
Nice! I”ve been doing this same process at work, using the MSFT solution. It rocks my (virtual) world. I think I”m going to be using VMWare on my next home server, if only to let me easily have a ”machine” I can use for hacking on less risk of killing my other services.
The other really awesome feature that you mention – I have definitely taken advantage of it here at work. When one machine starts to get too big for it’’s physical britches I can just get a new piece of hardware, slap the OS and virtual server on there and then copy the image file over. Bam, suddenly there’’s more ram and disk space for the having in a tenth the work of ever setting up Exchange again.
Cool Alex. Thanks again for all the effort in hosting.
Sounds like a good non profit as well.
Excellent! There is some pretty cool stuff happening in virtualization right now. At my place of employment we”re implementing a VMWare ESX cluster. We used it for a lab this summer for an AD migration project and will start moving some of the production environment to VMWare next month. Please blog the updates to your vm experience….. And, of course, as a reader of the ibob archive, I appreciate your efforts! Thanks.