2012年9月6日 星期四

Creating a Bootable ESXi USB Stick on Mac OS X



From: link

Creating a Bootable ESXi USB Stick on Mac OS X
I recently found myself with a decent HP DL385 G2 server with no hard drives (itused to have hard drives, but now it doesn’t…there’s a long story behind it that I won’t get into here). So, I decided I’d try creating a bootable ESXi USB flash drive to use with the server. There are lots of guides out there for creating bootable ESXi USB flash drives, but none of them were written for users, like myself, who use Mac OS X. Telling a Mac user to use WinImage just doesn’t work, and while Linux-oriented guides are closer, they still don’t address any Mac-specific issues.
So, here’s my guide for creating a bootable ESXi USB flash drive from Mac OS X.
  1. Download the ESXi installable ISO.
  2. Double-click the ISO to mount it (an icon will appear on your desktop). From there, navigate the contents of the ISO image to find VMware-VMvisor-big-3.5.0-xxxx.i386.dd.bz2 and copy it out of the ISO image into a separate folder.
  3. Insert the USB flash drive into an available USB port. Mac OS X will mount the drive and an icon will appear on your desktop.
  4. Open the Terminal and type the following command:

    diskutil list

    On my system, the USB drive was listed as /dev/disk1, but your mileage may vary. It should be pretty easy to tell which device is the USB drive, as the first partition (i.e., /dev/disk1s1) will have a label that matches the name of the icon on the desktop.
  5. Type this command:

    diskutil unmountDisk /dev/disk1

    Replace /dev/disk1 in the command above with the appropriate entry for your system, as identified in the previous command. The icon for the USB flash drive will disappear from your desktop.
  6. Run this command:

    bzcat <path to VMware-VMvisor file> | dd of=/dev/disk1

    Replace /dev/disk1 in the command above with the appropriate entry for your system, as identified by the “diskutil list” command in step 4.
When the process completes—you’ll know because the Terminal prompt will return—use this command to “eject” the USB flash drive and make it safe for physical removal:
diskutil eject /dev/disk1
Again, replace /dev/disk1 with the appropriate device for your system.
At this point, the USB flash drive should be ready to roll. Insert it into a compatible server and virtualize away!
In the process of creating this guide, I found the following sites to be extremely helpful:
For Mac users, the special sauce is the “diskutil” command. Unmounting the USB drive from the Finder also made the underlying BSD device, i.e., /dev/disk1, disappear. Without unmounting it in Finder, the device is reported as “busy” and can’t be accessed (even via root). By using diskutil, we are able to make the device accessible.

沒有留言:

張貼留言