vSphere GET VM /rest/vcenter/vm/{vm-id} API intermittently fails with Internal Error
search cancel

vSphere GET VM /rest/vcenter/vm/{vm-id} API intermittently fails with Internal Error

book

Article ID: 336097

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Symptoms:

When you use a REST API function such as /rest/vcenter/vm/{vm-id}, the call might fail with an error message such as Internal server error: Error: Http error 500 while requesting '/rest/vcenter/vm/vm-12’.


Environment

VMware vCenter Server 7.0.x

Cause

The issue occurs because the networkBootProtocol might does not persist in the vCenter Server database after reconfiguring the VM.

As a result, when vCenter Server restarts, the networkBootProtocol value is not available and the REST API function /rest/vcenter/vm/{vm-id} fails.

Resolution


The issue is resolved in VMware vCenter Server 7.0 Update 3i. The fix makes sure that the networkBootProtocol value persists in the vCenter Server database after a VM reconfigure and vCenter Server restart.

Workaround:
For versions of vCenter earlier than VMware vCenter Server 7.0 Update 3i in order to update the VM networkBootProtocol in the VCDB we must push an update to vCenter.

This can be done by either:

A) An update operation on the affected VM such as:

i. VM Rename
ii. VM Reconfigure (With/Without any config change)
iii. Migrate the VM to a different Host.

After the VM operation there would an automatic Host Sync from ESXi to vCenter.

B) You can disconnect and reconnect the ESXi host where the affected VM is registered, this will force a Host Sync.

After the Host Sync the networkBootProtocol value would be set to either ipv4 or ipv6.

Then the REST GET VM API should work fine.