After countless failed attempts I’ve finally managed to get Mac OS X Lion running in ESXi 5.
I used Donk’s ESXi 5 Mac OS X Unlocker: http://www.insanelymac.com/forum/index.php?s=&showtopic=267296&view=findpost&p=1745191
Unfortunately when you try and boot from the Lion installation DVD the Virtual Machine hangs on the apple logo. Pressing F8 or configuring the VM to force entry into the BIOS on next boot allows you to select EFI Internal Shell
And boot verbosely by issuing the command: boot –v
We now see the boot is hanging at the PCI configuration stage:
Issuing the command: boot –v npci=0x2000
Allows us to get past the PCI configuration step but now hangs looking for the installation media (still waiting for root device):
This appears to be because the IDE controller is unsupported. Attaching an external USB DVD ROM, enabling pass-through:
Then attaching the USB controller to the VM:
And voila- the Lion installation begins!
The next obstacle came when trying to select the target disk for the installation. The virtual disk wasn’t listed and attempting to partition/format the disk resulted in an error: Unable to write to the last block of the device
I found a few suggestions: https://discussions.apple.com/thread/3226425?start=0&tstart=0
Launching Terminal and issuing: diskutil list
Allowed me to identify the disk: /dev/disk0
And issue: diskutil eraseVolume jhfs+ "OSX" /dev/disk0
Which also failed but back in the disk utility I was now able to partition & format the disk ready for the installation!
Everything went smoothly from here. Installing VMWare tools v5.0.0: http://www.insanelymac.com/forum/index.php?showtopic=267339 went smoothly but after rebooting I couldn’t login to (the password seemed to be being rejected). I rebooted the VM in safe mode (hold the shift key whilst during boot) and was able to login.
Performance is pretty poor (I think this is due to the lack of graphics acceleration) so I went straight in and enabled remote management so I could now use Apple Remote Desktop to administer the server.
Good luck!
L
*EDIT* One important thing to note the VM cannot be powered on from vCenter (error: Failed to find a host for powering on the virtual machine. The following faults explain why the registered host is not compatible. The guest operating system ‘darwin10_64guest’ is not supported). Simply logging directly into the host allows you to power on the VM.
Worked like a charm!
Thanks so much for posting this. I’ve been trying to move my OS X based NAS to ESXi for a couple of months. I needed the DirectPath to enable a 3ware card that managed the array, so workstation wasn’t going to cut it. This is the clearest set of directions I’ve seen yet, and they worked the first time through.
Cool, now I can do a fast local-bus move to a proper NexentaStor ZFS NAS on VM!
I have made what you said but now i have
panic(cpu 1 caller 0xffffff80002c268d): Kernel trap at 0xffffff7f816d691d, type 6=invalid opcode, registers:
I’am using vmware workstation 8 with VMWare ESXi Hypervisor 5 virtual machine, the computer is a Windows 7 Pro x64 CPU Intel i7 860 with 8gb ram.
Thanks
So let me get this right… You’re trying to install Lion on ESXi running on VMWare Workstation 8 running on Windows 7?
yes! just testing to use in real machine with esxi. can work? all other machines work inside esxi (linux, windows) thanks
The “boot -v” in the EFI shell doesn’t work
Do you get an error message? Do you have a screenshot?
L
When I enter the EFI shell I get a:
Shell>
Prompt. Boot isn’t an option in there. Is there a step missing in between?
That’s definitely it… (no missing steps).
Boot doesn’t seem to be listed as a command but typing it definitely should work. What happens if you type boot -v and hit enter at the shell> prompt?
Try:
mount fs0:
fs0:\System\Library\CoreServices\boot.efi -v
Thanks!
I figure it out, fs1:\System\Library\CoreServices\boot.efi -v will do
Help me please…
I get the “Shell>” too.
A screenshot : http://www.insanelymac.com/forum/index.php?showtopic=269599
Hi XinRen, so far we have only had success with either a physical USB stick or DVD. Ensure you have one connected with the Lion installation image/disc inserted.
L
Installing 10.7.1 worked great. But after I upgraded to 10.7.2, I can’t but anymore. :(
I can’t BOOT anymore… Gotta hate autocorrect.
Today, I updated my 10.7.1 VM (running on a Xserve with vSphere 5) to 10.7.2. Now the VM doesnt boot up. It hangs at the Apple logo. Any ideas how this issue can be fixed?
I read VMware Fusion had similar problems but they released an update…
There is a discussion here http://www.insanelymac.com/forum/index.php?s=93a9405973934752b7f8648314bd82af&showtopic=270140 about how to get 10.7.2 working. I have yet to upgrade my own.
L
help! in the Shell I type boot -v, I got error as bellow:
‘boot’ is not recognized as an internal or external command,operable program, or batch file
exit status code: Invalid parameter
plz help
I was able to get the Mac OSX Lion installer to come up and I was able to format the disk using disk utility. But at the Downloading additional Components prompt it fails and states “Can’t download the additional components needed to install Mac OS X”. Any Ideas?
I haven’t played with it for a while- i’m sure you’ll find a solution over on the insanelymac forum: http://www.insanelymac.com/forum/index.php?showforum=104
Good luck!
Are you able to solve this issue, everything working fine with unlocker, no hang on boot, disk unitity working fine, on start up screen safari can browse internet…
Using ESXi 5.5…
Hi !
Did you do anything special to list you PCI devices in the Advanced Settings ?
On my machine I only get : “Host does not support passthrough configuration”…
I have plugged my DVD drive with Lion in it, but it doesn’t change anything :'(
If you have got any idea, I would be grateful !
Thanks
Hi, nothing special- i think it’s all dependant on hardware. I think it’s a lot of effort to go to in fairness and think next time i will just wait for a pre-made vm i can download :)
L
BLOK
USBF: 9.787 [0xfffff …….. of device Vmware Virtual USB Keybord @ 4 (0x210000)
thank for the guide, very helpful.
My problem is, that I can’t see the disk inside the installer. I tried diskutil list, but it doesn’t show the 40GB disk, only the install media and a 1.4GB disk, which I assume is the RAM disk plus tons of other disks each a couple of kB or MB in size.
same here, what did you do to solve this..?
Leaving the DVD IDE Im able to install OS X 10.7 Lion with no problem on ESXi 5!
Could you elaborate? Do you mean you have physical OS X installation media in the DVD drive of the ESXi host?
I made my own Lion USB stick by restoring InstallESD.dmg to an 8GB USB flash drive. Ran Donk’s unlocker in ESXi and oddly enough I just set the OS as “Mac OS 10.6” and the install fired right up and everything worked out of the box with zero customization or fixes. Note: I have not updated as I hear the later Lion updates break the boot up requiring some kext changes.
Glad to hear it. Though in fairness I think the only difference here is that you didn’t need to boot -v npci=0x2000
nice post,
but I did not understand if the errors that you describe in your guide appear before or after installing the unlock software on ESXi host. I tried not to install the unlock software and I look exactly the same errors you describe. Once i installed the unlock software should i have not of these errors?
Thnks
G.
I also did the test with the unlocking software, and confirm that with or without the unlocking program the system hangs are the same. But using the program to unlock what would change on ESXi host? I’ll try to boot with external USB DVD as you suggested.
Thanks
G.
I’m not able to understand how did you do to boot from usb dvd in virtual machine apple. Would you explain me how did you it?
Thanks
G.
How far have you managed to get? Have you been able to attach the physical drive to the vm?
Bro thank you for this guide and the other one (where you move the installer.sh to /tmp/ I couldn’t get mine to install.)
But now Im stuck. I know its been a while but can you recall how you set this up? Such as:
In ESX 5, are you using the OSX 10.6 (64Bit) Template?
Did you use a offical OSX iso? If so what version.
I have patched ESX with the hack.
I am currently at the step with OSX freezing when attempting to install.
What is displayed on the screen when it hangs?
First of all, Thanks for a very good guide!
I’ve got everything to work and it’s really powerful to run even osx under ESXi.
However, I have a little trouble after the patch (ESXi 5 Mac OS X Unlocker) I installed.
Migrate VM (VMotion) from a non-patched ESXi host to the patched ESXi host will only work ONCE, then one obtains only “operation timed out” and also to start up VM.
This can be solved by running “services.sh restart” from the shell in ESXi.
The funny and weird is that it’s just fine to move the VM to the other side (patched ESXi -> non-patched ESXi) without trouble.
Would clarify that this applies to the migration of VMs are active / running. It works just fine both ways to migrate the VM is shutdown / non-active.
Has anyone else run into this same problem?
Hi,
when I am trying execute install.sh its giving me an error, cp: write error: No space left on device
cp: cannot close ‘bin/vmx-stats’: No space left on device
Any suggestion.
is there ‘unlocked’ support for Mountain Lion already?!
getting ‘error loading kernel cache 0xe’ now… :(
i’m not aware of anything yet- though i think in some of the desktop virtualization solutions it is already possible
Hi,
Is this the terminal for ESXI?
Launching Terminal and issuing: diskutil list
Allowed me to identify the disk: /dev/disk0
i cannot run “diskutil”, error 127 . can you elaborate on this please.
thanks in advance.
No, you issue those commands from the terminal in the OS X installation.
Hello,
I am stuck at this point when i need to add the DVD/USB drive for the unsupported IDE.
I am getting an error and the method that u suggested is not effective in my case. Could you help me out in this?
do i have to boot from usb dvd that is attached pass-trough to my esxi or do i just have to add it and boot from the internal dvd drive? i got stuck on this step…
Great post, thank You, I learned a lot from it. I am however having a problem:
No matter from what media i try running the boot.efi file, I get the following:
blk0:\>boot -v nspci=0x2000
efiboot loaded from device: Acpi (PNP0A03,0)/Pci(7|1)/Ata(Primary,Master)/HD(Part3,MBRType=20,SigType=00)
boot file path: \/boot.efi
.Loading kernel cache file ‘\kernelcache’….
………..
root device uuid is ‘xxxxxxxx’
And then it hangs. I can start it up from fs0: but it’s the same thing with a different UUID. Any thoughts or suggestions?
It should be npci not nspci. L
Oh sorry, that was a typo. Still when I do npci, it hangs at that same place. I do not have pci passthrough options, but I can add the esxi host’s on-board cd drive as a SCSI device and it is recognized.
I tried IDE both in pass-through and emulated modes, and it still hangs at that root device UUID.
Any suggestions? It seems like boot -v gives no usable information because it hangs at the same place.
Thanks!
I too am stuck at this part. I can’t get past the “root device uuid is ‘xxxxxxxxx'”, it seems like the kernel won’t even load. I’ve tried Workstation 8.0.1 and 8.0.2 – it’s on an AMD with hardware virtualization enabled.
I’ve tried Lion 10.7.2, 10.7.3 and no luck here. Same with trying a fresh ISO install it just hangs. Is it AMD related or are we just missing something?
How about ESXi 4.1? We’re stuck with that.
Can anyone show me how to install Lion on it?
I tried doing some testing in an attempt to get this to work, and I’ve run into a few issues.
As an FYI for me, what kind of hardware is your ESXi 5 running on?
When I install Donk’s Unlocker I get the message “Patching vmwarebase is not supported on this platform”. I’m running ESXi 5.0 468512, the same as you.
When I try and launch an OSX VM in vSphere, I get the “Mac OS X is not supported with software virtualization. To run Mac OS X you need a host on which VMware ESX supports hardware virtualization.” error.
I thought this would work on non-apple iron. I’m not even seeing the same screens as you in the BIOS. Arrrgh!
I’m running on Intel Xeon X3470 chips if i remember rightly (with supermicro X8-SIL-F motherboards). What hardware are you trying to run it on? You will need hardware virtualization support (VT-d etc) as a bare minimum i think.
My test CPU was a teeny tiny Intel Atom 330, [don’t judge me… LOL] which obviously doesn’t have VT-d. I’m getting in a Dell C6100 with four CPU modules [8 X5670 CPUs] this week and wanted to do some tests before it gets in.
I wonder If I need a slightly older version of vSphere to avoid the “Mac OS X is not supported with software virtualization” error. What version of vSphere are you using? When I log into my ESXi test machine, the download link for vSphere is for version 5.0.0-455964.
Initially I installed ESXi 5.0.0.update01-623860 and the vSphere associated with it [5.0.0-623373]. When I downgraded EXSi to 5.0.0-455964, I didn’t install the downgraded version of vSphere. I suspect the “OSX not supported” error is coming from the newer version of vSphere. We’ll see.
Thanks for the timely reply mate.
Follow-up: You were correct. I borrowed a new-ish HP-ProLiant that supports VT-d from a friend of mine and Snow Leopard installed perfectly after running the unlocker.
This one worked perfectly for me:
1. Install these updates in the following order on your ESXi: ESXi500-201112001.zip and update-from-esxi5.0-5.0_update01.zip
2. Run Donk’s ESXi 5 Mac OS X Unlocker as mentioned in the article
3. Create an ISO image from the Lion ‘InstallESD.dmg’ using terminal on Mac OS: hdiutil convert InstallESD.dmg -format UDTO -o InstallESD.iso. This will result in a .cdr file (.iso.cdr). Just remove the .cdr file extension.
4. Create a new VM, select OS 10.7 64bit as guest and select the created ISO for the virtual CDROM drive
5. Select ‘force EFI Setup on next start’
6. On the EFI screen select ‘Boot Manager’
7. On the shell type ‘boot -v npci=0x2000’ and hit enter (only required for booting from CDROM; you don’t have to type this at a regular system start)
8. Install Mac OS as usual
9. Install VMware tools
10. Enjoy :)
I haven’t tried updating the VM to 10.7.4 yet. I’ll report here after I did.
BTW… has anybody tried to run the VMware View agent on Mac OS? ;)
This worked for me! Thanks so much!!! :)
Any idea if it’s safe to upgrade the VM to 10.8? Going to try that later once the Lion install finishes and I can take a snapshot! you rock!
Everything is working post 10.8 update, however boot time is extremely long and won’t boot without manually approving the number of cores. Anyone have a resolution for either of those?
I read something about SMC.present, but setting it to either “true” or “false” in the VM’s settings does not have any effect.
Booting speed issues resolved with Kext Utility for Mountain Lion + FakeSMC.kext
Hi Brian
Thanks for the post. How did you exactly resolve the boot speed? Do you have a step by step for using the Kext Utility + FakeSMC.kext?
Is there any way to roll this back? I did this and now I can’t boot any VMs residing on this host now. I have to migrate them off and then boot them and then migrate them back. Help!!
I can confirm that Mac OS X 10.7.4 runs on ESXi 5 702118. All works nicely, just don’t start it via vCenter, start it directly from PowerCLI or similar! Small advice: don’t do this on a production Host :-).
I’m very impatiently awaiting 10.8 mountain lion :)
Hello,
I am still having issues no matter what I do and use. I have tried 2 different ISO’s for both datastore images and also as DVD’s in the Dell 2950’s DVD-ROM drive. I have tried the USB and still all that i do causes the “Still Waiting for root device” error message.
I cannot run direct IO on my 2950 but it is VT enabled.
Is there any other thing that I can try?
Thank you in advance!
Rick
Hi rick
I have a stack of these 2950 too and am trying to install osx with esxi like yourself
did you have any luck
mind giving us a little guide on this?
Regards
For all of you having the ‘root device UUID is’ problem, checkout this solution here; worked great for me! http://blog.campodoro.org/?p=316
I am unable to see my virtual disk to install to. Not listed in the diskutil list. All I see is 12 524kb disks inadditional to my boot media.
I changed the DVD drive to Emulated IDE, and install just fine. On ESXi 5.0
Reblogged this on Another WordPress Page.
> The next obstacle came when trying to select the target disk for the installation. The virtual disk wasn’t listed
Before starting the installation / setup go to the Disk Utility and prepare the hard drive (create partition + format). Then exit the Disk Utility and start the installation / setup. When booting off of *.dmg file, I see screen OS X Utilities and four choices:
1. Restore From Time Machine Backup
2. Reinstall OS X
3. Get Help Online
4. Disk Utility
So what I am saying is first choose option number 4. Disk Utility, prepare the drive, and then exit Disk Utility and now choose Option 2. Reinstall OS X