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)"
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
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
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
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!
mikiefoley says
Stuck at Step 3. "Waiting for VM to come online"
William Lam says
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
mikiefoley says
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
Touseef says
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
halr9000 says
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
William Lam says
Thanks for the tips Hal.
chadpatt says
Docker for OSX ... the easy way. https://www.docker.com/toolbox
Evan says
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!
dinkov says
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!
aku says
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.
William Lam says
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
aku says
Thanks for reply.
could you please help with workaround/tools to create custom vib for esxi8.0 compatible.
William Lam says
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?
aku says
Wanted to use some open source tool/binaries
Heinz says
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
any idea how to have the r8125 working with their VIBs ? got same sha-256 error.. thanks !