Creating a bootable ESX USB installation disk with OS X

From Iwan
Jump to: navigation, search

For my new lab server I have created a new bootable USB flash disk for the initial installation of ESX version 6. As I am a Mac user I found this procedure that explains how to create a bootable ESX 6 USB drive using OS X.

Creating the disk

Download "VMware-VMvisor-Installer-6.0.0.update02-3620759.x86_64.iso" from the VMware website.

Download the "vmware-usb-osx-master" tool and upzip it.

Browse to the "vmware-usb-osx-master" directory.

root ##b##Iwans-MacBook-Pro:~ iwanhoogendoorn$ cd Downloads/
root ##b##Iwans-MacBook-Pro:Downloads iwanhoogendoorn$ cd vmware-usb-osx-master

Verify if the "VMware-VMvisor-Installer-6.0.0.update02-3620759.x86_64.iso" is in that directory and if not place it in there.

root ##b##Iwans-MacBook-Pro:vmware-usb-osx-master iwanhoogendoorn$ ls
LICENSE
Makefile
README.md
root ##b##VMware-VMvisor-Installer-6.0.0.update02-3620759.x86_64.iso
syslinux.cfg

Rename "VMware-VMvisor-Installer-6.0.0.update02-3620759.x86_64.iso" to "esxi.iso".

root ##b##Iwans-MacBook-Pro:vmware-usb-osx-master iwanhoogendoorn$ mv VMware-VMvisor-Installer-6.0.0.update02-3620759.x86_64.iso esxi.iso

Verify if the renaming is done correctly.

root ##b##Iwans-MacBook-Pro:vmware-usb-osx-master iwanhoogendoorn$ ls
LICENSE Makefile README.md esxi.iso syslinux.cfg

Verify the disks that are currently inserted.

root ##b##Iwans-MacBook-Pro:vmware-usb-osx-master iwanhoogendoorn$ make devices
diskutil list
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:          Apple_CoreStorage Macintosh HD            999.7 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
/dev/disk1 (internal, virtual):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                  Apple_HFS Macintosh HD           +999.3 GB   disk1
                                 Logical Volume on disk0s2
                                 75DB85AD-BE28-43ED-9487-C1BA421E5D17
                                 Unencrypted
/dev/disk4 (disk image):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     Apple_partition_scheme                        +18.1 MB    disk4
   1:        Apple_partition_map                         32.3 KB    disk4s1
   2:                  Apple_HFS Flash Player            18.1 MB    disk4s2

Insert the USB Flash Disk at this point.

root ##b##Iwans-MacBook-Pro:vmware-usb-osx-master iwanhoogendoorn$ make devices
diskutil list
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:          Apple_CoreStorage Macintosh HD            999.7 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
/dev/disk1 (internal, virtual):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                  Apple_HFS Macintosh HD           +999.3 GB   disk1
                                 Logical Volume on disk0s2
                                 75DB85AD-BE28-43ED-9487-C1BA421E5D17
                                 Unencrypted
root ##b##/dev/disk2 (external, physical):
root ##b##   #:                       TYPE NAME                    SIZE       IDENTIFIER
root ##b##   0:      GUID_partition_scheme                        *4.0 GB     disk2
root ##b##   1:                        EFI EFI                     209.7 MB   disk2s1
root ##b##   2:                  Apple_HFS Untitled                3.7 GB     disk2s2
/dev/disk4 (disk image):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     Apple_partition_scheme                        +18.1 MB    disk4
   1:        Apple_partition_map                         32.3 KB    disk4s1
   2:                  Apple_HFS Flash Player            18.1 MB    disk4s2

You will see that a new disk "disk2" is there and this is the USB Flash disk that we will use for the bootable disk creation.

Now we can create the actual boot disk.

root ##b##Iwans-MacBook-Pro:vmware-usb-osx-master iwanhoogendoorn$ make vmware DISK=2
hdiutil convert -format UDRW -o esxi.img esxi.iso
Reading ESXI-6.0.0-20160302001-STANDARD  (Apple_ISO : 0)…
...............................................................................
Elapsed Time:  1.649s
Speed: 217.0Mbytes/sec
Savings: 0.0%
created: /Users/iwanhoogendoorn/Downloads/vmware-usb-osx-master/esxi.img.dmg
root # Format USB device as a bootable MS-DOS volume
diskutil unmountDisk /dev/disk2
Unmount of all volumes on disk2 was successful
diskutil eraseDisk MS-DOS ESXI MBR /dev/disk2
Started erase on disk2
Unmounting disk
Creating the partition map
Waiting for the disks to reappear
Formatting disk2s1 as MS-DOS (FAT) with name ESXI
newfs_msdos: warning: sectors/FAT limits sectors to 7866358, clusters to 981374
512 bytes per physical sector
/dev/rdisk2s1: 7850992 sectors in 981374 FAT32 clusters (4096 bytes/cluster)
bps=512 spc=8 res=32 nft=2 mid=0xf8 spt=32 hds=255 hid=2 drv=0x80 bsec=7866358 bspf=7667 rdcl=2 infs=1 bkbs=6
Mounting disk
Finished erase on disk2
root # Mount USB device to add syslinux.cfg
mkdir -p source
mkdir -p target
hdiutil mount esxi.iso -mountpoint ./source
/dev/disk3                                          /Users/iwanhoogendoorn/Downloads/vmware-usb-osx-master/source
cp -r source/ /Volumes/ESXI/
cp syslinux.cfg /Volumes/ESXI/
hdiutil eject ./source
"disk3" unmounted.
"disk3" ejected.
diskutil unmountDisk /dev/disk2
Unmount of all volumes on disk2 was successful
diskutil eject /dev/disk2
Disk /dev/disk2 ejected
root ##b##Iwans-MacBook-Pro:vmware-usb-osx-master iwanhoogendoorn$

And you are finished.