Usually, the OS X installation DMG file will not work on the virtualization environment or non-mac computers. If we need to boot a virtual machine either on VMware or VirtualBox, we need to modify the installation medium to continue the Mac OS X installation.
The guide will show you how to make a bootable Lion OS X image that can be used on VMware or any Intel-based physical computer. I managed to install Mac 10.7 Lion onto my Windows 7 32-bit by following the steps in this article!
NOTE: The guide you are reading now was published over ten years ago. But if your goal is still installing older versions of Mac OS X on old hardware, then this article will be invaluable for helping get the job done!
Things you Need to Have:
1) Working Snow Leopard Virtual Machine in VMware or VirtualBox
2) Lion Leopard Installation DMG (It is easily available on the Internet.
Why Do We Need to Create this Installer Image?
1) There are no boot loaders available to boot the original Lion installer file in VMware.
2) The installation package is available in the DMG format that can’t be used in the virtualization platforms.
Steps to Create Bootable Lion OS X Installer Image
1) Attach a new 5GB virtual hard disk (VMDK) file to a working Snow leopard Virtual machine.
2) Press Initialize when you start the Mac OS X virtual machine. Create a partition with the following configuration for the newly attached 5GB virtual hard disk.
- Name – LionInstaller
- Format: Mac OS X Extended
- Partitions: Single partition – Apple Partition Map
3) Now attach the Lion OS X installation DMG or ISO file you downloaded from Apple/Torrent sites to the virtual machine’s CD drive. Once it is attached, it will be automatically mounted inside the virtual machine.
The file is mounted as “Mac OS X Install ESD” under Volumes.
4) We need to copy the base system image from mounted ISO/DMG to our LionInstaller (new VMDK file).
Mount the base system image from the terminal and run the following command.
cd "/Volumes/Mac OS X Install ESD" open BaseSystem.dmg
This will be mounted as “Mac OS X Base System” under Volumes.
5) After Base System is mounted, we can use the Restore feature under disk utility to copy the entire data.
Go to Disk Utilities and select the source and destination as shown below to start the restore process – this will copy the entire base system to the new 5GB hard disk.
Provide the root password to continue. Once over, go to the next step.
6) Copy the kernelcache files with the following command.
cp "/Volumes/Mac OS X Install ESD/kernelcache" /Volumes/LionInstaller/kernelcache
7) Modify the plist file to enable the kernelcahce that we copied to the new installer disk.
Go to /Volumes/LionInstaller/Library/Preferences/SystemConfiguration/ and open com.apple.Boot.plist file with TextEdit.
Enter the following string and save the file.
<key>Kernel Cache</key> <string>\kernelcache</string>
If you face any permission issues, save this file on Desktop or any other folder then move to the destination. This time it will ask for authentication, so provide the root access password.
In another way, you can use sudo vi command to modify this file in the terminal.
Make sure this file is modified as shown above in the new installer image.
8) Now copy the installation packages by following commands.
sudo rm /Volumes/LionInstaller/System/Installation/Packages sudo cp -R "/Volumes/Mac OS X Install ESD/Packages" /Volumes/LionInstaller/System/Installation/Packages
Second command will copy a large size of data to a new VMDK file, therefore do wait for some time.
9) We are almost done. Since VMware on Windows supports Mac OS X server versions only, the newly created installation image should be flagged as the server version.
Execute the following commands.
cd /Volumes/LionInstaller/System/Library/CoreServices sudo touch ServerVersion.plist
That’s it, our bootable Lion OS X installer image is ready. It can boot a virtual machine in VMware without any boot loaders. Shut down the working Snow Leopard virtual machine and remove the 5GB VMDK file from it. This VMDK file can be attached to a new 10.7 Lion VM to boot and install.
Here is the video explaining the same steps to create a bootable macOS disk.