Skip to main content

Rebuilds a virtual machine, reinstalling it from a specified image.

POST
/v1/projects/:projectId/vms/:vmId/rebuild

This operation is asynchronous and returns a pollable operation id. Poll GET /v{version}/projects/{projectId}/operations/{operationId} using the returned OperationId until its status leaves InProgress. A new initial login password is generated and returned in the response. If SshKeyIds is omitted or empty, the VM's currently bound SSH keys are reused; otherwise the provided keys become the effective set for the rebuilt VM.

Request

Responses

The rebuild request was accepted; the VM is being reinstalled in the background.