VMware Cloud Community
touimet
Enthusiast
Enthusiast

ESXi custom image too large

I recently built a new customized ESXi 6 image for the IBM/Lenovo x3850x6 servers.  Because we are using the Emulex fiber cards and the Emulex OneConnect nics I added to the latest IBM/Lenovo customized ESXi 6 image the latest Emulex drivers, Emulex CIM, the Emulex esxcli for the lpfc driver and the elxnetcli for the elxnet driver.   Using Powercli Image Builder I exported an update.zip file to update our hosts via "esxcli software vib install".   A process I've done multiple times before with Dell's and IBM's with no issues.   However this time I attempted to perform the update and received the following error message:

[InstallationError}

The pending transaction requires 240 MB free space, however the maximum supported size is 239 MB.

So after doing a search for answers I got the following back which explains what is going on:

Installing nVidia vib on ESX5.5 getting free space error

Enabling high availability on ESXi fails with Lenovo ESXi 5.5 update 3 customized image - Lenovo x86...

VMware KB: Enabling High Availability on the ESXi host fails with the error: Cannot install the vCen...

So armed with this information I proceeded to remove the very obvious unused vibs from the custom image such as:

qlogic-nx2-provider  (per the lenovo link above)   ---  No Qlogic devices installed in the IBM/Lenovo x3850x6 servers

qlogic-cna-provider  (QLogic CNA CIM provider for VMware ESXi5.5)   ---  No Qlogic devices installed in the IBM/Lenovo x3850x6 servers

net-tg3   (Broadcom NetXtreme I Gigabit Ethernet Driver)    ---  No Broadcom devices installed in the IBM/Lenovo x3850x6 servers

This likely reduces the image below the 239 MB limit however I don't know how to determine that prior to exporting out a new update.zip and trying the update.  So this leads to me to few questions I'm hoping someone could assist me with.

1. How do I determine the installation size of the new image?  Essentially the uncompressed size of the state.tgz file.

2. How do I determine which vibs are actually loaded (in use) by a booted ESXi server?  I understand "esxcli software vib list" will list all the vibs installed however I am specifically asking how to determine which vibs are actually in use by the running ESXi OS.  I can determine which vmhba vibs and vmnic vibs are loaded (in use) via KB1027206, but how do I determine ALL vibs in use?

Thanks!

8 Replies
touimet
Enthusiast
Enthusiast

Okay, after a few more hours of digging I believe I can now answer the second question I had.

Turns out "esxcli system module list" will list out all the loaded modules.  So I turned to Powercli to get a complete list of the modules and the associated vibs via this snippet of code:

$esxcli = Get-EsxCli -VMHost "host01.domain.local"

$esxcli.system.module.list() | Foreach {

      $esxcli.system.module.get($_.Name) | Select @{N="VMHost";E={$VMHost}}, ContainingVIB, Module, Modulefile, Version

} | Export-Csv C:\Test\loaded_modules.csv -NoTypeInformation

I assume any vib not listed in the output can be safely removed from the image since it's not loaded (in use) by ESXi.

DyJohnnY
Enthusiast
Enthusiast

Hi,

The above code does not work on the powerCLI6.5 API, the "containing vib" property does not exist anymore.


Is there any other way to extract module - vib mapping?

IonutN
Reply
0 Kudos
Nick_Andreev
Expert
Expert

Maybe not directly relevant to the question, but why not just use the custom vendor ESXi images? They already include all vendor-specific drivers, such as IBM, Dell or Cisco.

---
If you found my answers helpful please consider marking them as helpful or correct.
VCIX-DCV, VCIX-NV, VCAP-CMA | vExpert '16, '17, '18
Blog: http://niktips.wordpress.com | Twitter: @nick_andreev_au
Reply
0 Kudos
DyJohnnY
Enthusiast
Enthusiast

I'm not sure about the OP, but in my case, I used the vendor image, when we did the upgrade to ESXi 5.5.

Now we're looking at 6.x upgrade, and 90% of our upgrades are failing because the 5.5 custom image is larger by 4MB than what the 6.x Custom image expects (a pre-check script I believe).

So in my case, I am looking to trim down the image, and remove just what is not loaded in the OS.

I'm still looking for a solution to mapping system modules to vibs, but i will end up removing VIBs from equipment i know for sure we don't use, until I manage to have a smaller image.

IonutN
Reply
0 Kudos
Nick_Andreev
Expert
Expert

upgrades are failing because the 5.5 custom image is larger by 4MB than what the 6.x Custom image

Never heard of such issue. Is there a KB or blog article explaining this in more detail? Or maybe you can quote the exact error message?

---
If you found my answers helpful please consider marking them as helpful or correct.
VCIX-DCV, VCIX-NV, VCAP-CMA | vExpert '16, '17, '18
Blog: http://niktips.wordpress.com | Twitter: @nick_andreev_au
Reply
0 Kudos
DyJohnnY
Enthusiast
Enthusiast

This shows up in Update manager logs like this:

Precheck script test result: 'ERROR', test 'IMAGEPROFILE_SIZE', expected '239', found '242' and errortype is 0

VUA.log files show this:

--> DEBUG:imageprofile:VIBs set(['VMware_bootbank_scsi-mpt2sas_19.00.00.00-1vmw.600.0.0.2494585']) are replaced by VIB Avago_bootbank_scsi-mpt2sas_20.00.00.00.1vmw-1OEM.550.0.0.1331820, removing them from ImageProfile Lenovo_ESXi6.0u3_20170414

--> DEBUG:imageprofile:VIB VMware_bootbank_scsi-mpt2sas_19.00.00.00-1vmw.600.0.0.2494585 is being removed from ImageProfile Lenovo_ESXi6.0u3_20170414

--> INFO:root:Running /sbin/localcli system visorfs ramdisk add -M 373 -m 373 -n upgradescratch -t /upgrade_scratch -p 01777

--> INFO:root:Checking if tboot is enabled

--> INFO:root:Running command esxcfg-advcfg -q -g /Misc/enableTboot

--> Exception occured: Unable to find option enableTboot

--> INFO:root:Got return code 256

--> WARNING:root:Command "esxcfg-advcfg -q -g /Misc/enableTboot" returned non-integer. Assuming no tboot

--> DEBUG:root:Running /sbin/localcli --formatter=json storage filesystem list

--> DEBUG:root:Running vib conflicts check.

--> INFO:root:Image size: 242 MB, Maximum size: 239 MB

--> ERROR:root:The target image profile requires 242 MB space, however the maximum supported size is 239 MB.

--> INFO:root:Running /sbin/localcli system visorfs ramdisk remove -t /upgrade_scratch

--> </err></output>

IonutN
Reply
0 Kudos
Nick_Andreev
Expert
Expert

I tried to search for this error message and didn't find any notion of anyone ever having this issue. Did you try to open a support case? Quite interested what the root cause of this issue is.

---
If you found my answers helpful please consider marking them as helpful or correct.
VCIX-DCV, VCIX-NV, VCAP-CMA | vExpert '16, '17, '18
Blog: http://niktips.wordpress.com | Twitter: @nick_andreev_au
Reply
0 Kudos
DyJohnnY
Enthusiast
Enthusiast

I have actually opened a support case and the details above are the resolution I received from vmware.

I have to remove VIBs until the error goes away. In my case, by trial and error I removed all Qlogic vibs from the image, as we don't run hardware from Qlogic.

IonutN