Self-hosted service
vmware/govmomi avatar
vmware/govmomi

govmomi refuses to print its own help text until Go is on the path, and two of its dependencies date from 2016

Go library for the VMware vSphere API

2,566 stars987 forksGoApache-2.0

At a glance

What is it?
govmomi is a Go library for the VMware vSphere API that also ships a CLI, an API mock framework and a guest tools framework. Its front page gives one compatibility line and no install command, its Makefile gates every target on finding Go at parse time, and two of its ten direct dependencies are pinned to untagged commits from 2016 and 2017.
Who is it for?
govmomi is the right choice for Go code that has to talk to vSphere, and it is a poor choice for anything else, since it is a wrapper rather than a service and it assumes you already have credentials and an endpoint. Read the front page as a pointer document, not a guide: it states one compatibility fact, vSphere 7.0 and higher, gives no Go version, and carries no install command at all, deferring binaries and Docker images to the READMEs of govc and vcsim.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 4 days ago.
What is it written in?
Mainly Go, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • vmware/govmomi2,566 ★ · +12
Star history
Repository2026-09-302026-11-15
vmware/govmomi2.6k2.6k

12 Stars in the last 46 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

Bare make prints usage, and will not print it without Go

The default goal is not a build. The file sets `.DEFAULT_GOAL := help`, so a bare make prints usage instead of compiling anything. The catch is what comes earlier. The go binary is resolved with `GO ?= $(shell command -v go 2>/dev/null)` and then checked at parse time:

code
ifeq (,$(strip $(GO)))
$(error The "go" program cannot be found)
endif

Because that check sits outside any rule, it is evaluated while make reads the file, before it knows which target you asked for. The consequence is that `make help` also fails on a machine without Go, so the one target that exists to tell you what to do is the one you cannot reach first. Directories are fixed relative to the root at the same point, with `BIN_DIR := bin` and `TOOLS_DIR := hack/tools`, and the linter is expected at a path inside that tools directory rather than from the system.

The help text is an awk script reading the Makefile's own comments

The `help` target has no list of targets of its own. It runs one awk program over `$(MAKEFILE_LIST)`, splitting each line on `:.*##` and printing the part after the double hash, which is why every documented target in the file carries a trailing comment in the form `## Display usage`. Colour comes from escape sequences inside that same awk string, so the help output is ANSI formatted whether or not the terminal wants it. The shell is pinned too, with `SHELL := /usr/bin/env bash` and a comment above it stating that make must run with bash because some syntax below is bash-specific. Directory variables and tool paths are written as immediate assignments while the flags for the linter use the conditional form, so a caller can override the fast mode but not where the binaries live.

Two dependencies are pinned to untagged commits, one from 2016

The module declares `go 1.25.0` and ten direct requirements. Two of them have no version number at all, only a pseudo-version built from a commit hash and a date:

code
	github.com/dougm/pretty v0.0.0-20160325215624-add1dbc86daf
	github.com/rasky/go-xdr v0.0.0-20170124162913-1a41d1a06c93
	gopkg.in/yaml.v3 v3.0.1
	go.yaml.in/yaml/v3 v3.0.5 // indirect

`dougm/pretty` resolves to a March 2016 commit and `rasky/go-xdr` to a January 2017 one, which is what a pseudo-version means: the dependency has no tag to point at. Meanwhile the module itself requires a Go release from the current decade. The last two lines show a second detail, two YAML libraries in one module, with the older gopkg.in path held as a direct dependency and a differently named one pulled in indirectly.

The library is a convenience layer over generated code

The front page is explicit about what the code is: the `govmomi` package is a wrapper for code generated from the vSphere API description, and it primarily provides convenience functions for working with that API. So the shape of the library follows the upstream schema rather than a hand designed surface, with the wrapper adding ergonomics on top. Readers are pointed at the vSphere API Reference first and at the Go package documentation second, which is the reverse of the usual order and tells you the intended reading path. That reference now lives on a Broadcom developer address rather than a VMware one, and the only other reading pointer is the package index on pkg.go.dev. No API surface, type list or example appears on the front page itself.

vcsim and simulator are two different directories with similar names

