Skip to content

Roll back a VM snapshot

POST
/vm/{rid}/snapshots/{snapshotId}/rollback
curl --request POST \
--url https://sylve.lan:8181/api/vm/1/snapshots/1/rollback \
--header 'Authorization: <Authorization>'

Stop the VM if needed, roll every recorded VM ZFS root back to the selected snapshot while destroying newer ZFS snapshots, restore the saved configuration, and attempt to restore the prior running state

rid
required
integer
>= 1

Virtual Machine RID

snapshotId
required
integer
>= 1

VM Snapshot ID

Success

Media typeapplication/json
object
data
object
newerSnapshotsDestroyed
integer
restarted
boolean
warnings
Array<string>
wasRunning
boolean
error
string
message
string
status
string
Examplegenerated
{
"data": {
"newerSnapshotsDestroyed": 1,
"restarted": true,
"warnings": [
"example"
],
"wasRunning": true
},
"error": "example",
"message": "example",
"status": "example"
}

Bad Request

Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{
"data": "example",
"error": "example",
"message": "example",
"status": "example"
}

Unauthorized

Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{
"data": "example",
"error": "example",
"message": "example",
"status": "example"
}

Forbidden

Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{
"data": "example",
"error": "example",
"message": "example",
"status": "example"
}

Not Found

Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{
"data": "example",
"error": "example",
"message": "example",
"status": "example"
}

Conflict

Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{
"data": "example",
"error": "example",
"message": "example",
"status": "example"
}

Internal Server Error

Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{
"data": "example",
"error": "example",
"message": "example",
"status": "example"
}

Service Unavailable

Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{
"data": "example",
"error": "example",
"message": "example",
"status": "example"
}