I was seeking the other day for an utility which would allow me to create an exact copy of an USB key with VMware ESXi installed. To clone ESXi installed on USB stick to another USB. I looked through the internet and tried a freeware utility that did not work (ImageUSB), but then stumbled across Clonezilla which works like a charm.
To use Clonezilla I used the liveCD ISO environment hooked to a Linux VM on my VMware Workstation. I think this tool is just great for the job and I'll put it on with other free tools to my Free tools page.
Why would you need to create a backup of ESXi installed on USB stick?
There might be several reasons, one of them would be to have a separate USB “just in case“, or perhaps you just want to have piece of mind or If you're using USB stick in one of your hosts at remote location and want to provide a copy of the boot media as a part of DR process. In case of a USB stick failure it's easy to ask someone to plug-in an another one…
Here are the steps to clone ESXi from one USB stick to another:
1. Download Clonezilla liveCD – I picked up i486 architecture as an ISO file.
The ISO file is 138 Mb of size. Yeah, that's pretty big.
I then used VMware Workstation to create a VM to boot the iso. You can also use VMware Player if you don't have Workstation. The live environment allows boot up into a GUI then selecting the source USB and the destination USB.
Both MBR and GPT partition format of hard drive are supported. Clonezilla live also can be booted on a BIOS or uEFI machine.
2. Create a VM in VMware Workstation – When creating new VM on VMware Workstation I picked up a Linux Debian x64 VM with default settings. Connect the LiveCD to the system and boot the VM. Choose your keyboard, keymap and start Clonezilla.
3. Select Device-Device to work directly from disk-to-disk or USB-to-USB mode. The other mode (device-image) allows creating an image of disk or partition (like Acronis or other tools).
4. Plugin both USB keys to your workstation and choose the Beginner Mode which is easier to work with and in our situation is pretty sufficient. Now you should see your both USBs (source and destination) and also a “VMware Virtual disk” which is the VMDK of your Linux VM. Choose a source disk by using arrows on your keyboard.
5. Select destination USB and I think it's safe to skip checking/repairing source file system. Hit enter.
The software clones partition after partition, so in our case ESXi has more than one partitions. Take few min break and let the process finish.
Note that the USBs does not have to be necessarily the same size! At the end you have both USB exactly the same. The whole process might take 5 min of your time and as the config of an ESXi perhaps does not change too often (in case it's a ROBO or lab environment). The advantage is that to clone ESXi based USB stick is very easy to do. Enjoy… -:)