REST API - unregister

vcenter VM: unregister

Removes the virtual machine corresponding to vm from the vCenter inventory without removing any of the virtual machine's files from storage. All high-level information stored with the management server (ESXi or vCenter) is removed, including information such as statistics, resource pool association, permissions, and alarms. This operation was added in vSphere API 6.8.7.


HTTP request

POST https://{server}/rest/vcenter/vm/{vm}?action=unregister

Path Parameters

Name Type Description
vm string Identifier of the virtual machine to be unregistered.


HTTP Status Code: 200



HTTP Status Code Type Description
400 not_allowed_in_current_state if the virtual machine is running (powered on).
404 not_found if there is no virtual machine associated with vm in the system.
500 resource_busy if the virtual machine is busy performing another operation.
503 service_unavailable if the system is unable to communicate with a service to complete the request.
401 unauthenticated if the user can not be authenticated.
403 unauthorized if the user doesn't have the required privileges.