Versions Compared

Key

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

...

MethodPOST
URL

/tasks/create

Request contentGuestCreate Object
Successful answerTaskResult Object
Unexpected errorHTTP 500

GuestCreate Object

Schema

repeatStringReserved
retriesStringNumber of times this task will be retried, in case of an error
typeStringTask type identifier. In this case, "guest_create"
guest_idStringUnique identifier of the Guest
descriptionStringDescription of the Guest
socketsStringNumber of virtual CPU sockets
coresStringNumber of CPU cores per socket
vramStringRAM in GB.
audio_drvStringAudio driver name. One of "rtl8139" or "ich6".
rtc_typeStringRTC clock reference. One of "local", "UTC", or empty
keyboard_drvStringKeyboard driver name. One of "ps2", "usb" or empty
cpu_emulStringCPU emulation type. One of "kvm", "amd" or empty
pool_idStringUnique identifier of the Pool that will contain the new Guest
preferred_hostStringPreferred host for this Guest
disk_listArray of DiskInfoArray of associated Images
direct_disk_listArray of DirectDiskInfoArray of directly attached disks
iso_listArray of ISOInfoArray of associated ISO images
net_listArray of NetworkInfoArray of network interfaces of the new Guest

JSON example

Code Block
languagejs
{
    "repeat": "0",    
    "retries": "0",
    "type": "guest_create",
    "rtc_type": "",
    "vram": "2",
    "audio_drv": "ich6",
    "sockets": "1",
    "description": "",
    "cores": "2",
    "preferred_host": "",
    "direct_disk_list": [],
    "guest_id": "corus",
    "disk_list": [{
        "devnum": "0",
        "bus": "virtio",
        "volume_id": "home_flexvdi",
        "image_id": "corus",
        "image_storage_id": "internal"
    }],
    "iso_list": [{
        "media_storage_id": "ms-empty",
        "filename": "ms-empty",
        "devnum": "0",
        "bus": "ide"
    }],
    "net_list": [{
        "vlan_list": "",
        "vlan_mode": "none",
        "bridge": "virbr0",
        "driver": "virtio",
        "hwaddr": "02:f1:00:14:00:05",
        "device": "eth0"
    }],
    "pool_id": "templates"
}

...