Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
Version 1
Current »
Method | POST |
---|
URL | /tasks/create |
---|
Request content | GuestAction Object
|
---|
Successful answer | TaskResult Object
|
---|
Unexpected error | HTTP 500 |
---|
GuestAction Object
Schema
repeat | String | Reserved |
---|
retries | String | Number of times this task will be retried, in case of error |
---|
type | String | Task type identifier. In this case, "guest_action" |
---|
guest_id | String | Unique identifier of the Guest |
---|
action | String | Action on the Guest |
---|
Possible actions are:
convert_to:template | Convert a Guest into a Template |
---|
convert_to:guest | Convert a Template into a Guest |
---|
start | Start a Guest. If the Guest stops itself, it will be started again |
---|
startonce | Start a Guest only once. If the Guest stops itself, it will not be started again |
---|
shutdown | Send an ACPI shutdown signal to the Guest OS |
---|
stop | Stop a Guest immediately |
---|
suspend | Save a Guest's state to disk and stop it |
---|
restore | Load a Guest's state from disk and start it |
---|
pause | Pause Guest, without unloading it from memory |
---|
resume | Resume a Guest from paused state |
---|
change_pool:$POOL_NAME | Change a Guest's Pool to $POOL_NAME |
---|
boot_from:$DEV | Change boot device to one of "hd", "cdrom" or "network" |
---|
preferred_host:$HOST_NAME | Change Guest's preferred Host to $HOST_NAME |
---|
JSON example
{
"repeat": "0",
"retries": "0",
"type": "guest_action",
"guest_id": "testguest",
"action": "covert_to:template"
}