First, it was dual...triple boot loaders. Now, virtual machines (VM) are getting popular.
In my programming class, we use VirtualBox loaded with Linux guest (*.ova file).
Then, I got curious, and went ahead to install guests Mac OSX (Snow Leopard) and Windows 7. All 64-bit.
Why Win7? VirtualBox is good for testing suspicious programs. I do not have any idea why I needed a OS X guest, except that it is better than none. The virtual Snow Leopard runs a little slower than I would like, so it is unlikely that I would play with it much.
Windows 7 was easy (The catch is the networking settings: Choose Bridged Adapter, select the right name, right Advanced selections: i.e. Promiscuous Mode: Allow VMs, Check Cable connected). I shall only describe how I installed the OS X, thanks to lifehacker and others:
After setting the environment for OS X in VirtualBox (Choose OS X 64-bit, I cannot be sure of the option: Snow Leopard 64bit), Got to the guest's Settings -> System in the left pane and uncheck Enable EFI.
Then select Storage, right below System. And in the next panel, select EMPTY under OSX.vdi. Then on the right panel, mount the OS X ISO file.
Run the guest. When screen shows something about pressing F8, press F8 to type: -v so that we can see error messages, not that there should be any.
Virtual OS X should load from the virtual image. Then, in the OS X, go to menu->Utilities->Disk Utility. Highlight 20GB VBOX HARDDISK, and Erase (format) the drive from the right panel. Exit Disk Utility. Now we can install OS X on the virtual harddisk. But before install, click on Customize button, and for:
AMD Users check:
Any Updates included at the top.
Drop down Kernels and choose Legacy kernel.
AMD option below System support.
Intel Users check:
Any Updates included at the top.
Drop down bootloaders and check the newest Chameleon.
Drop down Kernels and choose Legacy kernel.
Install. After that, when it starts counting down to restart, press the right Ctrl key. Click on Devices at the top to unmount ISO image. Then go to Machine > Reset. Next you'll see the Chameleon loader and then OS X will begin to boot. (In my case, I get a bunch of errors when OS X was shutting down - but it still boots fine). Done...but, there's this issue with resolution & audio (I regret not checking the audio first before I applied the fix: get the VirtualBox ICH AC97 Audio Driver.zip and install it in Mac).
For higher resolution than 1024x768, go to Finder->Extra->edit com.apple.Boot.plist (open with TextEdit):
<key>Graphics Mode</key>
<string>1280x1024x32</string>
right above <key>Timeout</key>
Then, use Save As to save the file in Desktop (Apple does not allow changes in Extra directly). Uncheck the *.txt thing and be sure to save as the *.plist file as Apple tends to remove the extension. After that, drag the file from Desktop to Extra folder to replace the original file. Password will be prompted for authorization. Reboot and higher resolution is used by default.