govmomi: the Go client for the vSphere API, plus govc and vcsim
Go library for the VMware vSphere API
At a glance
- What is it?
- govmomi is the Go library behind the vSphere API clients, and it ships two tools that matter more to most engineers than the library itself: govc, a vSphere CLI, and vcsim, an API simulator. It targets vSphere 7.0 and higher and is Apache-2.0.
- Who is it for?
- Adopt govmomi if your automation is Go, or if you want govc as a scriptable vSphere CLI and vcsim as a simulator you can run without a live vCenter. Do not adopt it as a general-purpose vSphere admin UI, and do not treat the bundled simulator as a substitute for testing against your own vCenter and ESXi builds.
- 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 received new commits within the last day.
- What is it written in?
- Mainly Go, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 30, 2026, and from our analysis. They are not legal advice.
Editorial analysis
What govmomi is for, and who ends up using it
The README describes govmomi as a Go library for interacting with VMware vSphere APIs, covering ESXi and vCenter Server. That sentence undersells the repository, because it also contains govc, a vSphere CLI, vcsim, a vSphere API mock framework, and toolbox, a VM guest tools framework. Four products in one module tree.
The split matters when you decide whether to adopt it. If you write Go services that talk to vCenter, you import the library and the CLI is incidental. If you write shell or CI automation, you may never import the library at all and instead use govc. If you need to test vSphere-facing code without a lab, vcsim is the reason you are here.
Compatibility is stated plainly: vSphere 7.0 and higher. That is a hard floor, not a soft recommendation. Teams still running 6.x are out of scope according to the README, and there is no compatibility table for older releases.
The name follows the family convention: language prefix plus the vSphere acronym VM Object Management Infrastructure, so go plus vmomi. pyvmomi and rbvmomi are the Python and Ruby siblings, and the README lists both under related projects.
How the library wraps the generated vSphere API code
The README is explicit about the layering. The code in 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. The generated types live under gen/ in the repository tree, and the hand-written packages sit alongside them: object, find, property, session, view, task, performance, simulator, vapi, and more.
So the data flow is: you call a convenience function in object or find, it builds a request against the generated types, the client in client.go sends it over the vSphere API, and the response comes back as generated structures you then inspect. If a convenience function does not exist for your case, you can drop to the generated layer rather than leaving the library.
That is the real design decision here. The wrapper is deliberately thin and the generated surface is exposed, which means the library's API tracks the upstream VMware vSphere API Reference Documentation closely. The cost is that reading the upstream reference is unavoidable for anything non-trivial. The README says as much when it tells you to refer to that documentation to become familiar with the upstream API.
The repository layout reflects this. There are separate top-level packages for alarm, cns, crypto, eam, event, fault, guest, license, lookup, nfc, ovf, pbm, property, ssoadmin, sts, sms, units, and vapi. Each maps to a slice of the vSphere API rather than to a task you might want to perform.
Installing govmomi and running a first vcsim session
For the library itself, the module path is the installation step. The go.mod file in the repository declares the module as github.com/vmware/govmomi and requires Go 1.25.0, so add it the usual way and let the toolchain resolve the version.
go get github.com/vmware/govmomiAfter that, the import path in your own code is the same string, and the packages you are most likely to start with are object, find, and session.
The README does not give install instructions for govc and vcsim at the top level. It points at the respective README files of govc and vcsim for installation instructions, released binaries, and Docker images. That is where to look, and the repository also carries Dockerfile.govc, Dockerfile.govc.runner, and Dockerfile.vcsim at the top level, plus a .goreleaser.yml, which is consistent with published binaries and images.
If you build from source instead, the Makefile requires the go program to be present and errors out with "The go program cannot be found" if it is not. It defines BIN_DIR as bin and a lint target that runs golangci-lint from hack/tools/bin.
make helpRunning make with no target prints the usage block, because help is the default goal. From there the targets listed in the Makefile are the supported entry points, including the lint targets. The Makefile comments note it follows a documented convention for well-documented Makefiles, which is why make help produces a formatted target list rather than an error.
Where govmomi is the wrong tool
The library is generated from the vSphere API description and wrapped thinly. That means error handling tends to surface vSphere faults rather than friendly messages. The fault package exists for exactly this reason, and you will need to decide how your code maps those faults to your own error types. Nothing in the README suggests the library hides them for you.
Version churn is the second constraint. The README states that changes to the API are subject to semantic versioning and points at the CHANGELOG for version to version changes. The recent release history shows how fast that cadence runs: v0.54.2 and v0.55.1 both landed on 2026-07-03, and v0.56.0 followed on 2026-08-21. If you pin a version and do not read the changelog, you will discover breaking changes at upgrade time rather than at release time.
The third case is simply the wrong shape of problem. If you want a graphical console for day-to-day vSphere administration, govmomi is not that. If you want a Python or Ruby client, the README points at pyvmomi and rbvmomi instead. And if your vSphere estate is below 7.0, the stated compatibility range excludes you.
There is also a documentation gap worth naming. The repository has no homepage field, and the README routes you to pkg.go.dev for godoc and to the upstream API reference for semantics. There is no single prose guide to the library in this repository.
vcsim versus a real lab, and pyvmomi as the alternative
The most consequential thing in this repository for testing is vcsim, described in the README as a vSphere API mock framework. The simulator package and the vcsim directory are both in the tree. The difference from spinning up a nested lab is that a mock framework speaks the API without running the hypervisor, so tests exercise your client code and the API surface rather than actual VM operations.
That is also its limit. A simulator answers according to what its authors implemented. Behaviour that depends on real ESXi or vCenter internals, on storage or network conditions, or on a specific patch level of your environment is not covered by a mock. Treat vcsim as a fast check on your request construction and response parsing, and keep at least one test path against a real endpoint.
The cross-language alternative is pyvmomi, listed under related projects and pronounced the same way: language prefix plus vmomi. Both are generated from the same vSphere API description, so the object model you learn transfers. The difference is the ecosystem around them. pyvmomi puts you in Python with its packaging and deployment story; govmomi puts you in Go with a compiled binary, which is why govc exists as a standalone CLI rather than as a Python script. If your team already writes Go services against vCenter, mixing in a Python client for one tool adds a second runtime for no gain.
For a CLI-first workflow, the relevant comparison is not another library at all but the vSphere client you already have. govc is the answer the repository offers, and the README directs you to its own README for installation and binaries.
Maintenance, releases and the Apache-2.0 licence
The repository is not archived, and its last push was on 2026-09-28. The most recent release listed is v0.56.0 from 2026-08-21, preceded by v0.55.1 and v0.54.2 on 2026-07-03. That is a project with a live release cadence, and the CHANGELOG is the artefact you read to plan an upgrade. The README also notes that API changes follow semantic versioning, so the major version boundary is the signal for breaking changes.
Upgrade cost is dominated by two things: the Go toolchain floor and the generated API surface. The go.mod file requires Go 1.25.0, so an upgrade of govmomi can force a toolchain upgrade in your build image before you write a line of code. The generated packages mean that a vSphere API revision can add or change types your code touches, which is why the CHANGELOG rather than the version number is the real planning input.
The licence is Apache-2.0, stated in the README and present as LICENSE.txt at the repository root. Apache-2.0 is a permissive licence with an explicit patent grant, which is generally the reason enterprises can vendor and redistribute it. That is a description of the licence text, not legal advice; if you redistribute govc or embed the library in a product, have your own counsel review the notice and attribution requirements.
One practical note on the build: the Makefile pins its linter through hack/tools/bin rather than assuming a global install, so a contributor build is reproducible without polluting the host toolchain. The .golangci.yml at the root configures that linter.
Editorial conclusion
Adopt govmomi if your automation is Go, or if you want govc as a scriptable vSphere CLI and vcsim as a simulator you can run without a live vCenter. Do not adopt it as a general-purpose vSphere admin UI, and do not treat the bundled simulator as a substitute for testing against your own vCenter and ESXi builds. Before committing, check the CHANGELOG against your pinned version, confirm your vSphere release is 7.0 or higher, and read the govc and vcsim README files, since the top-level README defers to them for installation.
Frequently asked questions
What is govmomi?
It is a Go library for interacting with VMware vSphere APIs, covering ESXi and vCenter Server. The same repository also contains govc, a vSphere CLI, vcsim, a vSphere API mock framework, and toolbox, a VM guest tools framework.
How does govmomi compare to pyvmomi?
Both follow the same naming convention of language prefix plus the vmomi acronym, and both are generated from the vSphere API description. govmomi is the Go client and pyvmomi is the Python client, listed in the README under related projects.
How do I install govmomi?
For the library, add the module with go get github.com/vmware/govmomi; go.mod declares the module path and requires Go 1.25.0. For the govc and vcsim binaries, the README points to the installation instructions, released binaries and Docker images documented in their respective README files.
Which vSphere versions does govmomi support?
The README states compatibility with vSphere 7.0 and higher. No compatibility information for earlier releases is given.
What is vcsim in the govmomi repository?
The README describes vcsim as a vSphere API mock framework, and it has its own README, directory and Dockerfile in the repository. It is separate from the govmomi library and the govc CLI, which the README also lists as included components.
Official sources
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.
[](https://hysenlabs.com/projects/vmware-govmomi)