Running VMware ESXi Hypervisor

This guide applies to VMware ESXi 3.5.0

VMware ESXi is a free Hypervisor from VMware. In simple terms, a host for virtual machines. The difference from VMware Server, which also is a free Hypervisor, is that ESXi runs directly on the hardware whereas VMware Server need to run on top of another operating system.

When I first started thinking about virtualizing my home server, I initially though about VMware Server. Simply because that was the only free alternative I knew about. It was only when I attended a VMware Infrastructure course a few weeks ago I learned about ESXi. What intrigued me about ESXi was the fact it could boot from a USB pen drive.

But where VMware Servers can use of all the hardware available to the underlying operating system, ESXi has very limited hardware support. However, rules are meant to be broken. Right?

Making a bootable ESXi USB pen drive:

Let’s make a bootable ESXi USB pen drive. The easiest way to do this is using Linux and some more or less standard programs. You can also do this on Windows, just follow this guide from Yellow Bricks which is the guide I used to make this one.

  1. Download the free ESXi ISO-image from VMware. You need to register so you can get your free licence code.
  2. Mount the ISO-file. ( “mount -o loop ESXi.iso /mnt/iso” )
  3. Extract “install.tgz” ( “mkdir /root/esxi; tar xvf install.tgz -C /root/esxi” )
  4. Go to the directory where you unpacked the files, and then some. ( “cd /root/esxi/usr/lib/vmware/installer” )
  5. Unzip the big-file. (” bunzip2 VMware-VMvisor-big-3.5.0_Update_3-123629.i386.dd.bz2“)
  6. Place this image onto your USB stick. This WILL destroy all data on the USB pen drive. Also, you need to know which device your pen drive is. Mine was “/dev/sdb” ( “dd if=VMware-VMvisor-big-3.5.0_Update_3-123629.i386.dd of=/dev/sdb” )
  7. Step 6 will take a while since we’re writing 750MB of data to the USB-stick. When it’s finished you will have stock ESXi installation on a bootable USB pen drive. Congrats!

More hardware support.

As mentioned earlier, ESXi has very limited hardware support out of the box. However, the VMkernel itself has better hardware support which VMware doesn’t wants us to know about. You only need to find out how to enable it.

For my own part I added a 3Com network adapter, since there is no way my onboard Realtek is supported. 3Com and Intel cards should be a safe bet, but don’t take my word for it. Also I wanted to use the computers local SATA disks as datastores. Thus the hacking begin.

I used several hours on reading different websites on how to enable VMkernel to recognize my SATA controller, but I could have saved me the trouble. In the end I found a site which already had the files ready to go.

Short and simple.

  1. Download the Community Unified oem.tgz file from this lovely website.
  2. Mount the partition on the USB drive called Hypervisor1. This should be the second partition on you USB drive. Mine was “/dev/sdb2”. ( “mount /dev/sdb2 /mnt/usb” )
  3. Replace the oem.tgz file on the USB drive with the one you downloaded. ( “cp oem.tgz /mnt/usb/” )
  4. Umount and you’re done. ( “umount /mnt/usb” )

I can’t guarantee that this setup will recognize your hardware, but it sure found mine. I couldn’t have made this guide without the information I found on the Internet, so it’s time for credit:

[1] http://www.grid.org/blog/cameron/development-using-vmware-server-esxi

[2] http://www.grid.org/blog/cameron/updating-vmware-esxi-disk-dump-file

[3] http://www.yellow-bricks.com/2008/07/29/esxi-35-update-2-on-a-usb-memory-key/

[4] http://www.vm-help.com/esx/esx3i/customize_oem_tgz.php

As always, comments are appreciated.

11 thoughts on “Running VMware ESXi Hypervisor

  1. whats the point of running ESX on a flashdrive?

    Is there not enought space on your hdd for it?

    do you need to travel with ESX drive to places?

    Im lost on the benifit or purpose to this?

  2. Rick:
    Hi, thanks for the reply.

    There might be several reasons to run VMWare ESXi from a flash drive. Let’s say the hardware you’re running it on dies, then it’s easy to replace it with an identical server. Plug and play. This of course means that your data stores must be located on an external drive, like a SAN.

    My main reason to install ESXi on a flash drive was because I could. To test it. Also, I didn’t have a monitor laying around to the machine I intended to run ESXi from. So I configured the flash pen drive on my IBM Lenovo ThinkPad X61, and then plugged it into the server and booted.

    I don’t run this as mission critical, it’s for my own amusement. On the office however, we run the full-blown ESX with Virtual Center (now vCenter Server).

  3. Really interesting post.

    I’m trying to run ESXi as a test/prototype on a machine with an existing OS. Leaving aside the fact that it would be safer to run ESXi on a bare-metal box – what happens to the host PC when you start it up from the ESXi’d USB drive?

    I notice from other docs I’ve read that to install ESXi onto the machines it wipes the HDD (unless you do certain jiggery-pokery). With the USB solution will it just use the system resources but not touch the HDDs? Or will it wipe them as if I had installed it straight onto the box?

    If that makes sense…

  4. Robin:

    If you install ESXi correctly on a USB stick, it won’t touch the local HDDs on the box. However, to be able to run a guest OS, ESXi needs a place (data store) to keep the images.

    I think you can create a data store on a single partition, but I can’t guarantee it. When a data store is created, it will wipe out all the data on that partition/disk.

  5. I have an ESXi server with several disks. ESXi is installed on disk1, but when I boot the box I get a warning that the disk is faulty and should be replaced. So I thought I would use a USB stick instead. The machine boots just fine, but it seems to have lost the definition of the datastores that contain all my VMs on the other disks. If I try and create a new datastore on a disk, any previous data on the disk will be lost.

    Do you know if I can somehow get the new system to recognise the datastores that already exist on the other disks?

    I have enabled ssh and I had a look in /etc/vmware/esx.conf but no signs of any datastore config there.

    Any info would be much appreciated.

    P.S. my unix is a bit rusty but isn’t there a more command you canuse? I don’t seem to be able to use it when I ssh??

    Thanks,
    Chris

  6. Just set-up my first ESXi White Box and was going to use the instructions to create a USB stick, however, I ended up downloading the ISO modified by Dell (available from VMWare). Install went on fine without further modification and I am now running ESXi from USB.

    The test server I am using is a Dell Precision 490 Workstation, 3.2 GHz Dual Core Xeon CPU, 8 GB of RAM and 3 750Gb SATA disks. Just thought I would post it here in case someone else is looking to do the same.

    Thanks
    J

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.