A Virtual Development Server
Ahh, the Joy of Installing a New OS
If you’ve ever messed around with installing a new operating system on the computer that you need for your work, you know how scary that is. You never know if the box is going to boot at all, whether the data you had on your hard drive are going to still be there when you’re done. And what if the backup won’t read?
Trying to get Windows and Linux to dual-boot is even worse. Nobody enjoys messing with the boot sector. And besides, if you ever get it to work, you have to shut down one OS close word, close outlook, close emacs, shut down, wait, power on, wait … before you can start the other. And you can’t go make coffee while this is going on, because you have to enter at just the right moment and tell the stupid box which OS to boot. “The other one, stupid!”
VMware takes all the pain out of those things. Well, okay, so it doesn’t do exactly the same thing, but it does allow you to install all the operating systems you could ever dream of on a single box. And it lets you run them all simultaneously. That is, if you have enough RAM and hard disk space. But that’s pretty cheap, these days.
In VMware, it’s safe
What VMware does is it emulates an Intel PC, complete with BIOS, virtual disk drives and CD-ROM drives, network interface and all. And everything’s simply contained in a handful files in the file system on your computer. So if you’re about to do some screwy operation on a virtual machine, you simply shut down or suspend the virtual machine, copy all the files to a secure place, power up or resume the virtual machine, and you can do all sorts of crazy shit, and you can still restore the copy if something goes awry. Try that with your master boot record!
If you really plan on messing things up on a regular basis, you can even ask VMware to ask you each time you shut down whether to keep or discard anything you did in that session. Or if the whole point is to try to trash things, you can make it non-persistent, in which case everything’s automatically discarded each time. This would be pretty effective for a front-end web server, in a situation where the database and the log files and everything else that gets updated live on other machines. If hackers decide to pay you a visit, you can simple power cycle the virtual machine, and everything will be back to normal.
The Ideal Development Server
All in all, this makes VMware ideal to use for your personal development server. When you have different clients and different projects on a monthly basis, like I do, they usually require different development setups. Maybe on one project, you need to develop J2EE on Oracle. Another project is based on PostgreSQL and OpenACS. Yet other projects must work on FreeBSD or on some particular version of Windows. It’s all easy as pie with VMware.
The trick that works brilliantly for me, is to have, say, RedHat 7.2 with PosgreSQL, AOLserver, and the software I’m developing, running in a virtual machine. Then I connect to that server using a standard secure shell tool, such as <a href=”http://www.zip.com.au/~roca/ttssh.html”>ttssh or <a href=”http://www.vandyke.com/products/securecrt/”>SecureCRT, with X11 forwarding enabled. In addition, my Windows box runs an X server, such as <a href=”http://www.hummingbird.com/products/nc/exceed/”>Exceed or <a href=”http://www.microimages.com/freestuf/mix/”>MI/X. That way, I can use Internet Explorer, Outlook, Word, Excel, WinAmp, AIM, YM, WM, and all the other essential tools I’ve grown accustomed to, next to my Emacs and terminal windows, for a complete, functional work and development environment, all on one box.
The suspend feature is really handy, too. If you’re done with a machine for a while, you don’t need to waste memory on having it sitting idle. You can simply suspend it, and then resume it again when you need it. And, amazingly enough, if you have open SSH or X11 connections, and you don’t mess with them while the virtual machine is sleeping, they’ll survive the suspend/resume operation.
VMware is a bit on the expensive side, but I’ve found it to be well worth it. It’s such a relief to be able to install a new OS on without having to worry about whether you’ll be able to work again the next day. And they’re not even paying me to say this!
Leave a comment