vcenter vm hardware disk: delete

Removes a virtual disk from the virtual machine. This operation does not destroy the VMDK file that backs the virtual disk. It only detaches the VMDK file from the virtual machine. Once detached, the VMDK file will not be destroyed when the virtual machine to which it was associated is deleted.

Request:

HTTP request

DELETE https://{server}/rest/vcenter/vm/{vm}/hardware/disk/{disk}

Path Parameters

Name Type Description
Required
vm string Virtual machine identifier.
disk string Virtual disk identifier.

Response:

HTTP Status Code: 200

None

Errors:

HTTP Status Code Type Description
500 error if the system reports an error while responding to the request.
404 not_found if the virtual machine or virtual disk is not found.
400 not_allowed_in_current_state if the virtual machine is suspended or if the virtual machine is powered on and virtual disk type is IDE.
400 resource_busy if the virtual machine is busy performing another operation.
400 resource_inaccessible if the virtual machine's configuration state cannot be accessed.
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.