vsphere-automation-sdk-python
vsphere-automation-sdk-python copied to clipboard
List all VMs API returning 500 server error
I get 500 server error when I run the (GET) /rest/vcenter/vm API on my company's vSphere client instance.
I notice that there are a few VMs that are inaccessible and a few that are orphaned. According to another (closed) thread, looks like this MIGHT be the issue. Is this a known bug?
- vSphere version: 6.7.0.48000
Steps or code snippet to reproduce
Run the (GET) /rest/vcenter/vm API
Actual behavior
Getting 500 server error with the below API response { "type": "com.vmware.vapi.std.errors.internal_server_error", "value": { "messages": [ { "args": [ "null" ], "default_message": "Provider method implementation threw unexpected exception: null", "id": "vapi.bindings.method.impl.unexpected" } ] } }
Expected behavior
200 OK with the successful retrieval of the VM list
I have the same issue with the same version. Version 7.0 and above works just fine! :+1:
Would be nice to know if there is any progress on this issue :grin:
Thanks!
@Gallifreys11
Could you please share the logs (error logs/vc bundle), would like to investigate further.
Thanks!
@Gallifreys11 There is a known issue in 6.7 when VMs are in invalid(orphaned/inaccessible) or VM being cloned state, we hit this internal_server_error 500. This issue is fixed in 7.0. A workaround here would be to remove these invalid VMs from inventory.
Thank You very much @jobingeo and @shwetapurohit :pray:
In fact we still had such machines because of a host failure in the cluster last week.
I cleaned everything and now it works perfectly again! :tada:
closing the issue