You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When govc datastore.disk.inflate is executed without vmdk file argument(, that is wrong usage), it does not validate arguments and requests to vCenter with empty vmdk path.
This also occurs when datastore.disk.shrink is executed.
To Reproduce
Steps to reproduce the behavior:
execute command below
$ govc datastore.disk.inflate
Expected behavior
A clear and concise description of what you expected to happen.
govc shows help to tell the right command usage.
$ govc datastore.disk.inflate
Usage: govc datastore.disk.inflate [OPTIONS] VMDK
Inflate VMDK on DS.
Examples:
govc datastore.disk.inflate disks/disk1.vmdk
Options:
-cert= Certificate [GOVC_CERTIFICATE]
-dc= Datacenter [GOVC_DATACENTER]
-debug=false Store debug logs [GOVC_DEBUG]
-ds= Datastore [GOVC_DATASTORE]
-dump=false Enable Go output
-json=false Enable JSON output
-k=true Skip verification of server certificate [GOVC_INSECURE]
-key= Private key [GOVC_PRIVATE_KEY]
-persist-session=true Persist session to disk [GOVC_PERSIST_SESSION]
-tls-ca-certs= TLS CA certificates file [GOVC_TLS_CA_CERTS]
-tls-known-hosts= TLS known hosts file [GOVC_TLS_KNOWN_HOSTS]
-trace=false Write SOAP/REST traffic to stderr
-u=https://user@127.0.0.1:8989/sdk ESX or vCenter URL [GOVC_URL]
-verbose=false Write request/response data to stderr
-vim-namespace=vim25 Vim namespace [GOVC_VIM_NAMESPACE]
-vim-version=7.0 Vim version [GOVC_VIM_VERSION]
-xml=false Enable XML output
Affected version
Please provide details on the version used, e.g. release tag, commit, module version, etc.
govc 0.27.4
Screenshots/Debug Output
If applicable, add screenshots or debug output to help explain your problem.
govc requests inflatation to vCenter with empty vmdk path and responds an error.
$ govc datastore.disk.inflate
[22-03-22 09:29:18] Inflating [datastore1]...Error: The virtual disk is either corrupted or not a supported format.
C:\Users\tanot\apps\govc.exe: The virtual disk is either corrupted or not a supported format.
# same as below
$ govc datastore.disk.inflate ""
[22-03-22 09:29:19] Inflating [datastore1]...Error: The virtual disk is either corrupted or not a supported format.
C:\Users\tanot\apps\govc.exe: The virtual disk is either corrupted or not a supported format.
Additional context
Add any other context about the problem here.
datastore.disk.info and datastore.disk.create show usage help when vmdk is not specified.
The text was updated successfully, but these errors were encountered:
Syuparn
added a commit
to Syuparn/govmomi
that referenced
this issue
Mar 24, 2022
Describe the bug
When
govc datastore.disk.inflate
is executed without vmdk file argument(, that is wrong usage), it does not validate arguments and requests to vCenter with empty vmdk path.This also occurs when
datastore.disk.shrink
is executed.To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
govc
shows help to tell the right command usage.Affected version
Please provide details on the version used, e.g. release tag, commit, module version, etc.
0.27.4
Screenshots/Debug Output
If applicable, add screenshots or debug output to help explain your problem.
govc
requests inflatation to vCenter with empty vmdk path and responds an error.Additional context
Add any other context about the problem here.
datastore.disk.info
anddatastore.disk.create
show usage help when vmdk is not specified.The text was updated successfully, but these errors were encountered: