Hack 72 Running Windows on and from a Mac

figs/expert.giffigs/hack72.gif

If you just can't do without running a piece of Windows software, there are a couple of options open to you: remote control and virtual PC emulation.

Sharing files between the Mac and the PC is good, but not enough for me. It would be better to be able to run my favorite PC applications on the Mac. While running a Windows application directly on the Mac is not technically possible, there are a couple of ways that come close to that. The first is to pump out the display of a PC to the Mac. Microsoft provides the Remote Desktop Connection (RDC) (http://www.microsoft.com/mac/DOWNLOAD/MISC/RDC.asp) for that purpose (see Figure 6-15). The second way (discussed in the next section of this hack) is to run a software emulator that emulates the Windows operating system.

Figure 6-15. Remote Desktop Connection application
figs/xh_0615.gif

The RDC allows you to hook up your Mac to the network and control your Windows system remotely. To test-drive RDC, I downloaded it and used it to connect to my Windows 2000 Advanced Server. To use RDC, you need to run Terminal Services on the Windows machine before the remote desktop software can connect to it.

In the RDC connection window (see Figure 6-16), you can specify the login information, screen size, key mappings, and so on. You can use the IP address, fully qualified machine name, or netBIOS name to connect to the Windows machine.

Figure 6-16. Remote Desktop Connection window
figs/xh_0616.gif

As RDC is dependent on Terminal Services, you can connect to all Windows versions that support Terminal Services, such as:

  • Windows 2000 Server

  • Windows 2000 Advanced Server

  • Windows XP

If it connects successfully, you should see the familiar Windows screen, as shown in Figure 6-17.

Figure 6-17. Windows on Mac via Remote Desktop Connection
figs/xh_0617.gif

The nice thing about RDC is that you can create multiple instances of Windows using a single Windows machine. Although RDC will make only one connection at a time, there is a trick you can use: duplicate the Remote Desktop Connection application (see Figure 6-18) and use the original for one session and the copy for the other.

Figure 6-18. Duplicating the Remote Desktop Connection application
figs/xh_0618.gif

In Figure 6-19, I have two separate instances of Windows 2000 Advanced Server running. One is running Visual Studio .NET, and the other is running Adobe Acrobat.

Figure 6-19. Two instances, two Windows machines
figs/xh_0619.gif

Performance-wise, RDC is relatively fast. It translates keystrokes between the Mac and PC efficiently, and I have no problem in using my regular Control and Alt (using the Option key on the Mac) keys when controlling my Windows PC. Running CPU-intensive applications like Visual Studio .NET has no effect on the performance on the Mac, as all the processing is done on the Windows PC itself. I also have no problems running regular applications like Word, PowerPoint, Adobe Acrobat, and so forth.

However, when two or more RCS instances of Windows are created, the performance degrades drastically. But this is really the problem with the Windows server, as multiple clients connecting to the Terminal Services chalk up a lot of resources. Nevertheless, my notebook equipped with 512MB RAM and a 1GHz processor does not seem to digest the workload well.

72.1 Virtual PC

If you don't have a spare Windows PC to connect to or if you are on the road with only your Macintosh notebook, another option is Virtual PC from Connectix (http://www.connectix.com/). Virtual PC emulates the PC's CPU and hardware so that Windows, Linux, and other operating systems can run on it.

Virtual PC is available in two flavors: with or without an operating system (to be fair, the latter includes DOS). If you already have an unused license for the operating system you plan to use, you can buy Virtual PC with DOS for $129 from the Connectix store (http://www.connectix.com/shop/) and install your own operating system. If you choose electronic delivery, you can download it and install it right away (the disk image is about 12MB). After you download and install Virtual PC, you'll need to visit the Connectix support site to check for any updates. At the time of this writing, 6.0.1 was the most current version.

If you purchased an operating system with Virtual PC, you'll be able to start working with it right away. If you purchased the version that includes only DOS, you'll need to install Windows. For instructions on installing another operating system, see the documentation in the /Applications/Virtual PC 6/Extras/Installing Other OSes/ directory.

Windows XP runs well on Virtual PC (see Figure 6-20), but you need to optimize it heavily to get the best performance. Plenty of memory is suggested (256MB is good for Windows XP Professional), and you should consult the Optimizing Windows XP Professional and Home Edition For Connectix Virtual PC document, available at http://www.connectix.com/support/library.html. Aside from the tips in that document, we suggest aggressively diminishing the number of services you are running. TechSpot has a good article on this topic (http://www.techspot.com/tweaks/winxp_services/), as does ExtremeTech (http://www.extremetech.com/article2/0,,5155,00.asp).

Figure 6-20. Windows XP inside Virtual PC
figs/xh_0620.gif

72.2 Virtual PC and RDC Performance

So how well does Windows XP run under Virtual PC and RDC? To find out, we chose a CPU and disk-intensive test: building Microsoft's Shared Source CLI (http://msdn.microsoft.com/net/sscli). We tested it on an 800MHz PC and a 600MHz dual-USB iBook running various Mac OS X versions and Virtual PC 5.0 (we weren't able to test 6.0 in time for this book).

Table 6-1 shows the results of our test.

Table 6-1. Virtual PC and RDC performance test results

CPU

MHz

Real RAM

VM RAM

Mac OS

Duration

Pentium III

800

256

NA

(RDC from 10.2.1)

0:15

Pentium III

800

256

NA

NA

0:15

G3

600

640

256

9.2.2

1:38

G3

600

640

256

10.1.5

2:02

G3

600

640

256

10.2.1 6D52

2:03

G3

600

640

128

10.2 6C115

3:09

G3

600

640

256

10.2 6C115

3:27

The CPU column lists the CPU of the machine running the test, and the MHz column shows its speed. Real RAM is how much memory is installed inside the system, and VM RAM is how much was allocated to the virtual machine (in the case of the Pentium running Windows XP, this was not applicable). The duration is shown in hours:minutes.

The abysmal performance under the initial release of Jaguar (10.2, build 6C115) is due to bugs that were fixed in the 10.2.1 release. So, if you're going to use Virtual PC with Jaguar, make sure you run the Software Update in System Preferences to bring your system up-to-date.

72.3 Our Verdict

From the times, you can see that running applications on a real PC is a huge win; 10.1.5 and 10.2.1 are very close, but running under 9.2.2 shaves about 25 minutes off the build. Still, the performance compared to a real PC is disappointing. And in everyday use, Virtual PC does not feel terribly snappy. For example, launching Visual Studio .NET takes 1 minute and 19 seconds before the start page appears using Virtual PC under Jaguar 10.2.1. Compare that to 28 seconds on the Pentium III machine. In fairness, once an application launches under Virtual PC, we've found that it performs adequately.

You can get by with Virtual PC, especially if you are willing to make some concessions. For example, instead of using Visual Studio .NET, you could use Notepad or another lightweight editor for editing .NET programs, and compile them with the command-line compilers (cl, csc, vbc, and jsc). With these kinds of adjustments, life under Virtual PC is not so bad.

Virtual PC is the best bet for people who want to take their Macintosh on the road with them. But as 802.11b access points become more prevalent, and 3G networking takes off, it would not be unreasonable to use a Virtual Private Network connection in conjunction with the Remote Desktop Client to access a Windows server on a home or corporate network.

?Wei-Meng Lee and Brian Jepson