While some of us in the Linux community have sworn off
the use of Microsoft Windows applications, the reality is there are a number of Win32 applications that don’t yet have stellar Linux equivalents. And even when there is a strong Linux option — with word processing for example — trying to work with Windows’ varied and evolving data formats can be a bit of a headache.
The Woes of Emulation
and API Mapping
Traditionally, most non-Windows operating systems have tried to achieve Windows compatibility through emulation. Unix variants and Linux have had Windows emulators such as Wabi and Wine available for some time now. But these emulators offer only limited 16-bit application compatibility. Furthermore, any well-founded effort to reverse-engineer the Win32 Application Programming Interfaces (APIs) to function under an environment like Wabi would be like chasing a moving target, as Microsoft frequently adds new API’s and offers almost no documentation as to how they work internally. An effort to map and reverse engineer the Windows API function calls has already been tried on OS/2, with its Presentation Manager windowing system. Its founders eventually abandoned the project in despair.
Emulation and API mapping are not the only ways to approach Windows compatibility. A far more radical solution is to run the actual Windows 98/ Windows NT/ Windows 2000 OS under Linux with all of the Windows applications running in a virtual machine. Sounds crazy? IBM mainframes have been doing similar things using system partitioning for at least 20 years with the IBM VM operating system. And OS/2 Warp was able to execute multiple virtualized DOS/Windows 3.1 sessions with their own unique configuration settings. To some extent, Windows NT and Windows 98 also do this with DOS sessions, but not with the finesse and memory protection that OS/2 achieves.
Doing it the VM Way
Virtually Everything: VMWare lets you run different operating systems under Linux.
Enter VMWare 1.0 for Linux. VMWare brings virtual machine technology on the PC one step further — instead of virtualizing the DOS environment itself, VMWare virtualizes an entire Pentium-class PC: BIOS, SVGA video, Sound Blaster, communication ports, network interface, IDEdrives and all under Linux (VMWare’s developers are working on a Windows NT version as well). This means that not only can you run Windows 98 under Linux, but also NT, Windows 2000, other Linux distributions, and other variants of Unix like FreeBSD and BeOS. And it all works perfectly.
Installation is fairly easy — simply download the 2.5MB VMWare archive from the VMWareWeb site, open a terminal session, login as root, and run the Perl installation script. You will also need to register for a license code at the VMWare Web site and put a registration file in .vmware, a hidden directory which resides in your home directory.
The script also installs a virtual networking device driver (vmnet), which allows your virtual machines (VMs) to communicate over your LAN or dialup connection via bridged Ethernet networking. Since virtual networking in VMWare runs at the MAC (Media Access Control) layer, any protocol that runs over Ethernet can be used, even if it isn’t supported natively in Linux. The virtual network interface card in VMWare emulates the AMD PCI networking chipset, which is supported by many operating systems, including Windows 98, Windows NT, FreeBSD, Linux, SCO UnixWare and Solaris.
Additionally, you might want to install VMWare’s special X server, which improves 2D video performance because it allows the VM to talk directly to the video buffer via DVI (Direct Video Interface). If you’ve got an older version of XFree86, you’ll probably want to upgrade to the latest version, or consider purchasing an accelerated X offering, like MetroX from Metro Link.
Once you install the VMWare application, you run VMWare’s Configuration Wizard, which prompts you in Windows-Wizard fashion to create your first VM. By default, VMs are created as Virtual Disk files. These are large binary files that are stored on Linux partitions and contain the bit-images of system partitions. With version 1.0 of VMWare, you can only virtualize IDE disk drives and ATAPI CD-ROM units, although VMs can still be hosted on PCs with SCSI-based equipment. VMs can also be created on “raw” disk partitions (unallocated free space on your hard disk) for an additional performance boost, but it’s a less flexible way of managing your VMs and it is not portable.
Interestingly, virtual disk files can be copied to removable media like Jaz drives and CD-ROMs, and can be run on any computer running VMWare, so you can take your entire Windows or Unix environment with you wherever you go. Virtual disks are also OS-neutral, so if you run VMWare for Linux at home, you can run your VMs on VMWare for Windows NT at work, and they run exactly the same on both platforms.
Once you’ve created the virtual disk file for your VM, you boot your virtual machine — literally. VMWare comes with a complete Phoenix Plug -and-Play BIOS, and if you boot your VM in full-screen, you’ll think you actually hit the reset switch on your PC, and you can watch the RAM count up and the IDE devices initialize. Pretty spooky.
If you have a bootable installation CD for your OS and a CD-ROM drive that supports bootable CDs, you can install and boot from the CD within the newly created VM. We were able to do this with Windows 98 Second Edition, Windows NT, Linux and FreeBSD installation CDs. Otherwise, you will need to create boot floppies. Once you’ve got the basic OS installed on your virtual disk, you can download VMWare’s tools diskettes for Windows NT/98 and Linux, which improves storage device mapping compatibility and video performance within the VMs, and provides high-res virtual SVGA graphics drivers. Currently VMWare only supports Virtual SVGA within NT, Windows 98 and Linux OSes, with other OSes like FreeBSD and BeOS in the works.
But like anything that doesn’t run natively, there’s always a tradeoff — overhead and performance. Our basic VMWare test system was a modest one, a 400Mhz Celeron clone with 128MB of SDRAM, RIVA TNT 16MB Video accelerator, an 10GB fast ATA 7200RPM hard drive running Red Hat Linux 6.0 and Caldera OpenLinux 2.2. The VMWare configuration wizard allows you to create virtual machines with as many resources as you can afford — but for our tests, we created Windows NT 4.0, Windows 98 and FreeBSD 3.2 VM’s with 64MB of RAM and 2GB of hard disks. We discovered that the VM’s were more RAM-intensive than CPU intensive, and application performance was relatively snappy — however, we found Windows NT 4.0 runs better in a VM than Windows 98 does, since it’s
a true 32 bit OS and Windows 98 “thunks” many 32-bit processes to 16-bit ones.
VMWare is a great product. It is an excellent development tool for isolating OS crashes and solves many of the age-old problems of software compatibility under a foreign operating system — but keep in mind that VMWare shouldn’t be used for throughput intensive applications, like for database servers or for 3D video rendering, as it doesn’t “run on the metal” like a native OS would. And make sure you have plenty of system resources — these days, RAM and processor upgrades are relatively cheap, so take advantage of this if you want to use this product at its fullest.
In a Nutshell
* It works!
* Painless install
* Not for I/O intensive applications
* Requires significant system resources
Jason Perlow is a freelance writer, computer consultant and a Linux enthusiast based in New Jersey. He can be reached at email@example.com.
Fatal error: Call to undefined function aa_author_bios() in /opt/apache/dms/b2b/linux-mag.com/site/www/htdocs/wp-content/themes/linuxmag/single.php on line 62