As I noted in a previous post, you can use the vibddi tool to inject drivers into a customized image of ESXi, what I didn't mention was that the ESXi installer would still not have access to those drivers until the installer environment (sys.vgz) is also modified to have the drivers available at installation time. I found that out this previous friday when I attempted to install ESXi 4.1 Update 1 on a number of HP BL460c G7 servers that use the be2net NIC driver which isn't included in the base installation image of ESXi. Here are the steps to injecting the driver into both the installable image (imagedd.bz2), and the installer image (sys.vgz). For this process you're going to need access to the auto-deploy appliance, the ESXi 4.1 Update 1 install iso, the be2net driver iso, and you'll need to locate the binutils RPM ( described later ).
If you're looking to solve the same problem ( be2net driver on HP hardware ) there are 2 options that are easier than what I'm about to describe below:
1. Wait for HP to create a HP OEM version of the ESXi 4.1u1 .iso, download and use that
2. Download the HP OEM ESXi 4.1 iso, install it on your system and then upgrade it to 4.1u1 using one of the supported update methods.
I believe it goes without saying that this is unsupported by VMware, or me. For the intrepid, keep reading.
Log into the auto-deploy appliance as vi-admin and get a root shell
#>sudo -s
Copy the contents of the ESXi 4.1 Update 1 iso image to the auto-deploy appliance, place it in the /esxi41u1 directory.
#>mkdir /esxi41u1
#>mount -o loop /home/vi-admin/VMware-VMvisor-Installer-4.1.0.update1-348481.x86_64.iso /mnt
#> cp -pr /mnt/* /esxi41u1
#> umount /mnt
We also need the driver .iso image that we want to inject into the ESXi 4.1u1 installable image. We need to mount it and then copy the offline bundle from it:
#> mkdir /driver
#> mount -o loop /home/vi-admin/vmware-esx-drivers-net-be2net_400.2.103.377.0-1vmw.2.17.249663.358277.iso /mnt
#> cp /mnt/offline-bundle/SVE-be2net-2.103.377.0-offline_bundle-358277.zip /driver
#> umount /mnt
Uncompress the imagedd.bz2 image
#> bunzip2 imagedd.bz2
Inject the necessary drivers into the installable image, note that a new be2net driver was released 2/11/2010 ( same day as 4.1 update 1). Check the VMware download page to see if there are any newer drivers.
#> vibddi -i imagedd -n -o SVE-be2net-2.103.377.0-offline_bundle-358277.zip
Setting up configuration for esxupdate
This may take a few seconds...
Checking bootbank filesystems (pre-install)
Installing offline bundle: /home/vi-admin/SVE-be2net-2.103.377.0-offline_bundle-358277.zip
Update operation completed successfully
Checking bootbank filesystems (post-install)
(optional, install more offline VIBs, I install PowerPath PP/VE, HP NMI Sourcing Driver, and the HP CIM providers, not shown )
Verify that the driver is now installed into the image ( in this case vmware-esx-drivers-net-be2net )
#> vibddi -i imagedd -q
oem-vmware-esx-drivers-net-vxge (400.2.0.28.21239-1OEM)
oem-vmware-esx-drivers-scsi-3w-9xxx (400.2.26.08.036vm40-1OEM)
vmware-esx-drivers-net-be2net (400.2.103.377.0-1vmw.2.17.249663)
vmware-esx-firmware (4.1.0-1.4.348481)
CMPI-1.0
VMW_CMPI_CPP-1.0.5
vmkapi_1_1_0_0
vmknexus1kvapi-1-4
vmkepsecapi_1.0.0.0
DriverAPI-9.0
DriverAPI-9.1
vmware-esx-tools-light (4.1.0-1.4.348481)
#> bzip2 imagedd
#> md5sum imagedd.bz2
b9b9d2d724a3c04b6e1341c8f8507367 imagedd.bz2
Edit /esxi41u1/imagedd.md5 to match the new md5sum using the text editor of your choice
#> nano /esxu41u1/imagedd.md5
b9b9d2d724a3c04b6e1341c8f8507367 imagedd.bz2
Next, the be2net driver needs to be injected into the installer environment ( sys.vgz ). To accomplish this, you need to have the 'ar' utility installed on your auto-deploy appliance and it doesn't come pre-installed. Download the newest x86_64 binutils RPM for Centos 5 ( which is what the auto deploy appliance is based on ). I used the following RPM: binutils-2.17.50.0.6-14.el5.x86_64.rpm.
#> rpm -ivh binutils-2.17.50.0.6-14.el5.x86_64.rpm
warning: binutils-2.17.50.0.6-14.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
Preparing... ########################################### [100%]
1:binutils ########################################### [100%]
Unzip the driver bundle:
#> unzip /driver/SVE-be2net-2.103.377.0-offline_bundle-358277.zip
Archive: SVE-be2net-2.103.377.0-offline_bundle-358277.zip
inflating: metadata.zip
inflating: vmware-esx-drivers-net-be2net-400.2.103.377.0-1vmw.2.17.249663.x86_64.vib
Extract the vib archive using the 'ar' utility that we installed.
#> cd /driver
#> ar vx vmware-esx-drivers-net-be2net-400.2.103.377.0-1vmw.2.17.249663.x86_64.vib
x - debian-binary
x - control.tar.gz
x - data.tar.gz
x - short.rpm
x - descriptor.xml
x - sig.pkcs7
Unpack the data.tar.gz
#> tar -zvxf data.tar.gz
./
./etc/
./etc/vmware/
./etc/vmware/pciid/
./etc/vmware/pciid/be2net.xml
./etc/vmware/init/
./etc/vmware/init/manifests/
./etc/vmware/init/manifests/vmware-be2net.mf
./usr/
./usr/lib/
./usr/lib/vmware/
./usr/lib/vmware/vmkmod/
./usr/lib/vmware/vmkmod/be2net.o
The three files that we're interested in are be2net.o ( the driver ), be2net.xml ( the pciid ), and the vmware-be2net.mf ( manifest ). Now we just need to unpack the installer environment (sys.vgz), add these files and then repack the installer environment.
Unpack the installer environment
#> mkdir /systemp
#> cp /esxi41u1/sys.vgz /systemp
#> cd /systemp
#> gunzip --suffix .vgz sys.vgz
#> vmtar -x sys -o sys.tar
# >tar -xvf sys.tar
... ( lots of output of all the extracted files ) ...
Copy the 3 required files to add the be2net driver
#> mkdir -p /systemp/etc/vmware/init/manifests/
#> cp /driver/etc/vmware/pciid/be2net.xml /systemp/etc/vmware/pciid
#> cp /driver/etc/vmware/init/manifests/vmware-be2net.mf /systemp/etc/vmware/init/manifests
#> cp/driver/usr/lib/vmware/vmkmod/be2net.o /systemp/usr/lib/vmware/vmkmod
Repack the installer environment
#> rm sys
#> rm sys.tar
#> tar cvf sys.tar *
... ( lots of output of all the files that are being tar'd up ) ...
#> vmtar -c sys.tar -o sys
#> gzip --suffix .vgz sys
Move the sys.vgz image back into the extracted iso image
#> mv sys.vgz /esxi41u1
And finally, generate a new bootable .iso image from our modified bits:
#> cd /esxi41u1
#> mkisofs -l -J -R -r -T -input-charset UTF-8 -o /custom_esxi4.1u1.iso -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table /esxi41u1/
Unknown file type (unallocated) ./.. - ignoring and continuing.
Size of boot image is 4 sectors -> No emulation
2.49% done, estimate finish Sat Feb 26 02:19:12 2011
4.97% done, estimate finish Sat Feb 26 02:19:12 2011
7.44% done, estimate finish Sat Feb 26 02:19:12 2011
9.93% done, estimate finish Sat Feb 26 02:19:12 2011
12.41% done, estimate finish Sat Feb 26 02:19:12 2011
14.89% done, estimate finish Sat Feb 26 02:19:12 2011
17.37% done, estimate finish Sat Feb 26 02:19:17 2011
19.85% done, estimate finish Sat Feb 26 02:19:17 2011
22.33% done, estimate finish Sat Feb 26 02:19:16 2011
24.82% done, estimate finish Sat Feb 26 02:19:16 2011
27.29% done, estimate finish Sat Feb 26 02:19:15 2011
29.78% done, estimate finish Sat Feb 26 02:19:15 2011
32.25% done, estimate finish Sat Feb 26 02:19:15 2011
34.74% done, estimate finish Sat Feb 26 02:19:14 2011
37.22% done, estimate finish Sat Feb 26 02:19:14 2011
39.70% done, estimate finish Sat Feb 26 02:19:14 2011
42.18% done, estimate finish Sat Feb 26 02:19:16 2011
44.66% done, estimate finish Sat Feb 26 02:19:16 2011
47.14% done, estimate finish Sat Feb 26 02:19:16 2011
49.63% done, estimate finish Sat Feb 26 02:19:16 2011
52.10% done, estimate finish Sat Feb 26 02:19:15 2011
54.59% done, estimate finish Sat Feb 26 02:19:15 2011
57.06% done, estimate finish Sat Feb 26 02:19:15 2011
59.55% done, estimate finish Sat Feb 26 02:19:15 2011
62.03% done, estimate finish Sat Feb 26 02:19:15 2011
64.51% done, estimate finish Sat Feb 26 02:19:15 2011
66.99% done, estimate finish Sat Feb 26 02:19:14 2011
69.47% done, estimate finish Sat Feb 26 02:19:14 2011
71.95% done, estimate finish Sat Feb 26 02:19:16 2011
74.44% done, estimate finish Sat Feb 26 02:19:16 2011
76.91% done, estimate finish Sat Feb 26 02:19:15 2011
79.40% done, estimate finish Sat Feb 26 02:19:15 2011
81.88% done, estimate finish Sat Feb 26 02:19:15 2011
84.35% done, estimate finish Sat Feb 26 02:19:15 2011
86.84% done, estimate finish Sat Feb 26 02:19:15 2011
89.32% done, estimate finish Sat Feb 26 02:19:15 2011
91.80% done, estimate finish Sat Feb 26 02:19:16 2011
94.28% done, estimate finish Sat Feb 26 02:19:16 2011
96.76% done, estimate finish Sat Feb 26 02:19:16 2011
99.24% done, estimate finish Sat Feb 26 02:19:16 2011
Total translation table size: 2048
Total rockridge attributes bytes: 0
Total directory bytes: 2970
Path table size(bytes): 26
Max brk space used 0
201533 extents written (393 MB)
The finished .iso image will be named custom_esxi4.1u1.iso, and should be in your root directory.
(optional, if you want to pxe boot the image )
Create an image.tgz that can be used for PXE booting:
#> mkdir -p /home/vi-admin/usr/lib/vmware/installer
#> cp /esxi41u1/imagedd.bz2 /home/vi-admin/usr/lib/vmware/installer/VMware-VMvisor-big-4.1.0-348481-x86_64.dd.bz2
#> cd /home/vi-admin
#> tar cvzf image.tgz usr/
usr/
usr/lib/
usr/lib/vmware/
usr/lib/vmware/installer/
usr/lib/vmware/installer/VMware-VMvisor-big-4.1.0-348481-x86_64.dd.bz2
The resultant image.tgz can be used when PXE booting to do a manual installation of ESXi 4.1 U1, and will have the be2net driver loaded at installation time.