Recreate virtual machine
Recreate a virtual machine from scratch.
Recreate a virtual machine from scratch.
The recreation process involves reinstalling the operating system and resetting the virtual machine to its initial state. Snapshots, if there are any, will be deleted.
Password Requirements
Password will be checked against leaked password databases. Requirements for the password are:
- At least 12 characters long
- At least one uppercase letter
- At least one lowercase letter
- At least one number
- Is not leaked publicly
This operation is irreversible and will result in the loss of all data stored on the virtual machine!
Use this endpoint to completely rebuild VPS instances with fresh OS installation.
API Token authentication
Virtual Machine ID
1268054Template ID
1130Root password for the virtual machine. If not provided, random password will be generated. Password will not be shown in the response.
oMeNRustosIOPanel password for the panel-based OS template. If not provided, random password will be generated. If OS does not support panel_password this field will be ignored. Password will not be shown in the response.
Mna58c17a4dPost-install script to execute after virtual machine was recreated
6324Success response
Action ID
8123712Action name
action_nameAction state
successPossible values: 2025-02-27T11:54:00Z2025-02-27T11:58:00ZUnauthenticated response
Validation error response
Error response
POST /api/vps/v1/virtual-machines/{virtualMachineId}/recreate HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 107
{
"template_id": 1130,
"password": "oMeNRustosIO",
"panel_password": "Mna58c17a4d",
"post_install_script_id": 6324
}{
"id": 8123712,
"name": "action_name",
"state": "success",
"created_at": "2025-02-27T11:54:00Z",
"updated_at": "2025-02-27T11:58:00Z"
}Last updated
Was this helpful?