WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud
  • Tanzu
    • Application Modernization
    • Tanzu services
    • Tanzu Community Edition
    • Tanzu Kubernetes Grid
    • vSphere with Tanzu
  • Home Lab
  • Nested Virtualization
  • Apple
You are here: Home / Apple / A Docker Container for building custom ESXi VIBs

A Docker Container for building custom ESXi VIBs

05.26.2015 by William Lam // 16 Comments

I recently had a need to create a custom ESXi VIB using the VIB Author Fling for a project that I was working on. As part of the project's deliverables, I wanted to also provide an ESXi VIB which would need to be built against any new updates for the project. Given this would be an infrequent operation, I thought why not use a Docker Container for this operation? I could just spin up a Docker Container on-demand and not have to worry about managing a local VM for just running this particular task.

With that I have created a VIB Author Docker Container which can be used to author custom ESXi VIBs. I have also made this container available on the Docker Registry for others to use which you can find more details here: https://registry.hub.docker.com/u/lamw/vibauthor/

If you already have a Docker host running, you can pull down the VIB Author Docker Container by jumping to Step 5 in the instructions below. If you do not and you are running Mac OS X like I am, you can follow the instructions below using Docker Machine and VMware Fusion to try out my VIB Author Docker Container.

Step 1 - Install the Docker client by running the following command:

brew install docker

Step 2 - Download and install Docker Machine by running the following commands:

curl -L https://github.com/docker/machine/releases/download/v0.2.0/docker-machine_darwin-amd64 > /usr/local/bin/docker-machine
chmod +x /usr/local/bin/docker-machine

Step 3 - Create Docker Machine using the VMware Fusion driver by running the following command:

docker-machine create --driver vmwarefusion osxdock --vmwarefusion-memory-size 1024
eval "$(docker-machine env osxdock)"

docker-container-vib-author-esxi-vib-0
Note: Thanks to Omer Kushmaro for his blog post here on how to quickly get started with Docker Machine with VMware Fusion

Step 4 - Once the Docker Machine is booted up, we can now connect to it using SSH by running the following command:

docker-machine ssh osxdock

docker-container-vib-author-esxi-vib-3
At this point, we are now logged into our Docker Machine which has both the Docker client/server running and we are now ready to pull down the VIB Author container from the Docker registry.

Step 5 - To pull down the VIB Author Docker Container that I have built, run the following command within the Docker Machine:

docker pull lamw/vibauthor

docker-container-vib-author-esxi-vib-1
Step 6 - Once the Docker Container has been successfully downloaded, you can now run the VIB Author Container by running the following command:

docker run --rm -it lamw/vibauthor

docker-container-vib-author-esxi-vib-2
Once logged into the VIB Author Container, you confirm that the VIB Author Fling has been installed by running the "vibauthor" command as shown in the screenshot above. In the next blog post, I will go through an example of building a custom ESXi VIB using the VIB Author Container as well as transferring the outputted files from the Docker host back onto your desktop. Stay tuned!

More from my site

  • ghettoVCB VIB & offline bundle for ESXi
  • Getting Started with Tech Preview of Docker Volume Driver for vSphere
  • How to create a custom ESXi VIB to execute a script once?
  • How to quickly deploy new CoreOS Image w/VMware Tools on ESXi?
  • How to quickly deploy CoreOS on ESXi?

Categories // Apple, Docker, ESXi, Fusion Tags // container, Docker, docker-machine, esxi, vib, vib author

