Parallels is a paravirtualization product that allows one to run multiple operating systems next to each other in a partially emulated environment. For example, I have at my disposal the following on my Intel Mac:

Basic Parallels Configuration Advice

To run Plan 9 successfully with Parallels there are certain settings you should pay attention to but if you make it look something like the image below you should be in pretty good shape.

Be careful to note that for some reason Plan 9 causes Parallels to crash when using VT-x (Intel's hardware hypervisor support in the Core Duo and Core Solo CPUs). I've not figured this out yet, Linux and Windows XP do ok with this on and actually run quite stably. For now make the Configuration page look something like the following. Be sure VT-x is unchecked!!!

The easiest way to proceed is to get the Plan 9 nightly CD image and to attach it to Paralles as the CDROM drive (no coaster necessary). Change the boot order boot from the CDROM first and then start the VM. Follow the rules for a normal Plan 9 installation.

Plan 9 Configuration for Parallels Compatibility

The two things that took me some trial and error were the video and the mouse. The settings I ended up using were the following:

The scroll wheel, and all the buttons work properly with this configuration and I even have a screen that somewhat matches my cinema display ratio.

Network Card Detection

This requires a kernel patch because Parallels doesn't allow direct PCI scanning of the hardware. (QEMU doesn't have this problem, nor does VMWare apparently, however QEMU is a bit slow for day to day use IMO and VMWare is not yet available for Mac OS X)

For convenience purposes I've put the required files into an ISO image (thanks to jmk and lucho for helping out with this!!).

MD5 - 87fea1f82ca93336ed15bae80883d03b

To use this just configure parallels to use the ISO image as the CD drive and then mount it in Plan 9 using 9660srv and unpack the tgz file it contains in a directory and copy the files to /sys/src/9/pc.

All that's left to do is rebuild the kernel. The kernel mkfile is setup so that only the pcf kernel is going to pick up the new BIOS code. If you want to add the code to different kernel configurations you'll want to copy the bios32 line as is shown in the "pcf" configuration file that comes with the tarball.

  1. cd /sys/src/9/pc
  2. mk 'CONF=pcf'

Installing the new Kernel and Safety First

Now that you have a kernel built you may want to set up your plan9.ini file with a boot menu. This is just in case the new kernel does something zany and you want your old behavior back (though you won't have networking).

I copied this new kernel to a new file to the 9fat partition of my Plan 9 installation. I suggest you do the same.

  1. 9fat:
  2. cp /sys/src/9/pc/9pcf /n/9fat/9pcf.par

I made a plan 9 boot menu in plan9.ini like the following:

menuitem=parallels, Plan 9 with BIOS scanning for Parallels






Finally just do an fshalt and reboot your Parallels PC. You should get a boot menu and be able to select your new kernel.
You should consult the Plan 9 wiki for network configuration. I did have to make a bit of a tweak to the script in /rc/bin/termrc to make the network come up correctly.

#if(! test -e /net/ipifc/0/ctl)
	ip/ipconfig -g ether /net/ether0 >/dev/null >[2=1]

NOTE: I commented out the test for the non-existence of /net/ipifc/0/ctl. This was necessary for me to get termrc to set up my network correctly after booting the my new 9pcf kernel

Feedback and Disclaimer

I don't mind receiving feedback about this document. I hope you find it useful. If you don't I'll try to fix it, but I'm usually very busy with work and friends (let's admit it, I likes my beer from time to time).

David Leimbach