Installing ESXi imagedd.bz2

Now that I’ve managed to mount the CDROM, I can manually DD the image onto the destination disk.

I can do this will the following python script, all within the ESXi installer itself. I can scp this file in, and run it [and write any other preformatted .bz2 file onto the hard disk]:

#! /usr/bin/env python

# File:

import bz2
import os

buffsize = 1024 * 1024 # 1MB blocks

i_filename = "/vmfs/volumes/mpx.vmhba32:C0:T0:L0/IMAGEDD.BZ2"
#i_filename = "IMAGEDD.BZ2"
o_filename = "/vmfs/devices/disks/mpx.vmhba1:C0:T0:L0"
#o_filename = "IMAGEDD"

bz2_file = bz2.BZ2File(i_filename)
#out_file =,os.O_RDWR|os.O_TRUNC|os.O_CREAT)
# ESXi doesn't like TRUNC or CREAT. Assume the file exists:
out_file =,os.O_RDWR)

while True:
  b =
  if len(b) == 0 :


Now that I can arbitarily write images onto the hard disk, I should be able to make a cut down 64MB ESXi server.


One Response to Installing ESXi imagedd.bz2

  1. David Tenney says:

    Hi Chris,

    I’ve read a lot of posts regarding ESXi not being able to be installed via USB. After researching through the install.vgz file, I noticed that is looks like they specifically point to the cdrom as the installation device in the python scripts. I am by no means a python programmer, but I was wondering if you had any ideas on how to call a USB/NFS device for the image instead. The problem we face currently in our environment is whenever we need to install ESXi on several servers of the same hardware, it becomes tedious to have several cds of the same image for the installations.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: