Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] The command error: ServerFaultCode: A specified parameter was not correct #2812

Closed
xuanyuanaosheng opened this issue Apr 15, 2022 · 3 comments · Fixed by #2817
Closed
Assignees

Comments

@xuanyuanaosheng
Copy link

Describe the bug

  1. I used the document: https://github.com/vmware/govmomi/blob/master/govc/USAGE.md
  2. The command output is not working as expected.

The vcenter version is:

# govc about
FullName:     VMware vCenter Server 6.7.0 build-18485185
Name:         VMware vCenter Server
Vendor:       VMware, Inc.
Version:      6.7.0
Build:        18485185
OS type:      linux-x64
API type:     VirtualCenter
API version:  6.7.3
Product ID:   vpx
UUID:         374e5639-46e0-4a34-8f93-fae7d745df3b

The guest.df works fine

# govc guest.df -debug=true -dc AMDC -vm amdcsrv372.am.prod
Filesystem       Size     Used     Avail    Use%
/                4.9GB    3.3GB    1.6GB    67%
/home            1.9GB    1.0GB    937.9MB  53%
/boot            968.3MB  398.3MB  569.9MB  41%
/tmp             3.9GB    173.5MB  3.7GB    4%
/opt             4.8GB    1.1GB    3.7GB    23%
/var             4.9GB    2.7GB    2.2GB    54%
/data            149.9GB  3.6GB    146.3GB  2%
/var/lib/docker  50.0GB   29.3GB   20.7GB   59%
/var/log         9.7GB    6.8GB    2.9GB    70%

But the command 'guest.run' does not work right.

# govc guest.run -debug=true -dc AMDC -vm amdcsrv372.am.prod ifconfig
govc: ServerFaultCode: A specified parameter was not correct:
# govc guest.download -dc AMDC -vm amdcsrv372.am.prod /etc/sysconfig/network-scripts/ifcfg-eth0 ./ifcfg-eth0
govc: ServerFaultCode: A specified parameter was not correct:

The details error is govc: ServerFaultCode: A specified parameter was not correct:

@github-actions
Copy link
Contributor

Howdy 🖐   xuanyuanaosheng ! Thank you for your interest in this project. We value your feedback and will respond soon.

If you want to contribute to this project, please make yourself familiar with the CONTRIBUTION guidelines.

@xuanyuanaosheng
Copy link
Author

Found the solution: You have to also specify a guest vm login like user:pass via -l=: Guest VM credentials [GOVC_GUEST_LOGIN].

Seems to be like govc could be improved by always requiring the login or at least hint at the missing login when the request fails.

@embano1
Copy link
Contributor

embano1 commented Apr 22, 2022

Seems to be like govc could be improved by always requiring the login or at least hint at the missing login when the request fails.

I think this is a good suggestions. I can add a simple hint to check if username and password were provided when an error is thrown.

@embano1 embano1 self-assigned this Apr 22, 2022
embano1 pushed a commit to embano1/govmomi that referenced this issue Apr 25, 2022
Closes: vmware#2812
Signed-off-by: Michael Gasch <mgasch@vmware.com>
embano1 pushed a commit to embano1/govmomi that referenced this issue Apr 25, 2022
Closes: vmware#2812
Signed-off-by: Michael Gasch <mgasch@vmware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants