Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Format

MethodPOST
URL

/tasks/create

Request contentGuestToTemplate GuestAction Object
Successful answerTaskResult Object
Unexpected errorHTTP 500

...

GuestAction Object

Schema

repeatStringReserved
retriesStringNumber of times this task will be retried, in case of error
typeStringTask type identifier. In this case, "guest_action"
guest_idStringUnique identifier of the Guest
actionStringAction on the Guest

Possible actions are:

. In this case "covert_to:template"

convert_to:template

Convert a Guest into a Template
convert_to:normalConvert 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

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