How to install Mac OS X 10.7.3 on VirtualBox?

UPDATE: For installing Yosemite on VirtualBox, you can check that link.

The market of computer applications is moving day by day from desktop to web and now is moving to smart phone and tablet. Although Android is the most popular operating system on mobile devices but last month two big customers of my company (I work there, not the boss 🙂 ) decided to use iOS for their mobile devices. That means the softwares should be ported, maintained, developed further and supported on iOS. On the market iOS is also the leader on tablet area with its Ipad series. With all of these reasons, I , a .Net/Java programmer, decide to learn programming with Objective C on iOS as my secondary skill.

Like any other programming language, I’ll need a IDE (Integrated Development Environment) but it’s too expensive for me to buy a Macbook running Mac OS. So I just manage to install a MAC OS on VirtualBox and learn Objective C from that fake MAC OS. In this post, I would like to describe step by step how I get a MAC OS 10.7.3 running on VirtualBox. It’s really simple, it just depends on which you download from Internet :).

1. Go to homepage of VirtualBox and download its latest version appropriate with your host OS https://www.virtualbox.org/wiki/Downloads . Install it.
2. On the homepage of VirtualBox, download “VirtualBox x.x.x Oracle VM VirtualBox Extension Pack”.
3. Open VirtualBox, menu File –> Preferences

VirtualBox File Preferences

4. On VirtualBox – Settings dialog –> Extensions –> Add Package

Extensions Add Packaged

5. Enable Hardware Virtualization Technology (VT) in your BIOS. You must be sure that your processor supports VT and 64 bits. Without these prerequisites, the virtual machine won’ work.

Virtualization Technology Enable

6. The pre-configured Mac OS X installation image. This image is the most important part during the installation. Any ordinary installation DMG file or disc you download from Apple or any torrent sites won’t work. This pre-created image is configured to be booted in VirtualBox. The credit of image, which I use in this post, belongs to souldevteam. To download this image, you can choose either torrent or direct link from links below.
Torrent:
Main: http://www.souldevteam.net/downloads/mac-os-virtualbox-images/mac-os-x-lion/mac-os-x-lion-10.7.3-virtualbox-image.torrent
Mirror 1: http://www.mediafire.com/?iftvpgrokvj8ow4
Mirror 2: https://www.box.com/s/b99a70cb61a31f9632f2
Direct link:
http://pastebin.com/raw.php?i=tqu4BEEB

7. It’s about 3,5 GB. When the download is finished, extract .exe file to any folder on your computer, you’ll have 4 files “HackBoot Mod.iso”, “Mac OS X Lion.vbox”, “Mac OS X Lion.vbox-prev” and “Mac OS X Lion.vdi”.

8. In Virtual Box, menu Machine –> Add. Browse to “Mac OS X Lion.vbox”

Machine Add

9. A new virtual machine (Mac OS X Lion) will be added into VirtualBox Manager. Start it.

Mac OS X Lion Virtual Machine

10. At boot screen choose Macintosh and press Enter

Mac OS Boot Screen

11. Open Terminal check its version with sw_vers command because there is still an error with this pre-configured image. When you click on Apple icon –> About This Mac, the virtual machine will be crashed.

Mac OS Version Terminal

12. Basically the installation process is done. But one of the most annoyed thing when using Mac OS X in virtual machine is keyboard layout. We can’t use Command+C, Command+V to copy and paste data with clipboard. You know, there is no Command key and some of other special keys of Mac in Windows keyboard. I thought of buying a universal keyboard working on both platform Windows and Mac. There’s some kinds of them on market but my current keyboard still works perfectly. Therefore a soft solution will be better for me. To fix this problem, I go to homepage of DoubleCommand, download it http://doublecommand.sourceforge.net/ and install it. After installation, you’ll find DoubleCommand in System Preferences

System Preferences DoubleCommand

13. Click on DoubleCommand icon to open DoubleCommand windows, configure it as you like and remember to save all your changes by clicking on Save System or Save User. My sample settings are like image below.

DoubleCommand Settings

14. Now we have a Mac OS in hand. Let’s go to Apple developer homepage http://developer.apple.com/programs/register/, download Xcode and iOS SDK. The first application “Hello World” is waiting for you. 🙂

15 thoughts on “How to install Mac OS X 10.7.3 on VirtualBox?”

  1. Thanks for this write up. I just built a new desktop that is much faster than my aging MacBook Pro. It’ll be nice to run Xcode on a core i7 even if it is a virtual machine.

  2. @Chris: Great, gratulation and happy coding with your fake MAC :). I think RAM is also important when running a virtual machine. The more RAM VM has, the faster your VM runs.

  3. I would recommend MonoTouch (.NET) and PhoneGap (HTML/CSS/Javascript) instead of pure object C.

  4. @nhc1987: Thank you for your hint. I’ll consider if MonoTouch can fullfill our requirements. It seems to be good solution.

  5. i just have a problem in step 11 after i choose apple icon, oracle vmware show me this message “A critical error has occurred while running the virtual machine and the machine execution has been stopped ” and actually i can’t open the terminal from this step.

  6. Thank You for your reply but i want to tell you that i’m using windows 7 and Oracle vmware so whichj terminal or cmd you want to use

  7. @hend: On Step 12 I already give a solution to map the command key to control key in Windows 7. Use it to simulate the command key.

  8. Hello.

    The configuration it´s ok, but when i try to restart my VM it doesn´t work.

    I try restart the VM Macintosh and obtain this error:

    System uptime in nanosecconds: **** (the numbers randomly change) nothing working and crash.

    When foce the VM Machine to reboot the installation procedure init again.

    What i need to do or i missing someting else in order to succesfully work my VM?

    Thaks

  9. @tona: Try to search the error in Google and find out if someone has already solution. I don’t get this error during installation therefore I can’t help you.

Leave a Reply

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