Playing with VMWare
Introduction
VMWare Workstation enables you to run multiple operating systems on the same computer (think dual-booting without the mess). This article describes my experience with VMWare Workstation 3.1.1, a $299 product.
There are a few reasons you might want to run many OSes on the same computer. They all have to do with saving money, time or hassle (in some cases). Let's look at possible uses of VMWare.
Software development and testingYou're a software developer writing software for Windows. Although Microsoft is very good at maintaining backwards-compatibility, things are not perfect. At the time of this writing you would probably want to support Windows 95, 98, ME, NT 4, 2000 and XP. This means that you should test your software on at least 6 OS'es. In the past that would mean 6 different machines or re-installing the OS a few times. Ouch. With VMWare you only need one computer with the OS of your choice to do the development and initial testing and a few virtual OS installations (running on the same machine under VMWare) for testing.
Or you work with the bleeding-edge version of Gnome. Things are not always rosy and sometimes a snafu makes the whole system fubar and only a re-install from scratch can bring it back to sane state. With VMWare you could go back to a stable version (which you saved earlier in your infinite wisdom) in a few minutes.
Or you're a kernel programmer working on a new file system. File corruption is your daily bread but thanks to VMWare you can now quickly revert to a stable system.
Computer geekYes, you mister. You like to play with all things computer related. You have Windows on one machine, RedHat Linux on another, FreeBSD on yet another (double booting with Debian installation) and wish you had one more because you're just dying to see how the latest Mandrake looks like. Enter VMWare - you can install as many OSes as your hard-drive permits and run as many of them at the same time as your memory permits. That's geek's heaven (although the admission price isn't low).
Or you're a Windows user and you've heard those great things about Linux, Unix and open-source software. You would like to check it out but don't have a spare computer. Get VMWare and experiment to your heart's desire.
Enough with this marketing spiel. VMWare is not a mass market software but it has its use for some people and if you're one of those people you have already recognized how it can help you.
My personal motivation is a combination of those:
- I use Windows XP but want to make sure that my software also runs on Win95 and Win98 (they are still the very popular)
- I like to play with software that is sometimes only available on Unix
- I like to play with different Linux/Unix distributions
Necessary basics
In VMWare terminology the host operating system is the one you have on your computer. The guest OS is the one that you'll be running under VMWare's virtual machine. You can run any guest OS on any host OS (they can even be the same, e.g. you can run Linux under Linux). The crucial thing about VMWare: get a lot of memory.
Get a lot of memory (just in case you were not paying attention). 1 GB should be very good, 512 MB should be bearable. You cannot cheat here: you need enough memory to run both host and guest OSes comfortably, otherwise there'll be no fun. If you run modern OS like Windows XP or latest distro of Linux, they won't run very well in less than 256 MB so you need at least double of that.
VMWare can run on both Windows and Linux and supports a wide variety of guest OSes (many versions of DOS, Windows, Linux, FreeBSD). In theory it should support any possible OS but there's additional software for the officially supported OSes that makes VMWare work better (e.g. by providing faster video drivers).
My experiences
Spending $299 isn't something that I do lightly so I'm happy that VMWare provides 30-day trial version of their software. Ability to play with it risk-free was crucial to my eventual purchase. I wouldn't buy it if I wasn't convinced that VMWare helps me and I could only get convinced by trying it out. I downloaded the latest (at the time of this writing, that is) version Workstation 3.1.1. I skimmed through the documentation and decided to start with something easy: installing RedHat Linux 7.3.
My computer is Dell Latitude 610 laptop with 1 GB of memory and a DSL connection (connected via Ethernet cable to a wireless router which, in turn, is connected to DSL modem; using DHCP (router serves as DHCP server) to obtain dynamic IP address). I provide those networking details because being able to use internet from the guest OS is crucial. I cannot test VMWare in other network configurations but I can say how it worked with my particular setup. If yours is similar you'll know what to expect.
Installing RedHat Linux 7.3
When you create a new virtual machine, you need to decide:
- which guest OS you're installing
- how much memory you want to give it
- how much disk space you want to give it
- which of 3 methods of networking you're going to use
The memory for the virtual machine is reserved up front (and that's why you need a lot of memory). Virtual machine's hard-drive is emulated by a file on your host's hard-drive and the size of this file only grows when you actually use it in your guest OS. It doesn't matter much how big a hard-drive you give to the guest OS (so you can just as well make it big).
VMWare can map a floppy drive and CD-ROM/DVD drive to either physical devices or disk images (e.g. ISO CD-ROM images). Mapping to disk images is very convenient and that's how I installed Linux. I've downloaded ISO images of RedHat 7.3 distributions (3 disks) and mapped first two disks to 2 CD-ROM drives. Since the CD-ROM is bootable, all I needed to do was to create a new virtual machine. and "power" it on. I gave it 400 MB or RAM and 4 GB hard-drive and chosen "bridging" as the networking option. The system booted from CD image and I saw a familiar installer screen (familiar because I've installed previous versions of RedHat quite a few times in the foolish past). The latest documentation only covers RedHat up to 7.2 and says that you should use text mode installer but I used the graphic mode and all went fine. I manually partitioned the drive giving 512 MB to swap space (in hindsight I should leave partitioning to installer), chosen Laptop configuration, added development tools, chosen DHCP for networking and unleashed installation process. Installer couldn't detect my video card so I had to skip X configuration. Also installation was very slow (but I blame it on the slowness of my laptop's hard drive). At the end of installation I got prompted for third CD. I changed the mapping of first CD-ROM drive to third ISO image. and the installation finished smoothly.
After installation I didn't have X Windows. This problem is solved by installing VMWare tools for Linux (part of the toolset is a special X server). I modified excessive resolution of the X server in XF86Config-4 to 1024x768 (the one chosen by VMWare was a bit too big) and fired up Gnome. This worked like a charm and video performance was good enough for productivity work. I wouldn't play games under it but this is emulated graphics on a laptop video card after all. Overall performance of the "virtualized" OS was very good.
Next step was networking and to my surprise it just worked. I fired up Mozilla and went to Slashdot to get my fresh fix of news. ifconfig told me that my virtual machine got a dynamic IP address properly assigned. I could even ssh (I'm using quite wonderful Putty for my Windows SSH needs) from Windows (host OS) to Linux (guest OS). My only networking failure was inability to use samba's smbclient to browse shares on Windows (but that probably has nothing to do with VMWare - I usually fail when I try to use samba).
I signed up for RedHat network, brought my system up to date with up2date --nox -u. That was a small mistake because I didn't have ssh server installed yet and up2date updated all other parts of OpenSSH to newest version. When I tried to install the OpenSSH-server*.rpm from the original CD, rpm didn't let me (even though I tried to --force him). I had to download the matching server RPM from the net and rpm -ihv it.
Installing Windows 95
I also installed Windows 95. There were some speed-bumps. My Windows 95 installation CD-ROM wasn't bootable (it came with a bootable floppy disk instead). I wanted to create bootable CD to make the installation easier. What I did:- I downloaded bootable image of the floppy disk from here. I had to download the trial version of WinImage to convert bootdisk from their strange *.exe format to the raw *.ima format
- I created a bootable CD ISO image of the installation CD
- put all files found inside cdrecord package in your %PATH%
- copy the original Windows 95 installation CD-ROM to your hard-drive
- copy the boot image (e.g. named win95.ima) to the top directory of the copied CD
- issue the magic command:
mkisofs -J -r -b win95.ima -o win95.iso *. You can either read the manual on take my word for it that:-Jmeans joliet extensions (I don't know what those are either but you need them for bootable CD)-rmeans "proper ridge extensions" (see comment above)-b win95.imameans creating a bootable CD and booting from the floppy disk whose image is inwin95.imafile-o win95.isomeans: "the resulting ISO image should be in win95.iso file"*means: add all files (recursively) to the CD image