Monday, January 26, 2009

Installing ESXi on a USB Memory Stick

To learn ESX in detail I decided I need to setup a home computer lab. The lab will consist of 2 - ESXi 3.5 Severs, 1 - NAS box (OpenFiler, FreeNAS or NFS) and a Windows computer for Vcenter. VMware offers ESXi for free and you can boot ESXi from a USB stick. The motherboards I am looking at have SATA controllers that are not supported by ESX so being able to boot ESXi on USB is very handy. Booting ESXi from USB also frees up the harddrives so I can use them in the NAS box.

After some research I put together the steps needed to create a bootable ESXi USB stick. Most of the sites that tell you how to create an ESXi USB sticks are missing steps. After putting together the steps needed to create the bootable ESXi USB stick I decided to save others the headaches of hunting multiple sites and post a complet set here. The steps below are all done using a Linux system. You can do this on a non virtualized Linux system or a Linux VM running on VMware Workstation or a VMware Linux application as long as it has USB support.

You will need to download the ESXi ISO from VMware's website.

I) Get the VMware ESXi dd image from the VMWare esx ISO:

1) Copy the ESXi ISO to the a folder on the linux system.

2) Mount the ISO.
> mount -o loop VMware-VMvisor-InstallerCD-3.5.0_Update_3.iso /mnt/img

3) Get the installer.tgz file off the iso.
> cd /mnt/img
> cp install.tgz /root

4) Create a temp directory.
> mkdir /root/tmp

5) Move the install.gz file to the temp directory.
> mv install.tgz /root/tmp

6) Extract install.tgz file.
> cd /root/tmp
> tar zxvf install.tgz

7) Get the dd image.
> cd /root/tmp/usr/lib/vmware/installer/
> cp VMware-VMvisor-big-3.5.0_Update_3-123629.i386.dd.bz2 /root/

8) Extract the dd image
> cd /root
> bunzip2 VMware-VMvisor-big-3.5.0_Update_3-123629.i386.dd.bz2

9) You should now have dd image that can be burned to a 1 or 2 Gig USB stick.
USB 2.0 drive HIGHLY recommended.

10) Unmount the ISO.
> umount /mnt/img


II) Burn the dd image to the USB drive

1) Check current devices
> List devices: type: fdisk -l <-- NOTE: that is a lower case L not the number 1
> You will see a list of current devices
(NOTE: Your listing may be different):

Disk /dev/hdb: 64 heads, 63 sectors, 621 cylinders
Units = cylinders of 4032 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 * 1 184 370912+ 83 Linux
/dev/hdb2 185 368 370944 83 Linux
/dev/hdb3 369 552 370944 83 Linux
/dev/hdb4 553 621 139104 82 Linux swap

2) Connect the USB thumb drive to the Linux box.

3) Check current devices again
> List devices: type: fdisk -l <- NOTE: that is a lower case L not the number 1
> You will see a list of current devices
(NOTE: Your listing may be different):

Disk /dev/hdb: 64 heads, 63 sectors, 621 cylinders
Units = cylinders of 4032 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 * 1 184 370912+ 83 Linux
/dev/hdb2 185 368 370944 83 Linux
/dev/hdb3 369 552 370944 83 Linux
/dev/hdb4 553 621 139104 82 Linux swap
Disk /dev/sdb: 1043 MB, 1043333120 bytes
64 heads, 32 sectors/track, 995 cylinders
Units = cylinders of 2048 512 = 1043333120 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 995 1018863+ 6 FAT16
Partition 1 has different pyhsical/logical endings:

NOTE: You know have a device called /dev/sdb1
This is the USB thumb drive.

4) Make sure the USB drive did not automount.
> mount

5) If the USB drive is mounted unmount it before proceding.
> umount /mount/point

6) dd the image to the USB drive.
> dd if=VMware-VMvisor-big-3.5.0_Update_3-123629.dd
of=/dev/sdb bs=500MB

7) The USB thumb drive should now be able to boot ESXi.

This worked using a Memorex 2 Gig USB2.0 thumb drive. I was able to boot a server to ESXi without any problems. There are also tools out on the web that allow you to create the ESXi USB stick on Windows but I have not tried them.

Next time I will give details of the hardware I am going to use for my home lab.

Sunday, January 25, 2009

Improvement Through Uncertainty

Economic uncertainties and the desire to gain a deeper understanding of ESX have brought me to the point where I feel I need to get my VCP. It will not only help me improve my current projects at work, but it will also give me a marketable certification in the event that I need to pursue other opportunities.



This blog will be a place to share with others my preparation for getting my VCP Certification. I plan to share ideas, tips, resources and stories about VMware ESX and the VMware VCP. I look forward to sharing my experiences, tips and any other helpful information.



Don't waste life in doubts and fears; spend yourself on the work before you, well assured that the right performance of this hour's duties will be the best preparation for the hours and ages that will follow it. -- Ralph Waldo Emerson