Tag Archive: Mac OS X


I wanted to deploy a new OSX Lion 10.7.2 virtual machine this morning so thought I best first run the latest unlocker from : http://www.insanelymac.com/forum/index.php?showtopic=267296

I downloaded the unlocker, unzipped onto one of my datastores and tried to run it from one of my ESXi hosts:

/vmfs/volumes/9fe35ffc-47004197/unlock/esxi # ./install.sh 
VMware ESXi 5.0 Unlocker 1.0.1
==============================
Patching files...
Setting permissions...
Patching bin/vmx
open failed Permission denied

Damn- the error was coming from the Unlocker.ESXi application so I couldn’t peak at the code to see which file(s) were causing the permissions error. However, as we’re passing the newly patched files from bin/ I thought it was safe to assume these were the cause of the problem. I chmod 777 bin/* then ran ./Unlock.ESXi bin/ and the permission error had gone :)

I modified install.sh and ran again:

/vmfs/volumes/9fe35ffc-47004197/unlock/esxi # ./install.sh 
VMware ESXi 5.0 Unlocker 1.0.1
==============================
Patching files...
Patching bin/vmx
Patching bin/vmx-debug
Patching bin/vmx-stats
Setting permissions...
Creating darwin.tgz...
bin/
bin/vmx
bin/vmx-stats
bin/vmx-debug
Adding darwin.tgz to boot.cfg...
Acquiring lock /tmp/bootbank.lck
Copying darwin.tgz to /bootbank/darwin.tgz
Editing /bootbank/boot.cfg to add module darwin.tgz
sed: /bootbank/boot.cfg: No such file or directory
Editing /bootbank/boot.cfg failed: 1
Please now reboot the host system!

Doh! I’m not sure whether the missing boot.cfg is worrying or normal- but I went ahead and created an empty placeholder touch /bootbank/boot/cfg then ran the unlocker again:

/vmfs/volumes/9fe35ffc-47004197/unlock/esxi # ./install.sh 
VMware ESXi 5.0 Unlocker 1.0.1
==============================
Patching files...
Patching bin/vmx
Patching bin/vmx-debug
Patching bin/vmx-stats
Setting permissions...
Creating darwin.tgz...
bin/
bin/vmx
bin/vmx-debug
bin/vmx-stats
Adding darwin.tgz to boot.cfg...
Acquiring lock /tmp/bootbank.lck
Copying darwin.tgz to /bootbank/darwin.tgz
Editing /bootbank/boot.cfg to add module darwin.tgz
Please now reboot the host system!

Perfect :) I added the permissions fix and missing boot.cfg fix to the install.sh script- see the revised script below:

#!/bin/sh
set -e

echo VMware ESXi 5.0 Unlocker 1.0.2T
echo Modified by tickett.wordpress.com
echo =================================

# Ensure we only use unmodified commands
export PATH=/bin:/sbin:/usr/bin:/usr/sbin

# Make sure working files are removed
rm -f darwin.tgz
rm -rf ./bin

# Patch the vmx files and place into bin folder
echo Patching files...
rm -rf ./bin
mkdir bin
cp /bin/vmx bin/
cp /bin/vmx-debug bin/
cp /bin/vmx-stats bin/
## tickett: added to fix open failed Permission denied
chmod 777 bin/*
##
./Unlocker.ESXi bin/

# Ensure correct permissions are set
echo Setting permissions...
chmod 4555 bin/*

# Create the tar file for ESXi kernel
echo Creating darwin.tgz...
tar -czvf darwin.tgz bin/

# Add entry to the boot configuration file
echo Adding darwin.tgz to boot.cfg...
## tickett: added to fix error when boot.cfg missing
touch /bootbank/boot.cfg
##
BootModuleConfig.sh --add=darwin.tgz --verbose

# Clean up
rm -f darwin.tgz
rm -rf ./bin

echo Please now reboot the host system!

Or to download click : http://tickett.net/downloads/esxi_unlocker_patched_1.0.2T.zip (note this is just the patched install.sh- you will need to download the rest of the files from http://www.insanelymac.com/forum/index.php?showtopic=267296)

Thanks to Donk and Zenith432 for making Mac OS X on ESXi possible without Apple hardware!

L

Mac OS X Lion on ESXi 5

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.

Fresh OSX Lion Installation

I’ve just got a new SSD for my MacBook Pro (official apple- toshiba 256GB) and decided to install OS X Lion and all my apps from scratch. This is basically a list of said apps for me to reflect on at a later date :)

OS X Lion
Picasa
Chrome
Virtualbox
Citrix Receiver
VLC
Filezilla
UnRarX
Photoshop CS5
Skype
Office 2011

Not noticed many differences in Lion yet… other than the scrolling works in the opposite direction to previous version (two-finger down scrolls up and two-finger up scrolls down… seemed odd at first but got used to it before i even bothered finding the setting to change it!).

L

%d bloggers like this: