Why Apple's virtualization technology in Leopard might not be what you expect…

Since the release of Boot Camp back in February, the rumors have been flying on the future of running Windows on a Mac. When Boot Camp was released, I couldn’t wait to try it, and I wasn’t disappointed with the results. There were some slight drawbacks to installing Boot Camp on my MacBook Pro, but they were mostly hardware related (not having a second mouse button, or a lack of a delete key to control-alt-delete). Fortunately there are software fixes for most of these and I’m now able to use Windows on my MacBook Pro without connecting any additional hardware.

A lot of people believe that Apple will take the next step with virtualization in Leopard, and I tend to agree, but I don’t think the next step Apple takes will be the ability to run Windows apps under Mac OS X natively, or even a Parallels type of virtualization where Windows will be run in a Window. Let’s discussion the options, shall we?

Option #1: Boot Camp is included in Leopard verbatim, users can boot into either Windows or Mac OS X.

This is the easiest path for Apple to follow, because most of the work is already done. Boot Camp works, and it works well. All that would be needed is continued driver support in Windows and some tighter integration between Boot Camp and Mac OS X. I don’t expect Apple to take this path however. Apple isn’t about doing things the easy way. The Apple mentality is to do stuff the right way, and I don’t think this is it. Granted Boot Camp was just released, and a lot of work would have to be done before any of the options below would be realized. Apple might just run out of time before the Leopard release and be forced to integrate Boot Camp for the time being. If this happens though, I think they’ll be working overtime to improve virtualization in Leopard++.

Option #2: Apple licenses Parallels/VMware, users run Windows within a window.

I haven’t run Parallels on my MBP yet, but I do run VMware Server on Linux and it is a very good solution for running multiple OSes at the same time on a single machine. The drawback here, of course, is that you lose some processing power to the emulation environment. Usually this is only between 5-10% per a virtual machine, but if you are running 3 or 4 OS instances, that could utilize up to 40% of a CPU just in overhead. In addition, a lot of Mac users, myself included, have one reason to run Windows on their Mac: games. Thus far, neither Parallels nor VMware have been able to support OpenGL/DirectX in hardware, throwing the option of gaming out the window. And once Vista arrives, hardware graphics acceleration support will be that much more important. Apple is in a pretty good position to add accelerated graphics because they have control over the hardware. They know which GPUs they need to write drivers for, and I think that it’s certainly possible for Apple to go this route.

Option #3: Apple builds upon the Wine project, users run Windows applications natively on Mac OS X.

I think a lot of users would like to see Apple go this way with virtualization in Leopard. How cool would that be to double-click on a Windows application and have it launch on your Mac? There are several problems with this. First, you have a problem set by example. The Wine project has been under development for over 10 years, since 1993. Thus far, Wine only supports a small subset of Windows applications, and often-times the user has to jump through hoops just to get a Windows application working correctly under Wine. This usability is very un-Apple like. Apple, of course, has some very talented engineers in it’s employ along with something the Wine project does not have–a development relationship with Microsoft. Even so, I would find it hard to imagine Apple pulling this off in only a year or two, given how long it has taken the Wine project to get this far.

Furthermore, this option opens a can of worms when it comes to security. When you run Windows in a separate virtual machine, there is some comfort involved. Most likely, even if you were to get a Windows virus (or 100), your Mac OS X files would be safe. With native execution of Windows applications, you no longer have this comfort; Windows apps would have full access to all your Mac files. Apple could possibly build in some form of jail, so Windows would only have access to certain directories on the filesystem. However, I think this would be contrary to the point of implementing virtualization in this native manner. You want the tight Windows integration into Mac OS X, so files in your home directory can be used with applications built for either OS. With such tight integration, you have to compromise security.

Finally, this option is an interface nightmare, comparable to running X11 on Mac OS X . While I love having the ability to run X11 applications on my Mac, the user experience it provides is mediocre. For one, each X application doesn’t really appear to be completely separate like a standard Mac OS X application. Instead, all X11 apps are all running under a single application instance of X11.app. Native Windows virtualization would most likely operate in a similar manner, where a Windows.app application would load to provide a framework for other Windows applications to run. Another interface problem is that Windows applications often have their menus associated with individual windows. This is contrary to Mac OS X applications which have a menu bar for the entire application. Mixing these two interface paradigms is messy at best.

In short, I don’t think this is a very good option and this is probably the least-likely route for Apple to follow.

Option #4: Apple releases Boot Camp 2.0 with hardware partitioning, users run any number of OS instances concurrently on their Mac.

This is the option I think Apple should follow. Hardware partitioning has been around for quite a few years (see IBM’s LPAR, for example), but until recently this technology has been restricted to high-end servers and mainframes. With the upcoming releases of 4 and even 8 core Intel processors, hardware partitioning is becoming a much more attractive option in my opinion.

If you aren’t familiar with hardware partitioning, basically it’s a method to split the hardware resources of a machine between different OS instances. Say you have a 4 processor box with 8Gb of memory. With hardware partitioning, you can define one partition to use 2 processors and 2Gb of memory, while the other uses the remaining 2 processors and 6Gb of memory. Likewise, you could have 4 OSes, each with it’s own dedicated CPU and 2Gb of memory. There is a often limit to how much you can split the resources available. For instance, it can be difficult to write software to share a CPU between two OSes, so it makes sense that you can only have as many OS instances running as you have CPUs available. Likewise you can split memory or disks in the same manner. Each partition can run any OS the hardware will support, so in the case of Mac hardware, you could run a partition for Mac OS X, one for Windows, another for Linux, FreeBSD, Solaris, etc…

In more recent years, VMware has been developing a product called VMware ESX Server. This software runs directly on the hardware, an OS of it’s own if you want to think of it that way. Then virtual OS instances sit on top of VMware ESX. VMware has even tackled the problem of sharing CPUs between virtual machines.

I envision Apple’s Boot Camp being able to do the same thing. Boot Camp would become a miniature operating system in it’s own right, and then load up the OS instances you have configured. Of course, Apple would come up with an easy way of configuring your virtual machines, and an easy way to switch between them. I envision the OS switching to be a lot like Fast User Switching…maybe they’ll even call it Fast OS Switching. Also, since all of your virtual machines are running at the same time, it’s not a problem to use VNC to view your other running OSes in separate windows on Leopard.

We’ll find out Monday morning

All our questions will be answered come Steve Job’s keynote Monday morning at WWDC. I’ll be taking a flight out to San Francisco tomorrow in order to attend. Virtualization, of course, is just one small topic that may be brought up at WWDC this year. This year I’m expecting quite a few announcements coming from Cupertino, and I think it’s going to be a great week. If you are going to be there, drop me a line (mike at gaucho soft dot com) and we can meet up.