Clone an ESXi installation from a USB flash drive

USB flash media is quite a common way of running the ESXi OS these days.  It pays to have a working clone of this media so that in the event of a failure you are quickly back up and running again.

First list the available disks using:

ls -l /dev/disks/

 

USB devices are usually listed as mpx.vmhba32:C0:T0:L0. You can usually tell this is an ESXi install looking at the partitions (ID5-9).

Next you need to write the entire USB image to disk. Remember if you have a 32GB USB it will write 32GB regardless of the space used. Also remember that this is Linux so your datastore names are case sensitive in the command.

dd if=/dev/disks/mpx.vmhba32:C0:T0:L0 of=/vmfs/volumes/ds1/images/esx1.img

 

Next download the USB image tool from here.

Open the tool and simply select your device and click restore. You can then select the esx1.img file you just created to write to disk.

Leave a Reply

Your email address will not be published. Required fields are marked *