From: www.itworld.com

Win4Lin vs. VMware

by Nicholas Petreley

March 19, 2001 —

 


Shortly after I wrote about Win4Lin a few weeks ago, I was bombarded with questions from readers asking how it compares to VMware. Win4Lin is a product that allows you to install and run Windows 95 or Windows 98 under Linux. With VMware, you can also install and run various other versions of Windows under Linux. (See Resources for links to both.)



They may sound similar, but I don't believe a comparison between the two is appropriate, at least not as the products stand. Currently, Win4Lin has one specific purpose: it provides a fast, stable Windows environment under Linux so that you can run Windows productivity applications without having to sacrifice Linux as your default environment. In contrast, VMware is a general-purpose virtual machine that, among other things, runs Windows productivity applications under Linux.


In other words, VMware goes way beyond the capabilities of Win4Lin. In addition to Windows 95 or Windows 98, you can run Windows 2000 in a virtual machine under the Linux host operating system. VMware is also available for Windows; with that version, you can run Linux in a virtual machine under Windows. You can also run other operating systems, such as FreeBSD, in the virtual machine. And you can run multiple virtual machines simultaneously.

How we tested


Hardware


Processor: Athlon 1 GHz

Memory: 256 MB PC133 RAM

Mass storage: Two Maxtor ATA 66 IDE drives (one 20 GB drive and one 40 GB drive)


Platform


Operating System: Storm 2000 (Debian 2.2)

Kernel: 2.2.17 (custom)

Configuration: Debian system has been upgraded to latest Woody unstable release. All partitions have been formatted as Reiserfs.


Testing Methods


Software: VMware 2.0.3, Win4Lin 2.0, Windows 98 SE,
Microsoft Office 2000 Premium, Netscape Communicator 4.76,
Internet Explorer 5.5, Microsoft Media Player


Clearly, many of my readers are enamored with VMware due to the gee-whiz factor of being able to run one or more operating systems in isolated virtual machines on top of the host operating system. I confess it's a pretty cool experience to boot up VMware in a Linux window and then jump into the virtual BIOS setup screen or watch it count up the virtual RAM. But once I get beyond the coolness factor, I don't see any compelling reason to use VMware in preference to Win4Lin, at least for the reasons most Linux business users would use Win4Lin.

Reluctant comparison

In the first place, Win4Lin is clearly much faster than VMware. Granted, Windows under VMware is perfectly usable on my system, but Windows under Win4Lin not only runs faster than Windows under VMware, it seems to actually run faster than Windows alone.


My readers tell me there's a good reason for that: it's the filesystem. The default ext2 (second extended) filesystem for Linux is supposedly faster than the FAT16 or FAT32 filesystems that Windows 98 uses. I'm using Reiserfs, which performs even better than ext2, so perhaps I saw even a greater benefit.


This difference in the way files are handled may also be one reason why Windows runs faster under Win4Lin than on VMware. Win4Lin installs Windows as separate files on the Linux filesystem (as I said, in my case it's Reiserfs), so it fully benefits from that filesystem. VMware creates a virtual disk on the filesystem and installs everything on that virtual disk. I'm just guessing, but I suspect there is some extra overhead involved in accessing files on the virtual disk.


VMware does give you another option, though. Instead of creating a virtual disk and installing Windows from scratch, you can simply point to an existing partition where Windows is already installed. I didn't have much success with VMware in that case, however. For some reason, Windows refused to install and properly configure the utilities necessary to run under Linux in anything greater than a 640 by 480 graphical window.

Gamey behavior

Some readers wanted to know if they could run Windows games under Win4Lin or VMware. I confess I can't imagine why anyone would want to run Windows games on Linux when it seems much more desirable to create a Windows boot partition specifically for games. I don't know about you folks, but I work and I play games. I generally don't do both at the same time. Booting to Windows to play a game that doesn't run on Linux seems like a fine trade-off to me.


LinuxWorld.com links

LinuxWorld.com home

Best of LinuxWorld.com

The Legacy Files

The Penguin Brief

Version Control

Linux links

Linux forums


But I'll answer the question, even if reluctantly. Win4Lin doesn't support DirectX, which most games require, so you can't run most games in Win4Lin. VMware does support DirectX, as does Wine (see Resources for a link), the latter being yet another method for running Windows applications in Linux. Therefore, some 2D games may be playable on VMware or perhaps Wine. But 3D accelerated games will run like a slide show.


While I'm on the topic of what you can and cannot do, neither Win4Lin nor VMware support DVD drives or can write to CD-R or CD-RW drives.


Finally, for the most part, Windows under VMware runs like Windows anywhere else. You can configure Windows networking, for example. You can't do that with Win4Lin. As I mentioned in my column on Win4Lin, that didn't really matter to me, but I can certainly sympathize with people who want to operate that way. If you don't want to compensate for the lack of Windows networking by using things like NFS shares in Linux, VMware is for you.

Installation

VMware and Win4Lin come out about even for installation. The initial installation of Win4Lin is harder than VMware, even though VMware needs custom modules for your Linux kernel. In my case, the installation program asked a few questions and then compiled the added modules specifically for my kernel.


Win4Lin isn't quite as easy. Unless you're using the plain vanilla Linux kernel that came with your distribution, you have to download a kernel patch, apply it, and rebuild the kernel yourself. It's not easy to find the place on the Win4Lin site where you can get the patches and instructions on how to use them, so I've included the URL in the Resources section.


But once I had Win4Lin installed and Windows installed on top of that, I found it easier to manage Win4Lin than VMware. VMware requires you to take additional steps to define an audio device, and to install tools necessary to make Windows under VMware show up in greater resolutions than 640 by 480 pixels. But taken as a whole, I'd rate the two about even on installation.

The bottom line

So the comparison really comes down to the purpose for which these products were designed. Admittedly, there are reasons why you may want to have the true virtual machines that VMware provides. You might have to provide technical support for a product that runs on multiple operating systems. With VMware, you could have that product running on several of your supported operating systems on a single machine. Having several operating systems running simultaneously on a single box is also useful for testing purposes. But surely those are the needs of a rather small audience, aren't they? And such needs don't at all seem to support the assumption that VMware competes with Win4Lin.


As another example, suppose you want to use a single machine to provide services unique to Linux and Windows. You could run Linux as your host operating system and set it up to be your firewall and mail server. Then you would layer Windows 2000 on top of that in order to provide services such as Microsoft SQL Server and the IIS Web server. Provided you set up VMware properly and give it enough resources, I can imagine that this single machine would provide both Linux and Windows services simultaneously and well.


You could do that. Why you would want to do that I can't answer. VMware costs $299 for the download version, which is cheaper than buying a new machine. So perhaps the above scenario would be desirable if you were really strapped for cash, or if you simply wanted to test the combination without committing it to production.


But you can toss together a very healthy machine these days for well under $1,000. And when you do so, you get full support for all peripherals, including DVDs. And a separate machine should yield much better performance. Finally, in the above example, you could easily set up the Linux box as a headless machine (no monitor), which saves you even more money. So I'm not sure that the price differential is as great as it might seem.


Nevertheless, VMware has won numerous awards, and there seems to be no end of praise for it in the press. I will gladly add to that praise, because I believe VMware deserves every technical award it has received. It is, indeed, a technical marvel. Bravo to the folks at VMware.


But if all you want to do is run Windows office applications without having to sacrifice Linux as your desktop operating system, I just don't see the point of running VMware. VMware 2.0 is $299 minimum for commercial use. Win4Lin 2.0 is a minimum of $59. Win4Lin seems easily the better choice in terms of price and speed.

Resources