Tuesday, August 11, 2009

VM usb

This post will explain how to do create a VMware ESXi bootable USB pen drive, note that it will not be an installer, but a live system running on an USB drive.
First of all you should use it for testing hardware systems for compatibility, avoiding to install the hypervisor on the system, or you can use it to play (as I’m doing) with it on your notebook or desktop.

The following is the two procedure to follow to create it based on Linux and Windows operating systems :

This post will assume you’ve already have an ISO image of the latest VMware ESXi hypervisor on your system, if you don’t have it, please download it for free at http://www.vmware.com

Linux :

Locate the ISO image.
Mount it in a directory on your system (if you don’t know how, look here : http://www.riccardoriva.com/archives/64) and extract the file you need with the following commands :

sudo mkdir /tmp/iso
sudo mount -o loop -t iso9660 VMware-VMvisor-InstallerCD-3.5.0_Update_4-153875.i386.iso /tmp/iso/
sudo cp /tmp/iso/install.tgz /tmp/
sudo umount /dev/loop0

sudo tar -xzvf /tmp/install.tgz usr/lib/vmware/installer/VMware-VMvisor-big-3.5.0_Update_4-153875.i386.dd.bz2
cd /tmp/usr/lib/vmware/installer/
sudo bunzip2 VMware-VMvisor-big-3.5.0_Update_4-153875.i386.dd.bz2

Now insert your USB Pen Drive (at least 2 GB) in your system and locate it (tipically /dev/sdb).

Copy to it the image with the following command :

sudo dd if=/tmp/usr/lib/vmware/installer/VMware-VMvisor-big-3.5.0_Update_4-153875.i386.dd of=/dev/sdb BS=1M

Umount your en Drive

sudo umount /dev/sdb

Reboot your system and check your BIOS configuration for enabling “Boot from USB devices”, and check if something goes wrong.

Windows :

For windows system you should need two free software (portable) to do all works :
7-Zip Portable : http://portableapps.com/apps/utilities/7-zip_portable
DD For Windows : http://www.chrysocome.net/dd

Open the ISO file with 7zip, locate “install.tgz” and open it, locate “install.tar” and open it,
locate the folder “\usr\lib\vmware\installer\”, locate the fle : “VMware-VMvisor-big-3.5.0_Update_4-153875.i386.dd.bz2″ and open it.
Extract the file “VMware-VMvisor-big-3.5.0_Update_4-153875.i386.dd” in a temporary directory of your system (i.e. C:\temp).

Insert your pen drive (at least 2 GB) on your system and wait a couple of seconds.

Check the device ID of your pen drive using DD for Windows (by opening a command prompt on the DD directory) with the following comand :

dd –list

Then use the following syntax to copy the dd image on your removable device :

dd bs=1M if=VMware-VMvisor-big-3.5.0_Update_4-153875.i386.dd of=\\?\Device\Harddisk1\Partition0 –progress

You’ve done

Hope this help

Bye
Riccardo