Mac OS X in Linux via VirtualBox (as guest OS)

I recently [installed](http://blog.nguyenvq.com/2010/12/01/virtualization-with-virtualbox-running-windows-inside-linux/) a Windows virtual machine on my Linux laptop. I wanted to test out a virtualized Mac OS X machine via VirtualBox as well (just in case I ever needed to do something that can only be done on a Mac). My main references are [this post](http://www.sysprobs.com/mac-os-guest-virtualbox-326-snow-leopard-1064-windows-7-32-bit) and [this post](http://randosity.wordpress.com/2010/06/21/running-mac-os-x-in-virtualbox/). Although they virtualize on a Windows host machine, it also worked on my Ubuntu 10.10 host laptop.

Things I needed:

1. A Mac OS X 10.6 (snow leopard) installation dvd (RETAIL version, not the one that comes with the Apple machine). Buy a copy and rip it to iso.
2. [nawcom ModCD](http://prasys.info/2010/10/nawcom-modcd-v0-3-is-out/) to be able to boot the installation DVD. The EFI that came with VirtualBox and the Empire EFI from the [first post](Recently) did not work.
3. The latest [myHack](http://osx86.sojugarden.com/installer/). I used version 1.1 (r123). Install this before the Apple update.
4. Mac OS X 10.6.5 [Update](http://support.apple.com/kb/DL1324). Don’t do OS upgrade via the Automatic Updater, and don’t update without consulting the [myHack](http://osx86.sojugarden.com/installer/) website; things can break.

Some notes to myself:

1. When creating the hard drive, use “dynamic” and just make it as big as possible. I originally did 20gigs and had to re-do to 100gigs. Since it is dynamic, you won’t take up space on your host system until you the space get filled up on the guest. Although there [is](http://ubuntuforums.org/showthread.php?t=634880) a way to resize the hard drive on a Windows guest, I wasn’t able to do so on the Mac guest (different filesystem and there is that boot loader issue). Looking back in hindsight, I should’ve just made it 500gigs and move the virtualization on an external disk if I ever reach that (I highly doubt it!).
2. To access files on the host, set up [samba](https://help.ubuntu.com/10.04/serverguide/C/samba-fileserver.html) on the host and connect to it on the guest.
3. I used [dmg2img](http://ubuntuforums.org/showthread.php?p=3115582) to convert dmg to iso (when needed).
4. Follow the [second post](http://randosity.wordpress.com/2010/06/21/running-mac-os-x-in-virtualbox/) to change the resolution (modify `/Extra/com.apple.Boot.plist` and run `VBoxManage setextradata “MacOSX64″ “CustomVideoMode1″ “1366x768x32″` on the host). “1366x768x32″ is the resolution on my Toshiba Portege R705 running Ubuntu 10.10. Now I can go fullscreen.
5. Sound most likely won’t work. I have no use for it anyways.

Good luck. I hope I won’t have to use it much, but it’s nice to do everything in one machine, running inside of Linux (as opposed to having multi-boot).

One comment

  • Pingback: Compile R on Mac OS X

  • Leave a Reply

    Your email address will not be published. Required fields are marked *

    *

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>