Date Added | Description | Link |
---|---|---|
2019-11-26 | Govc Usage | https://github.com/vmware/govmomi/blob/master/govc/USAGE.md |
brew tap govmomi/tap/govc && brew install govmomi/tap/govc
note that this might not be the latest version. my homebrew only had 0.19 which notably didn’t contain the library commands. I just grabbed the latest release from here: https://github.com/vmware/govmomi/releases and put it in ~/bin
source govc-vars.sh
$ alias govc=$(pwd)/govc_darwin_amd64
$ export GOVC_URL=vcenter.foo.com
$ export [email protected]
$ export GOVC_PASSWORD=password
$ export GOVC_INSECURE=1
govc ls /datacenter/vm/
govc vm.info /datacenter/vm/new-vm
govc vm.clone -vm template-vm new-vm
govc vm.clone -vm template-vm -link new-vm
govc vm.clone -vm template-vm -snapshot s-name new-vm
govc vm.clone -vm template-vm -link -snapshot s-name new-vm
govc vm.clone -vm template-vm -snapshot $(govc snapshot.tree -vm template-vm -C) new-vm
govc library.deploy /library_name/ovf_template vm_name
govc library.deploy /library_name/ovf_template -options deploy.json
govc export.ovf -vm $vm DIR
govc import.spec
govc import.spec file.ova | python -m json.tool > ubuntu.json
govc import.spec file.ova | jq > spec.json
govc vm.change -vm vm_name -c 4 -m 4096
open $(govc vm.console my-vm)
govc guest.ps -vm $name
govc guest.ps -vm $name -e
govc guest.ps -vm $name -p 12345
govc guest.ps -vm $name -U roo
govc events