Skip to content


Deletes the VM.

This method will be called while the VM still has persistent disks attached. It is important to make sure that the IaaS behaves appropriately in this case and properly disassociates the persistent disks from the VM.

To avoid losing track of VMs, make sure to raise an error if VM deletion is not absolutely certain.


  • vm_cid [String]: Cloud ID of the VM to delete; returned from create_vm.


No return value


API request

  "method": "delete_vm",
  "arguments": [
  "context": {
    "director_uuid": "<director-uuid>",
    "request_id": "<cpi-request-id>",
  "api_version": 2,


Changes for V2 of the API contract

The signature for delete_vm is the same as in V1 pf the API contract. For CPIs that previously used the registry to track mount points, V2 does not necessarily use the registry. The registry is used if the stemcell API version is not sufficient. The Agent receives an unmount_disk from the Director and deletes the persistent disk settings when not using the registry. See CPI V2 Migration Guide for more information.