Thursday, September 13, 2012

Well... I got ESXi 5.0 installed on the MacBook but I was unable to get Mountain Lion to work. VMWare just came out with ESXi 5.1 which supports Mountain Lion so I attempted to install ESXi 5.1 on a USB key and get it up and running on my MacBook. 5.1 was a little different from 5.0 as the installerhelper.sh appears to operate differently...? Anyways, what I had to do was slipstream the sky2 driver into the ESXi 5.1 image, boot into "ESXi 'No Network Adapters Found'" then Fn-Option-F1 into the console. I then typed the following commands:

vmkload_mod sky2
esxcfg-init -n
vmkload_mod lvmdriver
install

Without the lvmdriver the install would not see the storage (USB or HDD)

I am now installing ESXi 5.1 onto my MacBook. Hopefully, I'll be able to run Mountain Lion from it :)

Tuesday, September 04, 2012

I'm looking to get my MacBook 4,1 under a little more utilization and I thought playing with VMWare's ESXi-5 on it would be interesting. As well, I'm hoping that I'll be able to install a virtualized Mountain Lion in there (unsupported natively on this MacBook). My first attempt at installing ESXi 5U1 was a miserable disaster. ESXi won't let you complete the installation process without a NIC. This triggered a search to find what NIC was in my MacBook (Marvell Yukon 88E8055 VEN_11AB&DEV_436A) and a requirement to get it working.

It got me started on the path I needed to enable the drivers for my MacBook. I found that the Marvell driver is already included but it is only enabled for two device ID's and neither were the same as my macbook's; but they were from the same family.

I later found that the driver supports my device ID but you need to edit a text file in the VMWare driver files to enable it. This will not work though, because VMWare signs their files and if there is a mismatch it will error out (unable to boot or corrupt image or some such). To get around this we need to inject the driver into the ESXi installer.

In order to do this I needed to understand how to make a driver injectable. It appears whatever you make will overwrite files during the unpacking process when ESXi is booting. I was able to "sort-of" confirm this by packing up the sky2 driver and including my Device ID in the ESXi driver ID file. When I packed up the sky2 binary driver in addition to the text files the install would error out. Since it's redundant to include the driver as well, I just tried including the driver text file that enables the deviceID. This file could be located here:

"\etc\vmware\driver.map.d\sky2.map"

To also make this more complicated I did everything on Windows and had to install UnxUtils and UnxUpdates and some Cygwin tools to do the archiving/unarchiving.

I compressed the file into a .tgz (bsdtar -cvzf sky2.tgz "etc") and then used ESXi Customizer 2.7 to inject it into a generic ESXi 5.0U1 image. I then used Linux Live USB Creator to move the ISO to a USB key that was made bootable.

I could now boot my MacBook4,1 off the USB key. At least, it worked to a point. I got to a stage where I was notified that I had no Network Adapters Found. At this point I dropped into the ESXi console (Fn-Option-F1), logged in to root and ran the following commands:

The install command kicked me out to the default console where I was sitting at the "Network Adapters Not Found" screen. Simply Fn-Option-F1 to return to the console and run through the install prompts. Choose the same USB key you used earlier (or choose a new one if you prefer) and do the install. Once it's complete; restart onto the USB key. You should go into a full ESXi install but the network (for me anyways) was still no working correctly. I had to enable the console through the "GUI" of the text screen, drop into the console and run vmkload_mod sky2 and I had network again and was up and running. Once I can figure out how to automatically run that command I will come back and update this post. But for now I have ESXi working on a old MacBook and hopefully I'll be able to install Mountain Lion on this old workstation :)