Virtual Machine: Reimage

The reimage endpoint allows a virtual machine to be re-installed from a clean operating system image and returned to the same state as a new machine.

Re-image requests can only be made against a powered-off virtual machine.


Relative to

POST /accounts/{account-id}/groups/{group-id}/virtual_machines/{vm-id}/reimage


  • distribution – the name of a distribution; valid options are available by calling GET /definitions.
  • root_password – the root password the machine should have after re-imaging.
  • ssh_public_key – if specified, the contents of /root/.ssh/authorized_keys (for Linux distributions). Allows passwordless login.
  • firstboot_script – if specified, an arbitrary executable to be run on first boot (for Linux distributions). This should be a full, executable script, probably starting #!/bin/sh



POST /accounts/123/groups/default/virtual_machines/45/reimage


curl -H "Content-type: application/json" \
     -H "Authorization: Bearer {session-id}" \
     -X POST \
     -d '{"distribution":"jessie","root_password":"mysecurepassword"}' \

Response (success: 200)

  "distribution": "wheezy",
  "root_password": "mysecurepassword"
Updated on July 26, 2018

Was this article helpful?

Related Articles

Have you tried Kubernetes?
Kubernetes (K8s) is helping enterprises to ship faster & scale their business. Sounds good? Let us build a K8s solution for your needs.
Register your interest