Guest actions

Format

MethodPOST
URL

/tasks/create

Request contentGuestAction Object
Successful answerTaskResult Object
Unexpected errorHTTP 500

GuestAction Object

Schema

typeStringTask type identifier. In this case, "guest_action"
guest_idStringUnique identifier of the Guest
actionStringAction on the Guest

Possible actions are:

convert_to:template

Convert a Guest into a Template
convert_to:guestConvert a Template into a Guest
startStart a Guest. If the Guest stops itself, it will be started again
startonceStart a Guest only once. If the Guest stops itself, it will not be started again
shutdownSend an ACPI shutdown signal to the Guest OS
stopStop a Guest immediately
suspendSave a Guest's state to disk and stop it
restoreLoad a Guest's state from disk and start it
pausePause Guest, without unloading it from memory
resumeResume a Guest from paused state
change_pool:$POOL_NAMEChange a Guest's Pool to $POOL_NAME
boot_from:$DEVChange boot device to one of "hd", "cdrom" or "network"
preferred_host:$HOST_NAMEChange Guest's preferred Host to $HOST_NAME

JSON example

{
    "type": "guest_action",
    "guest_id": "testguest",
    "action": "covert_to:template"
}