[Guide] Mac OS X 10.7 Lion on VirtualBox with Windows 7 and Intel PC

Finally I managed to find out the working method to install and run latest Mac OS X 10.7 Lion on Oracle VirtualBox with normal Intel computer. The main issue every hackintosh users faced with Lion, is the boot loader to start the installation in normal PC or in any desktop virtualization software. Here I explain and demonstrate step by step method to install Mac OS X 10.7 Lion on VirtualBox in Windows 7 host Intel computer.

Please note this is just for testing and learning purpose only. This method is not recommended for production or long term use, also not all applications will be working on Mac Lion virtual machine as its not recommended by Apple company. Highly advisable to go with original Apple hardware and Mac OS to get the all features and power of Mac.

OK, I demonstrate these steps in my Windows 7 32 Bit computer with Oracle VirtualBox 4.1.2.

My PC Configurations.

Intel Core2Duo 2.66GHz, 3GB RAM on Host and Windows 7 32 Bit Operating System. Hardware Virtualization Technology (VT) is enabled in the host processor and processor is 64 bit ready.

 

What You Need?

1) Oracle VirtualBox 4.1 or later.  (Install the latest VirtualBox extension pack also)

2) The pre created Lion OS X installation disk. This is the very important part in this installation. The ordinary installation DMG file you download from Apple or any torrent sites will not work here. We need to modify some packages and create a new disk which can be booted in VirtualBox or VMware.

For this process, you must have a working Snow Leopard on physical or virtual machine.

The procedure is already covered in Sysprobs clearly, please check this guide on creating bootable Lion OS X disk.

I have used this pre created disk to boot and install Lion OS X in VMware workstation, which is already covered here.

The bootable Lion OS X disk can be created by two methods,

a) Create as a VMDK or VDI file. So this file can be attached to the virtual machine as the first disk to boot the Lion OS. This file can be used in VMware and VirtualBox whenever needed.

Follow the steps here to create bootable Lion OS X VMDK (or VDI) file.

b) Create an ISO file. This is also ideal method to use with all virtualization software and physical computer also.

One of my reader created a nice video on creating bootable Lion OS X ISO file from DMG.

 

3) Minimum 1GB memory to Virtual machine.

4) VT and 64bit supported processor. Check this guide and make sure your processor supports these features.

5) Download the boot loader which can boot the Lion OS in VirtualBox (HackBoot.iso which is uploaded by me, no virus.)

 

How to Install Lion OS X on VirtualBox

1) Double check the VT support and 64Bit in BIOS. If its not enabled, then enable it in BIOS and make sure the host Operating System is detecting it.

Check this guide on how to enable VT in BIOS

2) Create a new virtual machine. OS is Mac OS X , the version should be “64bit”. Do not ask me why, because normal 32bit version did not work on my computer.

Lion OS X 64bit version

3) Set the memory size to 1GB or more than that, 2GB is recommended.

4) Create a virtual hard disk, minimum is 20GB.

5) Here is System settings.

You can deselect the floppy drive.

Make sure ‘Enable IO APIC” and others are selected as shown below.

Remove the Enable EFI option. Leave the ICH9 chipset as default.

Mac OS X 10.7 System Settings in virtualbox

Under Acceleration, “Enable VT-x/AMD-V” and “Enable Nested Paging” should be enabled. If Acceleration tab is missing in your VirtualBox settings, it means VT is not enabled in host computer BIOS.

desktop virtualization software

Processor Settings.

This is slightly tricky. My processor is Core2Duo, so I could select 2 processors. Unfortunately during the installation the virtual machine crashed. I had to put it back to 1 processor (core). If you are using Intel i-series processor you can increase the number up to 4. Increase to maximum and try, if it doesn’t work then try with single core (1 processor).

6) Attach the bootable ISO or VMDK file to virtual machine. In all cases we have to set Hackboot.iso in CD drive and boot with it.

If you are trying to install with bootable VMDK file (which I did), here is the setup.

lion on virtualbox

If you are going to try with ISO file, then you do not need to add the ‘bootabelhdd.vmdk’ file.

7) Start the Lion OS X virtual machine now in VirtualBox.

It will boot with HackBoot.iso file.

If it’s from VMDK file, select the disk by pressing right arrow key in keyboard and press ENTER.

lion boot loader for virtualbox

If you are trying with ISO file, then once the above screen loaded, click on the CD icon of VirtualBox console and browse the Lion bootable ISO file. Wait for 5 seconds and press F5 to refresh the loaded CD, select it and press ENTER to start the installation.

8.) Are you lucky enough? The first screen should start normally. Select the language and continue.

9) If you do not see the virtual hard disk to install, then it should be created in Disk Utility during the installation. Click on ‘Utilities’ and select ‘Disk Utility’.

create partition to install

Press Apply and close the disk utility box. Now you should be able to see and select the newly created partition for installation. Select and begin the process.

10) After the installation automatic restart will be attempted but it will not work here. The virtual machine will stop with following screen which is ready for manual restart.

