Sunday, January 20, 2008

Offtopic - Experimenting with Virutal Machines

I'm typing this post from inside a virtual computer, a Linux installation that is running inside my Windows XP computer. Why? I'll tell you.

For several years I have kept around a older computer for experimenting with Linux. Unfortunately this machine's age is getting the better of it - it sports an AMD K6-2 processor running at a mere 500mhz. It was originally a Windows 98 machine. Recently I wanted to try out a piece of software made only for posix systems, so I blew the dust off the junker and fired it up. After several hours of updating the system so I could actually run the software I wanted, it ran unacceptably slow. I am not about to try learning new software with a five second delay on any input.

I'm reluctant to install Linux on my laptop (either exclusively or dual-boot) for reasons of hard drive space and questionable wireless support. This led me to research virtual machines. This would be an optimal solution if I could install the virtual machine on my external hard drive and have it run acceptably.

And so I have done it. I settled on VirtualBox as my emulator, which has a polished professional product that is free for individual use. The type of virtualization used by VirtualBox is not the most efficient, but it is easy. I wasn't looking for optimal performance, just passable.

The whole rig is something like this: A cheapo Dell laptop with a Celeron-M @1.4Ghz, 512 Meg RAM, and a USB external hard drive. Software on the virtual machine is Debian "testing" (Lenny). More RAM would probably make this run a whole lot smoother, but it's already running much faster than the old junker, so I say it's just fine with me. This is my second startup, and on each startup I got an error message from VirtualBox that I was out of memory, though I suspect this was just linux probing the available RAM.

The biggest unforeseen issue was the FAT32 file size limitation on the external HDD. One cannot create files larger than 4GB on a FAT32 file system, so the virtual disk size is limited to 4GB if your external HDD is formated FAT as most are. If I had been thinking straight I would have created separate virtual disks for the swap and home partitions, but so far so good - I'm not planning on creating a lot of data in Linux, mostly analyzing small amounts of existing data.

Assuming that I will get a new computer at some point in the future I will definitely be using virtualization of some kind. Maybe Linux in Windows, maybe Windows in Linux. It will depend on my needs at that time, and I'll be sure to do it with enough available resources to get it done right.

No comments: