ESXi 4.1 booting, extensions, driver installs, manifest files etc

I’ve been wondering – where is the list of drivers, and which file contains the manifest.

I noticed that /tmp/stage is populated, even at boot time. It appears that init calls esxupdate (a python program), which creates a visor filesystem (ramdisk) on /tmp/stage, and then copies /var/db/esxupdate/* and the contents of /bootbank/m.z into it:

# ls -al /var/db/esxupdate
drwxr-xr-x    1 root     root                512 Oct 16 04:12 .
drwxr-xr-x    1 root     root                512 Oct 16 04:12 ..
-rw-r–r–    1 root     root                938 Oct 16 04:10 custom-pkgdb.tgz
-rw-r–r–    1 root     root               1311 Aug 15 05:28 oem-pkgdb.tgz
-rw-r–r–    1 root     root               1221 Aug  2 21:03 pkgdb.tgz

# mount -v | grep /tmp/stage
updatestg on /tmp/stage type visorfs (0,750,01777,updatestg)

~ # ls -al /tmp/stage/customstage/usr/lib/ipkg/info
drwxr-xr-x    1 root     root                512 Oct 16 04:12 .
drwxr-xr-x    1 root     root                512 Oct 16 04:12 ..
-rw-r–r–    1 root     root                310 Jan  4  2011 vmware-esx-drivers-net-be2net.control
-rw-r–r–    1 root     root                171 Oct 16 04:09 vmware-esx-drivers-net-be2net.list
-rwxr-xr-x    1 root     root                599 Jan  4  2011 vmware-esx-drivers-net-be2net.postinst
-rwxr-xr-x    1 root     root                599 Jan  4  2011 vmware-esx-drivers-net-be2net.postrm
-rwxr-xr-x    1 root     root                 87 Jan  4  2011 vmware-esx-drivers-net-be2net.preinst
-rwxr-xr-x    1 root     root                 90 Jan  4  2011 vmware-esx-drivers-net-be2net.prerm

The question is, how did this get here in the first place – lets start with a clean system:

# tar tzvf /bootbank/m.z
drwxr-xr-x 0/0         0 2012-08-15 05:28:50 usr/lib/vmware/vmkmod/
drwxr-xr-x 0/0         0 2012-08-15 05:28:50 etc/vmware/init/
drwxr-xr-x 0/0         0 2012-08-15 05:28:50 etc/vmware/pciid/
drwxr-xr-x 0/0         0 2012-08-15 05:28:50 sbin/
drwxr-xr-x 0/0         0 2012-08-15 05:28:50 usr/lib/ext/
drwxr-xr-x 0/0         0 2012-08-15 05:28:50 lib/cim/
drwxr-xr-x 0/0         0 2012-08-15 05:28:50 etc/cim/
drwxr-xr-x 0/0         0 2012-08-15 05:28:50 var/lib/sfcb/registration/
drwxr-xr-x 0/0         0 2012-08-15 05:28:50 etc/vmware/
drwxr-xr-x 0/0         0 2012-08-15 05:28:50 etc/vmware/init/
drwxr-xr-x 0/0         0 2012-08-15 05:28:50 etc/vmware/pciid/
drwxr-xr-x 0/0         0 2012-08-15 05:28:50 etc/ipmi/
drwxr-xr-x 0/0         0 2012-08-15 05:28:50 usr/lib/pycim/
-rw-r–r– 0/0       157 2012-08-15 05:28:50 var/db/esxupdate/custom-pkgdb.tgz

Put ESXi into maintenance mode, if it’s not already:

# vim-cmd hostsvc/hostsummary | grep -i maintenance
inMaintenanceMode = false,
# vim-cmd hostsvc/maintenance_mode_enter
# vim-cmd hostsvc/hostsummary | grep -i maintenance
inMaintenanceMode = true,

Copy in a VIB file (eg 10GbE driver):

# scp root@172.16.170.1:/tmp/vmware* /tmp

Host ‘172.16.170.1’ is not in the trusted hosts file.
(fingerprint md5 b5:46:81:12:22:3b:1b:6d:d7:9e:11:d4:20:2f:06:c1)
Do you want to continue connecting? (y/n) yes
Login for root@172.16.170.1
Password:
vmware-esx-drivers-net-be2net-400.2.102.554.0 100%   80KB  80.1KB/s   00:00

Install the VIB:

# esxupdate -b /tmp/vmware-esx-drivers-net-be2net-400.2.102.554.0-1vmw.2.17.249663.x86_64.vib update
Unpacking cross_vmware-esx-dr.. ######################################## [100%]

Installing packages :cross_vm.. ######################################## [100%]

Running [/usr/sbin/vmkmod-install.sh]…
ok.
The update completed successfully, but the system needs to be rebooted for the
changes to be effective.

Example of bootbank before reboot is called. Notice that m.z hasn’t changed:

# ls -altr /bootbank/
-rwx——    1 root     root              48339 Aug 14 22:28 b.z
-rwx——    1 root     root              11225 Aug 14 22:28 a.z
-rwx——    1 root     root              41155 Aug 14 22:28 tboot.gz
-rwx——    1 root     root           72786024 Aug 14 22:28 s.z
-rwx——    1 root     root             950084 Aug 14 22:28 oem.tgz
-rwx——    1 root     root                551 Aug 14 22:28 m.z
-rwx——    1 root     root                137 Aug 14 22:28 license.tgz
-rwx——    1 root     root            2489796 Aug 14 22:28 k.z
-rwx——    1 root     root            1162824 Aug 14 22:28 cimstg.tgz
-rwx——    1 root     root           15283377 Aug 14 22:28 c.z
-rwx——    1 root     root                169 Aug 14 22:28 vibddi
-rwx——    1 root     root              10101 Oct 16 03:39 state.tgz
-rwx——    1 root     root                143 Oct 16 03:39 boot.cfg
-rwx——    1 root     root               2511 Oct 16 03:53 pkgdb.tgz

# reboot

NB. If you don’t reboot a host cleanly, the updates will get lost, since m.z is only assembled on reboot

After reboot, m.z has changed substantially:

# ls -altr /bootbank/
-rwx——    1 root     root            2489796 Oct 16 03:53 k.z
-rwx——    1 root     root            1162824 Oct 16 03:53 cimstg.tgz
-rwx——    1 root     root           15283377 Oct 16 03:53 c.z
-rwx——    1 root     root              48339 Oct 16 03:53 b.z
-rwx——    1 root     root              11225 Oct 16 03:53 a.z
-rwx——    1 root     root                169 Oct 16 03:53 vibddi
-rwx——    1 root     root              41155 Oct 16 03:53 tboot.gz
-rwx——    1 root     root              10417 Oct 16 03:53 state.tgz
-rwx——    1 root     root           72786024 Oct 16 03:53 s.z
-rwx——    1 root     root             950084 Oct 16 03:53 oem.tgz
-rwx——    1 root     root              73422 Oct 16 03:53 m.z
-rwx——    1 root     root                137 Oct 16 03:53 license.tgz
-rwx——    1 root     root               2464 Oct 16 03:56 pkgdb.tgz
-rwx——    1 root     root                143 Oct 16 03:56 boot.cfg

And indeed contains the be2net.o driver:

# vdu /usr/lib/vmware/vmkmod/be2net.o
For ‘/usr/lib/vmware/vmkmod/be2net.o’:
tardisk SYS5:       245248

# tar tzvf /bootbank/m.z
drwxr-xr-x 201/201         0 2012-10-16 03:53:25 usr/lib/vmware/vmkmod/
-rw-r–r– 201/201    244877 2011-01-11 01:59:55 usr/lib/vmware/vmkmod/be2net.o
drwxr-xr-x 201/201         0 2012-10-16 03:53:25 etc/vmware/init/
drwxr-xr-x 201/201         0 2012-10-16 03:53:25 etc/vmware/init/manifests/
-rw-r–r– 201/201        36 2011-01-04 21:10:52 etc/vmware/init/manifests/vmware-be2net.mf
drwxr-xr-x 201/201         0 2012-10-16 03:53:25 etc/vmware/pciid/
-rw-r–r– 201/201      1337 2011-01-04 21:10:52 etc/vmware/pciid/be2net.xml
drwxr-xr-x 0/0         0 2012-10-16 03:53:26 sbin/
drwxr-xr-x 0/0         0 2012-08-15 05:28:50 usr/lib/ext/
drwxr-xr-x 0/0         0 2012-08-15 05:28:50 lib/cim/
drwxr-xr-x 0/0         0 2012-08-15 05:28:50 etc/cim/
drwxr-xr-x 0/0         0 2012-08-15 05:28:50 var/lib/sfcb/registration/
drwxr-xr-x 201/201         0 2011-01-11 01:59:54 etc/vmware/
drwxr-xr-x 201/201         0 2012-10-16 03:53:25 etc/vmware/init/
drwxr-xr-x 201/201         0 2012-10-16 03:53:25 etc/vmware/init/manifests/
-rw-r–r– 201/201        36 2011-01-04 21:10:52 etc/vmware/init/manifests/vmware-be2net.mf
drwxr-xr-x 201/201         0 2012-10-16 03:53:25 etc/vmware/pciid/
-rw-r–r– 201/201      1337 2011-01-04 21:10:52 etc/vmware/pciid/be2net.xml
drwxr-xr-x 0/0         0 2012-08-15 05:28:50 etc/ipmi/
drwxr-xr-x 0/0         0 2012-08-15 05:28:50 usr/lib/pycim/
-rw-r–r– 0/0       936 2012-10-16 03:53:26 var/db/esxupdate/custom-pkgdb.tgz

You can now leave maintenance mode, if you wish:

~ # vim-cmd hostsvc/hostsummary | grep -i maintenance
inMaintenanceMode = true,
~ # vim-cmd hostsvc/maintenance_mode_exit
‘vim.Task:haTask-ha-host-vim.HostSystem.exitMaintenanceMode-18’
~ # vim-cmd hostsvc/hostsummary | grep -i maintenance
inMaintenanceMode = false,

And you can verify the files are present in the filesystem, that are listed in the manifest file:

# cat /tmp/stage/customstage/usr/lib/ipkg/info/vmware-esx-drivers-net-be2net.list
/tmp/stage/customstage/etc/vmware/init/manifests/vmware-be2net.mf
/tmp/stage/customstage/etc/vmware/pciid/be2net.xml
/tmp/stage/customstage/usr/lib/vmware/vmkmod/be2net.o

But, if you reset the system configuration, the driver and configs will be lost. (There is no state.tgz, nor local.tgz file):

[After Reset System Configuration] :

~ # ls -altr /bootbank/
-rwx——    1 root     root            2489796 Oct 16 03:53 k.z
-rwx——    1 root     root            1162824 Oct 16 03:53 cimstg.tgz
-rwx——    1 root     root           15283377 Oct 16 03:53 c.z
-rwx——    1 root     root              48339 Oct 16 03:53 b.z
-rwx——    1 root     root              11225 Oct 16 03:53 a.z
-rwx——    1 root     root                169 Oct 16 03:53 vibddi
-rwx——    1 root     root              41155 Oct 16 03:53 tboot.gz
-rwx——    1 root     root           72786024 Oct 16 03:53 s.z
-rwx——    1 root     root             950084 Oct 16 03:53 oem.tgz
-rwx——    1 root     root                137 Oct 16 03:53 license.tgz
-rwx——    1 root     root               2464 Oct 16 03:56 pkgdb.tgz
-rwx——    1 root     root                 92 Oct 16 04:02 m.z
-rwx——    1 root     root                129 Oct 16 04:02 boot.cfg

~ # tar tvzf /bootbank/m.z
-rw-r–r– 0/0         0 2012-10-16 04:02:32 .emptytgz

 

More on how to keep the driver in the next post

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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: