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!

8 thoughts on “A Docker Container for building custom ESXi VIBs

    • 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

  1. 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

  2. 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 \”\$@\”” > /usr/local/bin/vibauthor
    chmod +x /usr/local/bin/vibauthor

  3. 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!

Thanks for the comment!