Jump to content

ESXi 5 Mac OS X Unlocker


  • Please log in to reply
793 replies to this topic

#1
Donk

Donk

    InsanelyMac Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 2,025 posts
  • Gender:Male
  • Location:Manchester UK

Link

http://www.insanelym...ocker-for-os-x/

 

Updated 25th March 2014

Version 1.3.0 posted with new method of running the patcher on ESXi. Should fix the issues when vCenter code added to the ESXi host. Please carefully read the readme.txt file. You will need to remove the previous unlocker for this to work correctly. In addition you must have a scratch partition available on the ESXi host.

 

Warning 25th September 2013

There has been a report by ipas that there are other issues when running with vCenter 5.5. Please remember the patcher was designed and only tested against standalone ESXi hosts. vCenter adds additional code to the host and currently there is no way to make ESXi reliably work when that code is added. Thanks to ipas for the report.

 

Updated 24th September 2013

Version 1.2.0 confirmed as working with ESXi 5.5. Thanks MSoK.

 

Updated 19th September 2013

New version 1.2.0 released with fixes for Workstation 10, Player 6 and Fusion 6.

 

Updated 13th July 2013

New version 1.1.1 released.

 

Updated 10th May 2012
New version 1.1.0 released.
http://goo.gl/oHx8k

Updated 18th December 2011
There have been several reports that there are problems using this with vCenter. Please be aware the work really was only for standalone ESXi. Use at your own risk as we are obviously not able to guarantee anything with these patches.

Updated 7th December 2011
Updated for Workstation 8.0.1 and Fusion 4.1.0
http://goo.gl/5CZVn

Updated 11th November 2011
Minor update for Windows Workstation to fix batch file errors.
http://goo.gl/HV6wH

Updated 4th November 2011

New unlocker which can do all the current VMware products. Please see the readme copied here.

Mac Son of Knife will be running another thread, http://www.insanelym...howtopic=267339, to help with running Mac OS X on this unlocker. This thread will be for updates and issues with the unlocking process only.
 

Mac OS X Unlocker for VMware
============================
 
1. Introduction
---------------
 
The package is a combination of the Unlocker code written by Zenith432 plus some
fixes and scripts written by myself that wrap the actual unlocker code. 
 
It has been tested against:
 
* Workstation 8/9/10 on Windows and Linux (32 & 64-bit versions)
* Player 4/5/6 on Windows and Linux (32 & 64-bit versions)
* Fusion 4/5/6 on Snow Leopard, Lion, Mountain Lion and Mavericks
* ESXi 5.0/5.1/5.5
 
The patch code carries out the following modifications dependent on the product
being patched:
 
* Fix vmware-vmx and derivatives to allow Mac OS X to boot
* Fix vmwarebase .dll or .so to allow Apple to be selected during creation
* Copy darwin.iso if needed to VMware folder
 
Note that not all products recognise the darwin.iso via install tools menu item.
You will have to manually mount the darwin.iso for example on Workstation.
 
Also Player is missing vmware-vmx-debug and vmware-vmx-stats files and so an 
error is shown during patching as the files are not found. This can be safely 
ignored.
 
OS X guests on ESXi patched hosts cannot be controlled from vCenter, only from
the ESXi host itself. This means power operations have to be run directly on
the server.
 
The vmwarebase code does not need to be patched on ESXi or OS X so you will see a 
message on those systems telling you that it will not be patched.
 
In all cases make sure VMware is not running, and any background guests have 
been shutdown.
 
2. Windows
----------
On Windows you will need to either run cmd.exe as Administrator or using 
Explorer right click on the command file and select "Run as administrator".
 
install.cmd   - patches VMware and copies darwin.iso tools image to VMware
uninstall.cmd - restores VMware and removes darwin.iso tools image from VMware
 
3. Linux
---------
On Linux you will need to be either root or use sudo to run the scripts. 
 
You may need to ensure the contents of the linux folder have execute permissions
by running chmod +x against the 4 files.
 
install.sh   - patches VMware and copies darwin.iso tools image to VMware
uninstall.sh - restores VMware and removes darwin.iso tools image from VMware
 
4. Mac OS X
-----------
On Mac OS X you will need to be either root or use sudo to run the scripts. 
This is really only needed if you want to use client versions of Mac OS X.
 
You may need to ensure the contents of the osx folder have execute permissions
by running chmod +x against the 3 files.
 
install.sh   - patches VMware 
uninstall.sh - restores VMware 
 
5. ESXi
-------
You will need to transfer the zip file to the ESXi host either using vSphere client or SCP.
 
Once uploaded you will need to either use the ESXi support console or use SSH to
run the commands. Use the unzip command to extract the files. 
 
<<< WARNING: use a datastore volume to run the scripts >>>
 
Please note that you will need to reboot the host for the patches to become active.
The patcher is embbedded in a shell script local.sh which is run at boot from /etc/rc.local.d.
 
You may need to ensure the contents of the esxi folder have execute permissions
by running chmod +x against the 3 files.
 
install.sh   - patches VMware 
uninstall.sh - restores VMware 
 
Note:
1. System should have a persistent scratch partition - should be OK except for stateless 
   and USB boot on drives less than 4GB
2. Any changes you have made to local.sh will be lost. If you have made changes to 
   that file, you will need to merge them into the supplied local.sh file.
3. This option runs at boot time to patch the releavant files and it now survives 
   an upgrade or patch to ESXi as local.sh is part of the persisted local state.
 
6. Zenith432's Unlocker
-----------------------
 
In all cases the unlocker can be run without the scripts but you would need to
carry out additional actions which the scripts encapsulate for you especially on
ESXi. If you want to run the unlocker directly the parameters are:
 
Usage: Unlocker [-h] [-u] [target_directory]
  -h: print help
  -u: remove the patch
  target_directory: customize location of vmx executables
 
On all platforms you must run it with administrator or root privileges.
The source code is provided and Zenith432 makes it freely available for
modification. I have modified the code and it is available as per Zenith432's 
original statement.
 
 
Thanks to Zenith432 for building the unlocker and Mac Son of Knife for all
the testing and support.
 
 
History
-------
11/10/11 1.0.0 - First release 
07/11/11 1.0.1 - Fixed typo in Windows command files
07/12/11 1.0.2 - Updated patcher and tools for latest release WKS 8.0.1 & FUS 4.1.1
10/05/12 1.1.0 - Changed the patching mechanism for vmwarebase .dll or .so
                 & tested against ESXi 5.0 U1 and Tech Previews.
13/07/13 1.1.1 - Changed ESXi scripts to ensure not deleting root /bin folder
               - Fixed vmwarebase patching on 32-bit Linux
               - Some other code clean-up in Unlocker.cpp
18/09/13 1.2.0 - Updated vmwarebase pattern matching for WKS 10.0.0 & FUS 6.0.0
25/03/14 1.3.0 - New method to run patcher on ESXi
               - Fixes crashes when using vCenter
               - Tested against ESXi 5.5
               - Darwin guest tools from Fusion 6.0.2 
               - Zip file preserves file attributes for Posix based systems
 
© 2011-2014 Dave Parsons
 


#2
XBit

XBit

    InsanelyMac Protégé

  • Members
  • Pip
  • 6 posts
  • Gender:Male
  • Location:Bucharest
Thanks Donk, MSoK ! Can't wait to try it tomorrow.
Does this activate support Leopard, Snow Leopard and Lion? Are there any limitations or a "best practices" guide?

#3
oegie

oegie

    InsanelyMac Protégé

  • Members
  • Pip
  • 27 posts
Thank you so much, Donk!

I already applied your patch, but the VM does not boot from the ISO i've created with Lion Disk Maker. Do I need a modified Install Disk or should it work that way?


cheers,
oegie

#4
MSoK

MSoK

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 984 posts
  • Gender:Male
  • Location:Darlington UK

Thanks Donk, MSoK ! Can't wait to try it tomorrow.
Does this activate support Leopard, Snow Leopard and Lion? Are there any limitations or a "best practices" guide?

XBit,

Not tried Leopard, but fine with Snow Leopard, working on Lion as we speak, will update when sorted, a guide will follow, early days!

