[Release] ESXi-Customizer-PS 2.4 - The ESXi image customization script


I have just released version 2.4 of my ESXi-Customizer-PS script - a PowerCLI script to create customized ESXi installation images and the successor of my legacy ESXi-Customizer tool.

This is a minor, but important update, because it fixes an annoyance that users of the latest PowerCLI version 6.0 ran into.

If you launched the old version of the script (2.3) directly from a PowerCLI 6.0 session window then you ran into this error:

   An unexpected error occured:
   An item with the same key has already been added.

From a regular Powershell window it would run fine though. The root cause of this has something to do with VMware moving from Powershell snapins to modules for PowerCLI. The VMware.Imagebuilder snapin (which is the only one that my script really needs) is still a snapin. Should this be replaced by a module in a future PowerCLI script then this would require another change to my script again.

Anyway, this issue with PowerCLI 6.0 has been resolved in version 2.4 of my script. What else is new? Version 2.3 already was able to create customized ESXi 6.0 images and supported the switch -v60 for limiting the scope to ESXi 6.0 Imageprofiles. However, the switch was undocumented so far, because vSphere 6.0 was not yet generally available when I released version 2.3 of my script in October last year. With version 2.4 the switch appears in the -help screen and is "officially supported" now ;-), and I also updated the Online doc to reflect the availability of ESXi 6.0.

The only new feature of ESXi-Customizer-PS 2.4 is the ability to remove individual VIB packages from the custom Imageprofile using the switch -remove. This was inspired by a problem with the hp-ams package from the HP Customized ESXi images (KB2094618) when being deployed on G7 (or older) ProLiant models. The command
.\ESXi-Customizer-PS-v2.4.ps1 -v55 -izip .\VMware-ESXi-5.5.0-Update2-2403361-HP-550.9.2.27-Mar2015-depot.zip -update -remove hp-ams
will generate a version of the HP Customized ESXi 5.5 ISO that is updated to the latest ESXi 5.5 patch level and has the hp-ams package removed. So this is what you want to use for fresh 5.5 installs of G7 (or older) HP servers!

You can find more examples of using the script (including adding community supported drivers from the V-Front Online Depot) on the project page. Have fun!



This post first appeared on the VMware Front Experience Blog and was written by Andreas Peetz. Follow him on Twitter to keep up to date with what he posts.



8 comments:

  1. Hi Andreas,
    just tried to create iso with new version of the script and got the following -
    An unexpected error uccured
    Get-PowerCLIVersion is not recognised as ....
    I am using Windows XP PowerShell 2.0 and VMWARE PowerCLI 5.1 or 5.5
    any suggestions?

    ReplyDelete
    Replies
    1. Hi Ilya,

      please launch the script from within a PowerCLI session window. It should work then.

      Thanks
      Andreas

      Delete
  2. Hi, Andreas ,

    When the ESXi-Customizer-PS script will support 6.0u1?

    Regards,
    Rex

    ReplyDelete
    Replies
    1. Hi Rex,

      it already does. The script does not need any changes to support the latest patch level! Running
      .\ESXi-Customizer-PS-v2,4.ps1 -v60
      will now create an ESXi 6.0 U1 ISO.

      Regards
      Andreas

      Delete
  3. Hi. this tool works very well. Instead of latest patch. can it download a specific version ?? Example. I need to test 5.5 update 2. Thanks you so much.

    John

    ReplyDelete
    Replies
    1. Hi John,

      yes, it can. Use the switches -v55 -sip to manually select a specific Imgeprofile. With the ESXi Patch Tracker you can check which Imageprofile corresponds to what patch level. E.g. ESXi 5.5 Update 2 is ESXi-5.5.0-20140902001-standard.

      Andreas

      Delete
  4. Hi, how to remove multiple vibs?

    ReplyDelete
    Replies
    1. Hi Marcin,

      you can specify multiple packages (separated by comma) with the -remove switch.

      Andreas

      Delete

***** All comments will be moderated! *****
- Please post only comments or questions that are related to this post's contents!
- Advertising and link spamming will not be tolerated!