govmomi
govmomi copied to clipboard
vcsim: add options for ESXi/vCenter version
Is your feature request related to a problem? Please describe.
While vcsim can change the API version through the option -api-version, ESXi/vCenter version cannot be changed.
# start vcsim
$ vcsim -api-version 8.0
# see vCenter info
$ govc about
FullName: VMware vCenter Server 6.5.0 build-5973321 (govmomi simulator)
Name: VMware vCenter Server
Vendor: VMware, Inc.
Version: 6.5.0
Build: 5973321
OS type: linux-amd64
API type: VirtualCenter
API version: 8.0
Product ID: vpx
UUID: fb08b87b-b771-535a-8eb0-4a9ed5e45ee7
Describe the solution you'd like
vcsim has options to set the ESXi/vCenter version similar to -api-version.
# start vcsim
$ vcsim -api-version 8.0 -vpx-version 8.0.3
# see vCenter info
$ govc about | grep -i version
Version: 8.0.3
API version: 8.0
# start vcsim
$ vcsim -esx -api-version 8.0 -esx-version 8.0.3
# see ESXi info
$ govc about | grep -i version
Version: 8.0.3
API version: 8.0
Additional context
An option name -version should not be used as it may be confused with the version command vcsim version.