Comments

  1. mikiefoley says

    05/27/2015 at 12:53 pm

    Stuck at Step 3. "Waiting for VM to come online"

    Reply
    • William Lam says

      05/27/2015 at 1:36 pm

      Any resource contentions on your system? That's the only thing I can think of. You can always try to kill the process (ps -ef) and then try it again.

      You can also try opening up another terminal and run "ocker-machine inspect osxdock" which will give you a bunch of configurations, but look for where your Docker Machine is being stored, should be something like: /Users/[USER]/.docker/machine/machines/osxdock and check out the vmware.log to see if there's issues spinning up the VM

      Reply
  2. mikiefoley says

    06/01/2015 at 2:45 pm

    Hey,

    The VM comes up. I can log into it and poke around.. But the initial command of "docker-machine create --driver vmwarefusion osxdock --vmwarefusion-memory-size 1024" is still just sitting there at "INFO[0001] Waiting for VM to come online..."

    Very strange.

    I deleted the VM and recreated it using the above command. Same issue.

    No resource issues on my Mac (at the moment :))

    From the VMware.log file it looks like maybe VIX is having an issue.

    2015-06-01T10:41:24.482-05:00| vcpu-1| I120: TOOLS setting legacy tools version to '2147483647', manifest status is 8
    2015-06-01T10:41:24.482-05:00| vcpu-1| I120: ToolsSetVersionWork: Updating the Tools Version in the disk
    2015-06-01T10:41:24.482-05:00| vcpu-1| I120: ToolsSetVersionWork: Done updating the Tools Version in the disk
    2015-06-01T10:41:24.482-05:00| vcpu-1| I120: VMXVmdb_SetToolsVersionStatus: status value set to 'unmanaged', 'unmanaged', install possible
    2015-06-01T10:41:24.492-05:00| vmx| I120: SOCKET 2 (101) recv detected client closed connection
    2015-06-01T10:41:24.492-05:00| vmx| I120: Vix: [140735231337216 mainDispatch.c:2878]: VMAutomation: Connection Error (4) on connection 1.
    2015-06-01T10:41:24.499-05:00| vcpu-1| I120: TOOLS state change 3 returned status 1
    2015-06-01T10:41:24.499-05:00| vcpu-1| I120: Vix: [5759746048 mainDispatch.c:4209]: VMAutomationReportPowerStateChange: Reporting power state change (opcode=2, err=0).
    2015-06-01T10:41:24.828-05:00| vmx| I120: SOCKET 4 (344) recv detected client closed connection
    2015-06-01T10:41:24.829-05:00| vmx| I120: Vix: [140735231337216 mainDispatch.c:2878]: VMAutomation: Connection Error (4) on connection 3.
    2015-06-01T10:41:26.109-05:00| vmx| I120: SOCKET 5 (320) recv detected client closed connection
    2015-06-01T10:41:26.109-05:00| vmx| I120: Vix: [140735231337216 mainDispatch.c:2878]: VMAutomation: Connection Error (4) on connection 4.
    2015-06-01T10:41:48.858-05:00| mks| I120: MKS-SWB: Number of MKSWindows changed: 0 rendering MKSWindow(s) of total 1.
    2015-06-01T10:41:49.492-05:00| vthread-28| I120: VTHREAD start thread 28 "vthread-28" pid 31201
    2015-06-01T10:41:49.493-05:00| vthread-29| I120: VTHREAD start thread 29 "vthread-29" pid 31201
    2015-06-01T10:41:49.493-05:00| vthread-30| I120: VTHREAD start thread 30 "vthread-30" pid 31201

    Reply
  3. Touseef says

    02/18/2016 at 9:49 pm

    Thanks William,
    I have following script created on my MAC to use your vibauthor container seemlessly.

    echo "docker run -v \`pwd\`/../..:\`pwd\`/../.. -w \`pwd\` lamw/vibauthor vibauthor \"\[email protected]\"" > /usr/local/bin/vibauthor
    chmod +x /usr/local/bin/vibauthor

    Reply
  4. halr9000 says

    03/01/2016 at 2:06 pm

    For those using Homebrew on OSX, load up Cask (http://caskroom.io/). Then you can do a `brew cask install dockertoolbox` and get everything in one go, plus Kitematic.

    And Windows, Chocolatey is your friend: https://chocolatey.org/packages?q=docker

    Reply
    • William Lam says

      03/01/2016 at 4:18 pm

      Thanks for the tips Hal.

      Reply
  5. chadpatt says

    03/18/2016 at 11:53 am

    Docker for OSX ... the easy way. https://www.docker.com/toolbox

    Reply
  6. Evan says

    10/21/2016 at 11:58 am

    I just wanted to THANK YOU! So helpful, doubt I could have gotten a VIB created without the docker image. Keep up the aweseome work!

    Reply
  7. dinkov says

    08/05/2021 at 3:11 pm

    Wow after 6 years since this was posted. I finally got it to run on my Ubuntu 20.04.2.0 LTS. Hadn't tried it on brew on OSX yet but having the right packages and dependencies is key.

    Two months in as a DevOps and this gave me ideas how to run a container on a Linux OS.

    Thanks a lot Will!

    Reply
  8. aku says

    12/01/2022 at 8:16 pm

    vib created using vibauthor is failing for 8.0 with below error

    In ImageProfile (Updated) ESXi-8.0.0-20513097-standard, the payload(s) in VIB does not have sha-256 gunzip checksum. This will prevent VIB security verification and secure boot from functioning properly. Please remove this VIB or please check with your vendor for a replacement of this VIB
    Please refer to the log file for more details.

    Reply
    • William Lam says

      12/02/2022 at 6:10 am

      Yea, there's been changes in ESXi 8.0 VIB structure where vibauthor is no longer compatible. This Fling hasn't been supported/updated in years, so this does not surprise me

      Reply
      • aku says

        12/08/2022 at 6:21 am

        Thanks for reply.
        could you please help with workaround/tools to create custom vib for esxi8.0 compatible.

        Reply
        • William Lam says

          12/08/2022 at 6:40 am

          There’s no workaround. Unless you’re a VMware Partner, there’s no tools to create compatible VIBs for ESXi 8. What’s your use case for this?

          Reply
          • aku says

            12/08/2022 at 5:51 pm

            Wanted to use some open source tool/binaries

          • Heinz says

            12/23/2022 at 1:37 am

            We are using for old legacy docker projects this tool
            https://github.com/vmware-archive/vsphere-storage-for-docker/releases

            but we made some fixes for us in one python file, under esxi 7 it is not possible to change files after the vib is installed.
            so we adjust the old vib with the new fixed python file.

          • Daniel says

            02/24/2023 at 12:48 pm

            any idea how to have the r8125 working with their VIBs ? got same sha-256 error.. thanks !

Thanks for the comment! Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Author

William Lam is a Senior Staff Solution Architect working in the VMware Cloud team within the Cloud Infrastructure Business Group (CIBG) at VMware. He focuses on Cloud Native technologies, Automation, Integration and Operation for the VMware Cloud based Software Defined Datacenters (SDDC)

Connect

  • Email
  • GitHub
  • LinkedIn
  • RSS
  • Twitter
  • Vimeo

Recent

  • How to disable the Efficiency Cores (E-cores) on an Intel NUC? 03/24/2023
  • Changing the default HTTP(s) Reverse Proxy Ports on ESXi 8.0 03/22/2023
  • NFS Multi-Connections in vSphere 8.0 Update 1 03/20/2023
  • Quick Tip - How to download ESXi ISO image for all releases including patch updates? 03/15/2023
  • SSD with multiple NVMe namespaces for VMware Homelab 03/14/2023

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2023

 

Loading Comments...