VMware Fusion has supported OS X Server guests since version 2, but has provided no support for virtualising OS X client guests. This guide will show you how to install OS X from versions 10.4 to 10.6 in VMware Fusion.
In order to install OS X in a VM modifications will need to be made to the installer, the first step in the process of making a writeable disk image is to make an ISO image of the installer DVD.
First, open Terminal and run:
diskutil list
You will get a list of devices, partitions and paths like this:
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *500.1 GB disk0
1: Apple_HFS Macintosh HD 250.2 GB disk0s1
2: Windows_NTFS 249.9 GB disk0s2
Insert the Install Disk and run diskutil list once again, another device will appear in the list:
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *500.1 GB disk0
1: Apple_HFS Macintosh HD 250.2 GB disk0s1
2: Windows_NTFS 249.9 GB disk0s2
/dev/disk1
#: TYPE NAME SIZE IDENTIFIER
0: Apple_partition_scheme *5.5 GB disk3
1: Apple_partition_map 32.3 KB disk3s1
2: Apple_Driver_ATAPI 4.1 KB disk3s2
3: Apple_HFS Mac OS X Install Disc 1 5.5 GB disk3s3
Look at the device that was added and use the device filename (e.g. /dev/disk1) in the following command:
dd if=/dev/disk1 of=~/osx-installer.iso bs=1m
The above command will copy the entire disk to a file in your home directory called osx-installer.iso, as such, it will take a while to copy over, so be patient.
NOTE: Using dd to copy the disk is necessary because it copies the EFI partition, which VMware needs in order to boot the installer. Using Disk Utility to clone the disk will not work.
Once the command completes, (when you can type stuff in the Terminal again,) run the following command to convert the ISO to a writeable DMG image.
hdiutil convert osx-installer.iso -format UDRW -o osx-installer
Once the command completes you’ll have a file called osx-installer.dmg, which you can mount and modify so that it will boot in VMware. You can delete the ISO file if you want, this guide won’t require it any more.
As mentioned before, VMware will not be able to install from the installer without some modification. VMware can install and run OS X, except that Apple’s EULA prevents VMware from installing anything but OS X Server.
VMware looks for the file ServerVersion.plist in order to determine if the version you are trying to install is OS X Server. As such, all you have to do is create this file and VMware will think you’re installing OS X Server.
First, go back to Terminal and run:
open osx-installer.dmg
Next, if you’re installing Leopard or Snow Leopard, run this:
touch /Volumes/Mac\ OS\ X\ Install\ DVD/System/Library/CoreServices/Services.plist
If you’re installing Tiger then run:
touch /Volumes/Mac\ OS\ X\ Install\ Disc\ 1/System/Library/CoreServices/ServerVersion.plist
NOTE: If you get an error on the above, it’s possible that the install disk is mounted under a different name, in Terminal run “ls /Volumes” to discover the name of the disk, and replace /Volumes/OS\ X\ Install\ Disc\ 1/ with the real name of the disk.
If you’re trying to install Leopard or Snow Leopard you can skip to the next step, but if you’re installing Tiger you’ll need some further modification.
OS X Tiger will boot with the above modification, however, it will not allow you to install, giving you the error message, “This software cannot be installed on this computer.”
In order to work around this problem, you will need to make some modifications to Tiger’s OSInstall script, which checks that OS X can be installed on the current computer, it’s used for checking things like the amount of RAM, CPU speed, etc.
Download this modified OSInstall.mpkg, navigate to System/Installation/Packages in the Installer disk and replace the OSInstall.mpkg there with the downloaded one.
Once Replaced, you can unmount the DMG and move to the next step.
Now that the installer image is prepared, you can open VMware Fusion and create a new Virtual Machine. In the Assistant wizard, select the osx-installer.dmg image that we have created, (make sure that it is not mounted.)
Then choose Mac OS X as the Operating System, and select the version that you are trying to install. If you’re installing Tiger selecting OS X Server 10.5 works fine.
Once you’ve finished creating the VM, go into the VM settings and add a Sound device.
Once the VM is configured, start it up.
Go through the install process, and when the install completes open Terminal (Utilities => Terminal,) and run:
touch /Volumes/Macintosh\ HD/System/Library/CoreServices/ServerVersion.plist
This will prevent VMware from throwing an error when you try to boot the install.
NOTE: You must pay attention to what the installer is doing, because it only gives you 30 seconds to cancel restart after installation has succeeded.
Unfortunately OS X doesn’t “just work” in a VM, there are some things that need to be fixed.
The first thing you should do is install VMware Tools, which you can do by unmounting the Installer Disk and, (whilst in the VM,) going to Virtual Machine => Install VMware Tools.
When you update OS X it looks for ServerVersion.plist to check if it is OS X Server, (because there isn’t really that much difference between Client and Server,) and it gives you updates that are for OS X Server, which is a bad thing, because we want the OS X client updates.
In order to get the updates for the client we need to remove the ServerVersion.plist file, unfortunately this means that if we reboot VMware won’t boot OS X anymore.
To solve this problem, I have borrowed a pseudo-daemon from rectalogic.com that will delete ServerVersion.plist on boot and create it on shutdown. Very Clever.
Download com.rectalogic.vmware.plist here and copy it to /Library/LaunchDaemons/ in the VM. Once you’ve done that, open up Terminal and run:
sudo chown root:wheel /Library/LaunchDaemons/com.rectalogic.vmware.plist
Which will change the ownership of the plist, and then run the following to load the daemon:
sudo launchctl load /Library/LaunchDaemons/com.rectalogic.vmware.plist
NOTE: If you force the VM to restart/shutdown the ServerVersion.plist won’t be created and you will be unable to boot, so try not to do that, and maybe keep snapshots just in case.
I have noticed that the Macintosh HD volume is not indexed in any of the Virtual Machines by default. The cause of this I do not know, but open Terminal and run these commands to fix it:
sudo mdutil –i on / && sudo mdutil –E /
Audio is the most annoying problem in OS X virtual machines, and I have had many problems with getting it to work. I have found no drivers that work for OS X Tiger, but the below links are to drivers for Leopard and Snow Leopard that are provided by the VMSVGA2 project, and I have had success with them.
A couple of things to remember are, when you are fixing the audio, make sure that you don’t install VMware Tools first, as I have had some issues where the driver does not install correctly if Vmware Tools is installed first.
Secondly, Sleep will cause the Virtual Machine to freeze and you will not be able to recover it, so remember to go into System Preferences => Energy Saver and drag both of the sliders to the “Never” position.
OS X support in VMware Fusion is pretty neglected, VMware Tools does practically nothing, there is no audio support and there is no Quartz Extreme Support.
Some of the problems can be fixed, but over all OS X is not very useful for anything media-related. OS X Leopard is the version that I have had the most success with, Safari doesn’t crash when you play flash videos and the audio driver works first time, unlike Snow, which had all of the previous problems.
Running OS X in VMware is fun, but is hardly useful, unless you want to run an old PPC application that requires sound. There is no possibility of Quartz Extreme/Core Image support, so QuickTime/VLC won’t be able to play video, and you won’t be able to take screenshots/look at images. I’m sure in the future drivers will be developed, but for now this whole process is just for the novelty.
Thank you for reading the guide and I hope you’ve found it interesting, I personally enjoy seeing any Operating System virtualised, because I can just smell the future, where we’ll be virtualising an 8-core computer and giving it 16GB of ram, just for the fun of it.
Published on 24 July, 2011 by
Categories: Mac Guides