This post is a long overdue tutorial on how to setup govc.
What is govc? It’s a cli utilizing govmomi, a go library used to interact with vSphere API. Why use govc? It’s fast and way better to use for automation tasks.
- Download release binary here:
- Depending on the platform, decompress:
- gzip -d govc_linux_amd64.gz
- Flag it as executable
- chmod +x govc_linux_amd64
- Move the executable to your $PATH:
- mv govc_linux_amd64 /usr/local/bin/govc
How to use:
- Create a flat file with the below content
- source the file to export
- run govc
- sample: govc ls
export [email protected]
Advance examples here: