• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Yellow Bricks

by Duncan Epping

  • Home
  • ESXTOP
  • Stickers/Shirts
  • Privacy Policy
  • About
  • Show Search
Hide Search

Stripping your Stateless image

Duncan Epping · Sep 9, 2011 ·

I was just playing around with Stateless again, aka auto-deploy, and I was wondering how far I could strip the image down to the bare minimum and what the difference would be. I loaded the standard software depot and cloned an existing image profile to a new image profile, for more details on how to do this check the post I published a couple of days ago. I figured I would export this newly create image profiles first so I could see the size of the bundle when exported. I cloned and exported the “ESXi-5.0.0-469512-no-tools” image profile and checked the details:

ESXiStateless.zip 137,869 KB

Now the first thing to do was figuring out which VIBs were part of this image profile, you can do this fairly simple by using the command below. Note that I exported the results to a CSV file just to make it easier if I would need to add VIBs later:

Get-EsxImageProfile <image profile name>  | Select-Object -ExpandProperty VibList | Select name | export-csv c:\tmp\VIBs.csv

Now this returns the full list of all the VIBs in a CSV file with just the names of the VIBs. There are 2 core VIBs (esx-base and esx-tboot) which are required for booting. I also kept the e1000 VIB as I knew I needed it. The e1000 VIB requires the “misc-drivers” VIB so I was left with 4 VIBs:

esx-base
esx-tboot
e1000
misc-drivers

Stripping the rest of the VIBs is fairly simple. Note that you will need to replace <image profile name> with the actual name of your image profile and <package name> with the name of the package you would like to remove:

Remove-EsxSoftwarePackage -ImageProfile <image profile name> -SoftwarePackage <package name>

So I stripped it completely and exported the image profile again and this was the result:

Thinner.zip 131,457 KB

Note that you can actually check which VIBs are part of your image profile, which is what I used to validate I removed all unnecesarry VIBs:

Get-esximageprofile <image profile name> | Select-Object -ExpandProperty VibList

That is a whopping 6MB shaved off! (By the way this is without the HA-Agent. The size of the completely stripped image profile with the HA agent is 143,679KB) Was it a useful exercise? Yes it was as it helped me understanding the process a lot better… Is it useful to strip all the drivers from your image profile? No it is not, you will only save 6MB which is close to nothing compared to the overall size of 131 MB. I did manage to boot the image correctly, but once again there’s really no point from a memory perspective to go through this exercise.

The thing that does make a huge difference is using the no-tools image profile, but there is a serious implication. When you do not include VMware Tools you will need to have a different mechanism for distributing VMware Tools which will probably complicate things from an operational perspective. I guess you will need to decide if the reduction in MBs is worth the effort and is worth the risk of having a “1 of a kind” environment. I know I will keep it vanilla from now on,

 

Related

Management & Automation, Server 5, 5.0, auto-deploy, esxi, stateless, vSphere

Reader Interactions

Comments

  1. stu says

    10 September, 2011 at 11:19

    Excellent post as usual.

    Just regarding the ‘no VMware tools’ thing, there’s a flipside operational argument as well – if there are no tools on the host, you avoid users / sysadmins from upgrading tools within the guest. In an environment where you want to tightly control the versions of all key drivers / OS components, leaving tools out of ESXi is a great option. Of course, such environments will have other ways of doing software distribution ;).

    Which brings us to an interesting question… what impact does removing tools from ESXi have on Update Manager? Is there a “VMware-tools” package that can be treated like any other host update? I guess I should just check it out myself 🙂

  2. Ced says

    14 September, 2011 at 13:43

    Wouldn’t stripping Vibs (especialy network and san drivers) improve boot times? Not that a few minuts more is a real issues when your servers takes a quarter to boot (HP G7 blades).

    • Duncan says

      14 September, 2011 at 23:51

      Yes it will shave of a second or 5…. not really useful 🙂

  3. Randy Brown says

    13 June, 2012 at 21:51

    Great post — helps put to death a class of pointless discussions!

    On the ‘no-tools’ front, things have changed since the post was written. Since ESXi 5.0u1, it’s possible to have a shared repository for tools: http://kb.vmware.com/kb/2004018.

    And despite the title of the KB article, I believe you could use the shared tools locker for stateful hosts as well.

Primary Sidebar

About the author

Duncan Epping is a Chief Technologist in the Office of CTO of the Cloud Platform BU at VMware. He is a VCDX (# 007), the author of the "vSAN Deep Dive", the “vSphere Clustering Technical Deep Dive” series, and the host of the "Unexplored Territory" podcast.

Upcoming Events

May 24th – VMUG Poland
June 1st – VMUG Belgium

Recommended Reads

Sponsors

Want to support Yellow-Bricks? Buy an advert!

Advertisements

Copyright Yellow-Bricks.com © 2023 · Log in