Updating the VMWare ESXi Disk Dump File

Cameron's picture

So in my previous blog I said I used iSCSI to mount the VMware-VMvisor-big-3.5.0_Update_2-103909.i386.dd disk dump included in the VMWare ESXi install...I recieved a few comments about this as it is a heavy handed way of getting the support you need, so I figured out a non-iscsi way of mounting the VMware-VMvisor-big-3.5.0_Update_2-103909.i386.dd file.

If you haven't read my other blog the VMware-VMvisor-big-3.5.0_Update_2-103909.i386.dd file is on the VMWare installer media inside the install.tgz file as VMware-VMvisor-big-3.5.0_Update_2-103909.i386.dd.bz2. This file is a bziped disk dump of a complete hard drive...it has 6 partitions defined inside of it. The first thing you need to do is determine the offset to the parttition you wish to mount..in our case that is most likely partition 5 as it contains the oem.tgz file:

  1. Untar-gz install.tgz (mkdir /tmp/esx-temp; tar -xzvf install.tgz -C /tmp/esx-temp)
  2. Unbzip2 the disk image (cd /tmp/esx-temp/usr/lib/vmware/installer;bunzip2 VMware-VMvisor-big-3.5.0_Update_2-103909.i386.dd.bz2)
  3. Determine the sector size (fdisk -ul VMware-VMvisor-big-3.5.0_Update_2-103909.i386.dd)

This should print out the following:

 

[root@cbrunner-f8 installer]# fdisk -ul VMware-VMvisor-big-3.5.0_Update_2-103909.i386.dd
You must set cylinders.
You can do this from the extra functions menu.
Disk VMware-VMvisor-big-3.5.0_Update_2-103909.i386.dd: 0 MB, 0 bytes
64 heads, 32 sectors/track, 0 cylinders, total 0 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x00000000
Device Boot      Start         End      Blocks   Id  System
VMware-VMvisor-big-3.5.0_Update_2-103909.i386.dd1            8192     1535999      763904    5  Extended
VMware-VMvisor-big-3.5.0_Update_2-103909.i386.dd4   *          32        8191        4080    4  FAT16 <32M
VMware-VMvisor-big-3.5.0_Update_2-103909.i386.dd5            8224      106495       49136    6  FAT16
VMware-VMvisor-big-3.5.0_Update_2-103909.i386.dd6          106528      204799       49136    6  FAT16
VMware-VMvisor-big-3.5.0_Update_2-103909.i386.dd7          204832      430079      112624   fc  Unknown
VMware-VMvisor-big-3.5.0_Update_2-103909.i386.dd8          430112     1535999      552944    6  FAT16
Partition table entries are not in disk order

 

As you can see the sector size is 512 bytes...so now you can mount any of the partions by passing the "offset" option to mount with a value equal to the start block * 512. Here are the steps...

  1. Make a temp mout directory (mkdir /tmp/esx-5)
  2. Mount the partition 5 through the loopback device (mount -o loop,offset=$((512*8224)) VMware-VMvisor-big-3.5.0_Update_2-103909.i386.dd /tmp/esx-5/ )

The $((512*8224)) automatically does the multiplication for you...isn't that nice. (Note 8224 is the start block for partition 5). At this point if you do a "ls /tmp/esx-5" you get:

 

[root@cbrunner-f8 installer]# ls /tmp/esx-5/
binmod.tgz  boot.cfg  cim.tgz  environ.tgz  license.tgz  oem.tgz  vmkernel.gz

 

You can now update the oem.tgz file. When you are done you need to "umount /tmp/esx-5 ", bzip the disk image "bzip2 VMware-VMvisor-big-3.5.0_Update_2-103909.i386.dd", and then rebuild install.tgz (cd /tmp/esx-temp/; tar czvf ../install.tgz sbin/ usr/).

-Cameron

4
Average: 4 (6 votes)

Comments

Is it possible to add

Is it possible to add Adaptec ASC-39320u(B) scsi controller support so
when i try to install esxi it will find they hard disks (in raid0) and
allow the installation to complete? I have been wondering this for a while, and I'm not sure.

I just moved all our vm's

I just moved all our vm's from one san to another and i've repointed
the swap file. The last thing that needs to be done is to move the
vmware core dump Partion.
how do i go about doing this.

This tip outlines how to

This tip outlines how to install and configure VMware ESXi, ... the additional space is used for VMware tool installs, swap and core dump partitions.


Reply

Using the free license keys deactivates the VMMotion support I believe, so if you want to test that out you should probably wait to activate your ESXi install.

Re:

This file is a bziped disk dump of a complete hard drive...it has 6
partitions defined inside of it. The first thing you need to do is
determine the offset to the parttition you wish to mount..in our case
that is most likely partition 5 as it contains the oem.tgz file.

Cameron's picture

Scsi Controller

I don't have any experience with that controller so I don't know if it will work.  If it isn't being detected by default then ESXi probably doesn't include a RAID driver for the controller...in this case you should try to configure your controller to run in a non-raid mode.  As for updating the dd file...My comment

You can now update the oem.tgz file. When you are done you need to
"umount /tmp/esx-5 ", bzip the disk image "bzip2
VMware-VMvisor-big-3.5.0_Update_2-103909.i386.dd", and then rebuild
install.tgz (cd /tmp/esx-temp/; tar czvf ../install.tgz sbin/ usr/).

Covers that process...(after changing oem.tgz)

  1. umount /tmp/esx-5
  2. cd /tmp/esx-temp/usr/lib/vmware/installer
  3. bzip2 VMware-VMvisor-big-3.5.0_Update_2-103909.i386.dd
  4. cd /tmp/esx-temp; tar czvf ../install.tgz sbin/ usr/

The install.tgz is now in /tmp and can be copied to the USB thumbdrive.

Cameron's picture

Driver issues

There is something in ESX that lists which types of drivers are valid for use as installation drives...i don't know where this is. When I was getting my boxes working I added the PCI ids for all of the ways that the ICH8 could be configured in the BIOS (Based on how the bios was configured the system would report different PCI id's). While some of the IDE settings would work enough for the disk to be detected only the AHCI mode worked for me. I would make sure that your NVida SATA controller is in a RAID mode if possible...make sure you stay away from anything IDE.

-Cameron

Cameron's picture

I would guess you probably

I would guess you probably packed the tarball incorrectly...follow my instructions exactly when re-taring up the files.  A leading "." in the paths stored in the archives will create an invalid image.

 

-Cameron

Cameron's picture

ESXi On IDE Drives

Great find! I hope the perfomance is good. You solution could potentially open up VMWare ESX for virutally any PC using the ata_piix and ide modules.

-Cameron

Cameron's picture

e1000 Driver

Doing some quick searching it appears that the Intel 82566DM-2 has been causing problems for linux users as it appears it needs a newer version of the e1000 driver than other/older Intel e1000 cards.  That being said I would imagine you would need to get an updated version of the e1000 module on your esxi box...unfortunately I do not know how to build a new driver for the esxi kernel.  I would imagine that this would be an issue addressed in an upcoming release, though, as it is a high performance NIC and VMWare should be interested in keeping their e1000 driver up to date.

Cameron's picture

Toolchain

Is Redhat 7.2/gcc 3 the standard build machine/toolchain for esxi?

 

 

Cameron's picture

The only thing I can see is

The only thing I can see is the leading "./" in your oem.tgz.  Normally this wouldn't be a problem in linux but the esxi host os is really picky.  I would try re-running your steps making sure that "./" is not on your path...Follow the example I used for repacking the install.tgz...(using your structure with /oem)

~ # cd /oem/
/oem # tar czvf ../oem.tgz oem.txt etc/ usr/
usr/
usr/share/
usr/share/hwdata/
usr/share/hwdata/pci.ids
etc/
etc/vmware/
etc/vmware/simple.map
oem.txt

notice how there isn't a leading "./" in the names.  Now copy /oem.tgz to the partition 5 mount and give it a shot. 

Cameron's picture

Good to hear!  I am glad

Good to hear!  I am glad that you got it working :)

Cameron's picture

Trial

When you signed up for the download vmware should have sent you some registration keys that you can use to remove the 60 trial license. If they didn't, or thats not how you got the binaries, simply go to their site, sign up with a valid email, and they will send you some. You enter the key under the "Licensed Features" of the Configuration tab in VMWare Infrastructure Client (click edit next to License Source). Using the free license keys deactivates the VMMotion support I believe, so if you want to test that out you should probably wait to activate your ESXi install. Here is the link to obtain your VMWare keys:

https://www.vmware.com/tryvmware/login.php?eval=esxi&t=1