Adding a COM port to a Windows Fusion VM on Mac OS X

This article applies to the following:

  • Mac OS X 10.8.2
  • VMWare Fusion 5.0.2
  • Windows XP SP3
  • RadioShack USB-to-Serial Adapter
  • Macbook Pro Retina

Install the Mac OS X drivers:

  • Download http://www.xbsd.nl/pub/osx-pl2303.kext.tgz and unzip to a temporary directory.
  • Open a terminal window and execute the following commands:

  • cd /path/to/osx-pl2303.kext
    sudo cp -R osx-pl2303.kext /System/Library/Extensions/
    cd /System/Library/Extensions
    sudo chmod -R 755 osx-pl2303.kext
    sudo chown -R root:wheel osx-pl2303.kext
    sudo kextload ./osx-pl2303.kext
    sudo kextcache -system-cache

  • Launch System Preferences and verify the drivers loaded properly. Under Network, you should see a device labeled PL2303.

Since Mac OS X and Windows can’t use the device at the same time, you’ll need to unload the kext. Open a terminal window and execute the following command:

sudo kextunload /System/Library/Extensions/osx-pl2303.kext

Note that you’ll need to repeat this command if you reboot your MacBook.

Install the Windows drivers:

  • Download the 260-0183 RadioShack driver from the RadioShack support site. Extract the files to a temporary directory.
  • Use the VMWare menu to connect the Radio Shack USB Device to the VM. Windows will launch the New Hardware applet. When prompted, instruct Windows to install the driver from the temporary directory containing the extracted driver files.
  • Launch Device Manager and verify the RadioShack device appears under Ports (COM & LPT).

Optimizing The Windows Defragmentation Process

When I switched to Mac, the thing I missed least of all was having to periodically defrag my hard drive. Since I’m currently doing Windows development, I’m back to running Windows in a VM and made the mistake of not defragging my Windows drive for several months. After running the built-in defragger off and on for several days with no end in sight, I decided to back up and try a different approach.

  • I used msbuild /t:clean to remove all of the build artifacts for my Visual Studio projects.
  • I used cygwin‘s rm command to destroy everything in C:\Documents and Settings\\Local Settings\Temp. You could use the delete functionality of Windows Explorer or the Windows erase command, but I find rm to be much faster when there are 1000’s of files. If you use Windows Explorer, just make sure you empty your trash bin before you start the defragger.
  • I used rm to destroy most of the files in C:\WINDOWS\Temp.
  • I installed Smart Defrag.

Not only does it look like it’ll be done by the end of the day, but Smart Defrag‘s automatic functionality should keep future fragmentation down to a minimum.