reboot screen

Reset the virtual machine from menu. It may give a guru meditation error sometimes. Do not worry, just close the virtual machine.

We need to start the VM now, so load the HackBoot.iso file again to CD drive if it was removed during the installation. Incase virtual machine hangs with ash color screen now, again restart.

11) After few initial settings, you must land on working Lion OS X desktop in VirtualBox.

working lion os x in virtualbox

The performance of Lion OS X in VirtualBox is manageable. I could play around with few new changes and applications. Still there are few small drawbacks and issues on method. I will try my best to find out the solutions to fix them in future.

You must consider two issues now,

a) Shutting down and restart the Lion VM- This will not happen automatically. Once the black screen appears (Shown in Step 10), it’s safe to shutdown or reset from VirtualBox menu.

b) About the Mac – If you try ‘About the Mac’ inside virtual machine, it will not work. The virtual machine may crash.

I hope this guide would be helpful to install Mac OS X 10.7 Lion on VirtualBox with normal Intel computer with Windows 7, Vista or Windows XP. I’m NOT sure how this will work on AMD computer. Please someone leave comment about AMD processor.  Your responses are highly expected.

Have fun.

Comments

  1. Sergey says

    Hi all!

    I’ll repeat a question already asked that here!!:

    How to change screen resolution 1024×768 by default after boot with HackBoot.iso?
    After boot in settings i see only 1024×678 option 8((

    My notebook have 1366×768
    Please help me
    Thank you

    • Treps says

      Yeah, I’ve got the same problem with the resolution.
      Does anyone know how to change from 1024×768 to any other?

      I suppose it’s something with the graphical drivers…

  2. Beginner Beginner says

    Not sure if this helps Lion/Virtualbox installs, but on SL 10.6.3 and 10.6.7 under VirtualBox I set arbitrary resolution by first doing this command for VirtualBox (taken directly from Chapter 9 Advanced Topics for VirtualBox)

    http://www.virtualbox.org/manual/ch09.html#idp13645936

    Command to add the new resolution (does not require sudo)

    VBoxManage setextradata “VM name” “CustomVideoMode1″ “1400x1050x16″

    (in my case, “VM name” was replaced by osx – my virtual machine’s name, and the resolution I chose was 1920x1080x32.)

    Start virtual machine (it will still have the prior resolution), then find file com.apple.Plist.boot and change resolution there to the same.

    On next start of my virtual machine, it took on the intended resolution.

  3. red_fraction says

    Is there any way to install the HackBoot.iso on the OSX Lion System like on the previous Snow Leopard Version? It would be a lot more confortable to Boot without having the ISO mounted.

  4. Simon says

    Where do I get an Lion OSX ISO from? I tried purchasing from Apple but iTunes doesn’t allow purchase for some reason.

  5. Raymond says

    I can install OSX guest in PC host without creating (touch) the ServerVersion.plist file under VirtualBox 4.1.8.
    OSX guest without the file is able to be updated e.g. from 10.7 to 10.7.2, install Java, xcode from 4.2 to 4.2.1 etc.

  6. zuless says

    Feedback for admin,
    I am using AMD Processor (AMD Turion II Dual Core Mobile M520 )
    When booting using your HackBoot.iso, the verbose mode stop at (something like)

    ACPI table not found: DSDT.aml
    ACPI table not found: SSDT.aml
    Not an Intel processor: Restart fix can not be applied

  7. nXT says

    I placed the .vmdk file in IDE Controller instead of SATA Controller. Again tried placing it in SATA but both time I am having “2 GB memory required” error.

    Is there any way around it?

  8. kmn says

    To change screen resolution for this guide, I made changes to:

    1. Add this in virtualbox:

    VBoxManage setextradata “VM name” “CustomVideoMode1″ “1280x800x32″

    2. Hack or change in “Hack Boot.iso” ‘s com.apple.Boot.plist in Extras folder.

    Since I did not have iso editor, I use hexedit to add two lines “Graphics Mode” and 1280x800x32 in (need 0a 09 between each line). Since I can’t change file size, so I remove Kernel Flags and Rescan out to have more spaces

    It will boot to new screen size, the menu will be off since background is still 1024×768.

    PS: I also changed com.apple.Boot.plist in Lion disk, but I don’t think I need it.

    Cheer!!!

    • David says

      Thanks kmn!

      I did it a little differently: Same step #1 (console command, but with 1440x900x32) and in step #2 I also opened the HackBoot.iso with a Hex editor, searched for 1024, and whereever it appeared as a resolution in combination with ’768′, I replaced those pairs with 1440 and 900. This way, the file size stays the same.

      Works perfectly!

      • piedn says

        Hi!
        Very nice that you finally got a guide to solve that problem. I really want to change my resolution too, but it appears that I’m a big noob and don’t know where to put the VBoxManage command line. I tried to put it behind the shortcut (“C:\Program Files\Oracle\VirtualBox\VirtualBox.exe” -VBoxManage setextradata “lion” “CustomVideoMode1″ “1366x768x32″) but that doesn’t work. I also changed the Hackboot.iso with Hexedit as Chris suggested… So I’m only missing the right way to put the command line – can you help me please?

        • David says

          It’s just a command line call. In Windows, you should be able to open the command prompt by typing ‘cmd’ in the start menu. There you can execute the command.

          • piedn says

            Thanks for the quick answer. It finally worked, after I executed the VboxManage.exe first before starting virtualbox itself.

            Thanks a lot!! Much more fun with real-fullscreen :)

  9. Marc Corbeel says

    Does the host has to be a 64-bit machine, or can it be 32-bit with virtualbox set to 64-bit?

    • kmn says

      It said “OK, I demonstrate these steps in my Windows 7 32 Bit computer with Oracle VirtualBox 4.1.2.”

        • Thiago says

          I believe u must mark the option “use host io cache” in sata controllers storage attribute

          • Marc Corbeel says

            Yes! You are good!
            But next problem: when osx aksk on what disk to install, there is an empty box to pick from… and of course i can’t continue

        • Thiago says

          Do you have a virtual hard disk attached to the sata in vmachine? Also your installer disk ISO/vmdk should be attached as IDE

          • Marc Corbeel says

            Yes I have a 100G vmhd installed as SATA.
            Installer was also SATA, changed it to IDE but same reult.
            Also tried main virtual disk as IDE but also no result.

          • Marc Corbeel says

            Made the changes in the xml file, no result. Than I created a disk using OSX Leopard on another vm, and used this file as a disk for my Lion, and this worked! Great! Thanks alot!!!

            Btw I want to use this OSX Lion as dev environment for creating iPhone/iPad apps. Do you think this will work, or will there be other issues?

  10. Nicox says

    U can donwload xcode from the app store… it’s free once you have Lion installed.

    It doesn’t work as dev enviroment. It is too slow… At least for me (Quad core 2.84 GHz with 4 GB of RAM). I tried to enable the graphical acceleration but it make the system less stable (hangs and reboot itself).

    The good news is that you can use this to submit your apps to the app store :)

    Either way that is my experience… try it and tell me if your story is the same.

  11. LHyoda says

    The hackboot doesn’t boot right for me :/ on a custom build. Keep getting a black screen it won’t load past. I’m booting with a vmkb… anyone else have this issue?

  12. Jboy says

    Great guide. I myself am using Windows 7 64 bit with an AMD Phenom II setup. It cost me a lot of trouble, and I’ve had quite a few issues, and your guide solved many of them. So far it seems to be working fine, you just need to get the 1) Real time clock in the virtual machine right. 2) Use the intel card options at networking. Amd ones won’t work. I didn’t use bootloader, I added the .iso to the IDE controller. That’s about it. Thanks a lot for this guide!

  13. Joshua says

    Thanks for the guide! I have a question though, is hackboot.iso really needed every time I boot? Or did I do it wrong?

  14. Chris says

    Great guide. My only issue is that the virtual machine is very slow. Because i can´t enable more than one core in virtual machine. If I do that i get an error.
    Maybe I need an other bootloader which support the other cores (i have a core2quad 8300 2.6ghz).

    I hope someone can help me!

  15. Mohsin says

    hi
    bro nice tutorial but after installing it shows no bootable medium found
    i install MAC os x lion using iso file
    plz help me

  16. gvardanyan says

    Hi,

    Thanks for the tutorial.. It worked great.. !!!
    But I have an issue with the internet.. The network between host and guest machines is working.. but no Internet access on Guest.
    any clue?

    Thanks in advance.

  17. Manzur says

    Hi, After installing Mac OS X Lion in Virtual Box od Uubuntu 11.10, I cann’t go ahead to open Mac desktop … please help.

    When I start VM, its showing two option …. one is disk another one cd …. by arrow key i try to select disk option…. but both are selected …. and after that message ‘You need to restart your computer. Hold down power button …….’. every time It is shown ….. So please help.

  18. TK says

    Awesome tutorial. I underestimated the time it would take to complete the process, but it was definately worth it – another checkbox checked on the “just because” list.

  19. miki says

    I have a problem: Almost everything works ok, but I have the problem that I can’t see videos on Youtube, and on apple’s website . Does anybody else have this problem?

    The installation of iatkos L2 on Virtualbox with Windows 7 host was ok, and the system seemed to work well. I installed the adobe flash player from adobe’s website, but videos still do not play on Safari and Firefox. It indicates that the video is loading, but the video rectangle stays black, or blinks, but I don’t see the actual video.

    By the way, I didn’t need Hackboot.iso, just installed it from iatkos L2, the crucial problems that I had were:
    1. Mac OSX Server 64bit must be selected as the guest system, it doesn’t work if the 64-bit is not selected.
    2. I had to give the Virtual maching 1GB of memory, 768MB caused the installation to freeze near the end of copying files.