The repository is four projects at once: the API client library, govc as the vSphere CLI, vcsim as the vSphere API mock framework, and toolbox as the VM guest tools framework. The top level also carries a `simulator/` directory next to `vcsim/`, and only the second of the two is named on the front page. Examples are split the same way, with `examples/examples.go` at the top of that directory and separate subdirectories for alarms, datastores, events, hosts, networks, perfmanager, tasks and virtualmachines. Guest operations and other packaging concerns sit in their own top level directories as well, so the tree is organised by vSphere subsystem rather than by layer.

One compatibility line, no Go version, and no install command

Everything the page commits to about compatibility is the sentence vSphere 7.0 and higher, covering ESXi and vCenter Server. It does not state a Go version, does not say which module path to require, and gives no command to install anything. Installation is delegated: binaries and Docker images for govc and vcsim are documented in the READMEs of those two subdirectories, and the three Dockerfiles at the root are named after them, including a separate runner image for govc. The API layer is a library, so the Go package index is the place a version is pinned, and the fact that the repository root holds `client.go` and `client_test.go` directly is the only sign of where that entry point lives.

A patch and a minor published on the same day, in a 0.x series

Three tags are on record: v0.56.0 on 2026-08-21, then v0.55.1 and v0.54.2 both dated 2026-07-03, a few hours apart, which is a patch to one line and a minor to another on the same day. The last commit landed on 2026-10-01, some weeks after the newest tag. The status section says changes to the API are subject to semantic versioning and points at a changelog for version to version changes, without saying whose API it means in a document about somebody else's. Alongside that sit `CHANGELOG.md` with a `.chglog` directory, `RELEASE.md`, a goreleaser configuration, `CONTRIBUTING.md`, a contributors list and a mailmap, all under the Apache 2 licence stated at the end of the page.

Editorial conclusion

govmomi is the right choice for Go code that has to talk to vSphere, and it is a poor choice for anything else, since it is a wrapper rather than a service and it assumes you already have credentials and an endpoint. Read the front page as a pointer document, not a guide: it states one compatibility fact, vSphere 7.0 and higher, gives no Go version, and carries no install command at all, deferring binaries and Docker images to the READMEs of govc and vcsim. Two things are worth checking before you depend on the API surface. The library wraps code generated from the vSphere API description, so upstream changes arrive as generated code rather than as considered API design. And the version series is still 0.x, where a minor bump is allowed to break things, even though the page promises semantic versioning. If you want to experiment without hardware, vcsim is in the same repository, and the module's own test dependencies are the fastest way to see what the surface looks like.

Frequently asked questions

What is govmomi in relation to vSphere?

It is a Go library for interacting with the VMware vSphere APIs, covering ESXi and vCenter Server, published as the module github.com/vmware/govmomi. The front page states compatibility as vSphere 7.0 and higher, and its name follows the convention of language prefix plus the vSphere acronym VM Object Management Infrastructure, the same convention as pyvmomi and rbvmomi.

How does govmomi compare with pyvmomi?

The front page does not compare them. It names pyvmomi and rbvmomi under related projects and explains that its own name follows the same language prefix convention, which is the whole of what it says about the Python and Ruby clients. Any comparison of features would have to come from those projects, not from this repository.

What does the govmomi repository contain besides the library?

Three more projects ship in the same tree: govc as the vSphere CLI, vcsim as the vSphere API mock framework, and toolbox as the VM guest tools framework. There is also a changelog, a release document, and three Dockerfiles named Dockerfile.govc, Dockerfile.govc.runner and Dockerfile.vcsim.

What Go version does govmomi need?

The module file declares go 1.25.0. The front page states no Go version at all, and it carries no install command, deferring binaries and Docker images for govc and vcsim to the README of each subdirectory.

Can I run make in govmomi without Go installed?

No. The go binary is resolved with command -v and checked in a conditional outside any rule, so make stops with the error that the go program cannot be found while it is still reading the file. That applies to the help target as well, which is the default goal, so the usage text is unreachable on a machine without Go.

Official sources

  1. Issues
  2. License: Apache-2.0
  3. README
  4. Releases
  5. vmware/govmomi on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/vmware-govmomi.svg)](https://hysenlabs.com/projects/vmware-govmomi)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/vmware-govmomi.svg)](https://hysenlabs.com/projects/vmware-govmomi)

Was this useful?