Thank you so much, Donk!

I already applied your patch, but the VM does not boot from the ISO i've created with Lion Disk Maker. Do I need a modified Install Disk or should it work that way?

cheers,
oegie

oegie,

Looking at Lion as we speak, will update ASAP.

MSoK.

#5
yozh

yozh

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 246 posts

XBit,

Not tried Leopard, but fine with Snow Leopard, working on Lion as we speak, will update when sorted, a guide will follow, early days!


oegie,

Looking at Lion as we speak, will update ASAP.

MSoK.



Good work guys. Thanks.

#6
Donk

Donk

    InsanelyMac Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 2,025 posts
  • Gender:Male
  • Location:Manchester UK

Thank you so much, Donk!

I already applied your patch, but the VM does not boot from the ISO i've created with Lion Disk Maker. Do I need a modified Install Disk or should it work that way?


cheers,
oegie


OK so the first problem I had was Lion would not see any CD or DVD mounted. It looks like a bug in VMware code. I have basically created a VMDK file and restored the InstallESD.dmg to that much as you would with a USB stick. Also added the VMware tools.

Alternatively use a USB key and connect to the guest from the vSphere client. It is slow but will boot.

Please be aware I have very little time at present due to work. So decided to release early and let the community come up with some of the best practices.

#7
TrK11

TrK11

    InsanelyMac Protégé

  • Members
  • Pip
  • 1 posts
Hi Donk,

first of all, I want to thank you and Mac Son of a Knife for your work!

I want to confirm that your patch is working on ESXi5 (running on HP Proliant) hosting Mac OS 10.5 Server - no further modification was necessary! :rolleyes:

I will continue testing with Snow Leopard and Lion, still hoping that Apple and VMware will eventually provide an official solution that will meet the requirements of business customers.

Edit:
Snow Leopard seems to be working, too. Boot Disk started without any problems, installation still running.

TrK

#8
XBit

XBit

    InsanelyMac Protégé

  • Members
  • Pip
  • 6 posts
  • Gender:Male
  • Location:Bucharest
I can confirm also that the patch works fine for Snow Leopard and Lion on a Dell PowerEdge 2900.
On a whitebox Sandy Bridge system the CPU ID must be set manually for the SL install to boot:
cpuid.1.eax = "0000:0000:0000:0001:0000:0110:1010:0101"

A useful note/workaround for Lion: the IDE controller is not seen by the OS. For me, adding a SCSI CD unit worked very well (edit the virtual machine settings and add the new SCSI CDROM type device to the virtual machine as scsi0:1). The only downside is that SCSI CD needs exclusive access (the unit cannot be mounted at the same time in other VMs).

#9
Donk

Donk

    InsanelyMac Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 2,025 posts
  • Gender:Male
  • Location:Manchester UK

I can confirm also that the patch works fine for Snow Leopard and Lion on a Dell PowerEdge 2900.
On a whitebox Sandy Bridge system the CPU ID must be set manually for the SL install to boot:
cpuid.1.eax = "0000:0000:0000:0001:0000:0110:1010:0101"

A useful note/workaround for Lion: the IDE controller is not seen by the OS. For me, adding a SCSI CD unit worked very well (edit the virtual machine settings and add the new SCSI CDROM type device to the virtual machine as scsi0:1). The only downside is that SCSI CD needs exclusive access (the unit cannot be mounted at the same time in other VMs).


Can you go through the changes for SCSI CD drive? I tried it and VMware re-wrote it back to IDE.

#10
XBit

XBit

    InsanelyMac Protégé

  • Members
  • Pip
  • 6 posts
  • Gender:Male
  • Location:Bucharest

Can you go through the changes for SCSI CD drive? I tried it and VMware re-wrote it back to IDE.


In VSphere, VM properties, I deleted the IDE CDROM, then added a new SCSI device of type CDROM:
http://vmzare.files....eenshot0622.jpg

I can add a guide with screenshots tomorrow ;).

#11
Donk

Donk

    InsanelyMac Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 2,025 posts
  • Gender:Male
  • Location:Manchester UK

In VSphere, VM properties, I deleted the IDE CDROM, then added a new SCSI device of type CDROM:
http://vmzare.files....eenshot0622.jpg

I can add a guide with screenshots tomorrow ;).

You know I must have missed it! Even with the years of working with VMware I sometimes miss the obvious.

#12
yozh

yozh

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 246 posts

In VSphere, VM properties, I deleted the IDE CDROM, then added a new SCSI device of type CDROM:
http://vmzare.files....eenshot0622.jpg

I can add a guide with screenshots tomorrow ;).



If there is no CDROM in the host, how can we add SCSI device ? It tells me that no non-disk SCSI devices present.

#13
Uranus

Uranus

    InsanelyMac Protégé

  • Members
  • Pip
  • 19 posts
I've tried everything I can think of, but all I get is the gray apple screen.
How can I boot mac os x into verbose mode with EFI? In the past, I could input the "-x" option in the darwin bootloader.

EDIT: tried a different lion installer. It gets stuck here now. I also tried booting my old vanilla snow leopard installer and all I get is the gray apple logo. (same behavior as the first lion installer)

EDIT2: this is a whitebox esxi with a Celeron E3200 cpu (very cheap, I know, but its only for my personal home use). Also, my snow leopard server used to work perfectly on esxi 4.1 with Donk's old patch.

#14
Dragon Draco

Dragon Draco

    InsanelyMac Protégé

  • Members
  • Pip
  • 1 posts
Hi Donk.
Thank you for patch.
Is there the way of powering OSX machine not from ESXi client but from VCenter?

#15
XBit

XBit

    InsanelyMac Protégé

  • Members
  • Pip
  • 6 posts
  • Gender:Male
  • Location:Bucharest
@Donk: I find out new things every day with vmware also :P

@yozh: This is not possible. You should try alternate methods:
1. Upgrade a woring SL to Lion
2. Donk's vmdk method
3. Install from USB if it works for you
4. Install in Workstation an copy the VM
5. ... please add more if I missed something.

#16
oegie

oegie

    InsanelyMac Protégé

  • Members
  • Pip
  • 27 posts
Running into the same problem as Dragon Draco:
It's not possible to start an OSX vm from vCenter. It tells me that the guest os 'darwin11_64Guest' is not supported.
This also prevents the vCenter from doing a successful vMotion. :)

#17
Donk

Donk

    InsanelyMac Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 2,025 posts
  • Gender:Male
  • Location:Manchester UK

Running into the same problem as Dragon Draco:
It's not possible to start an OSX vm from vCenter. It tells me that the guest os 'darwin11_64Guest' is not supported.
This also prevents the vCenter from doing a successful vMotion. :)

Same problem as existed in 4.0 and 4.1 then. I have no way around that, you have to use the ESXi host directly form the client. BTW have you tried with the guest set to 10.6? My Lion VM still boots with that setting? I have no access to this server via vSphere itself and so cannot try it for you.

#18
yozh

yozh

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 246 posts

@Donk: I find out new things every day with vmware also :)

@yozh: This is not possible. You should try alternate methods:
1. Upgrade a woring SL to Lion
2. Donk's vmdk method
3. Install from USB if it works for you
4. Install in Workstation an copy the VM
5. ... please add more if I missed something.


No I got Lion running, just wanted to add CDROM as it doesn't recognize the IDE one

#19
oegie

oegie

    InsanelyMac Protégé

  • Members
  • Pip
  • 27 posts
Hi Donk,

it's sad to hear that. The behavior does not change when selecting 10.6 (x64). As soon as i select for example FreeBSD the VM starts - but does not find the bootloader anymore and resets.
I wonder if this works on XServe hardware ...

So no vCenter support for OSX VMs and therefore no vMotion for us. *snief*


bye,
oegie

#20
atomiX_X

atomiX_X

    InsanelyMac Protégé

  • Members
  • Pip
  • 26 posts
  • Location:Canada, eh!
Thanks so much guys. I'm building a new ESXi 5 server and I was hoping something like Albert's unlocker would be released before I started installing everything. My wish has been realized!

Cheers





4 user(s) are reading this topic

1 members, 3 guests, 0 anonymous users


© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy