ConversionsResource


Generate missing conversions of a disk


Request the creation or restart of all the required conversions to be able to deploy on any hypervisor technology in the datacenter. Base format is preferred.
hypervisorType baseDiskFormatType
VMX_04 / CLUSTER VMDK_FLAT
KVM QCOW2_SPARSE
ORACLE_VM RAW
HYPERV_301 VHD_SPARSE
XENSERVER VHD_SPARSE

If there are no hypervisors in the datacenter, conversions are generated to enable deploys with all the loaded hypervisor plugins.

POST https://example.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates/{virtualmachinetemplate}/disks/{disk}/conversions

Roles : [ROLE_APPLIB_VIEW, ROLE_VAPP_CUSTOMISE_SETTINGS]

Accept : conversions

Error Codes

  • CONVERSION-8 - Cannot request a conversion of an empty disk.
  • VIMAGE-55 - The operation is not allowed because the template/disk does not physically exist in the repository

Example

List conversions of a disk


Get all the conversions of the given disk.

GET https://example.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates/{virtualmachinetemplate}/disks/{disk}/conversions

Roles : [ROLE_APPLIB_VIEW, ROLE_VDC_MANAGE_VAPP, ROLE_VAPP_CUSTOMISE_SETTINGS]

Parameter Type Default Value Description
hypervisor String Filter the request by compatibilty with the hypervisor type
state Enum : ENQUEUED, FINISHED, FAILED Filter the request by the state of the conversion

Accept : conversions

Error Codes

  • DISK-3 - Disk not found

Example

Create a conversion of a disk or restart failed


Requests a conversion of a disk. This method can also be used to retry a FAILED conversion. Send a V2V conversion to the conversion-manager remote service in order to obtain compatiblity with the desired DiskFormat for the current VM template.

PUT https://example.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates/{virtualmachinetemplate}/disks/{disk}/conversions/{conversion}

Roles : [ROLE_APPLIB_VIEW, ROLE_VAPP_CUSTOMISE_SETTINGS]

Content-Type : conversion Accept : acceptedrequest

Error Codes

  • CONVERSION-10 - Cannot request a conversion with the requested target disk format
  • CONVERSION-2 - The requested conversion already exists for the given virtual machine template and disk format
  • CONVERSION-3 - The requested conversion format is the same as the base format of the virtual machine template
  • CONVERSION-9 - Cannot request a conversion with the current source disk format
  • DISK-3 - Disk not found

Example

Get a conversion of a disk


Get the desired conversion for the given disk

GET https://example.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates/{virtualmachinetemplate}/disks/{disk}/conversions/{conversion}

Roles : [ROLE_APPLIB_VIEW, ROLE_VDC_MANAGE_VAPP, ROLE_VAPP_CUSTOMISE_SETTINGS]

Accept : conversion

Error Codes

  • CONVERSION-1 - The requested conversion does not exist
  • CONVERSION-3 - The requested conversion format is the same as the base format of the virtual machine template

Example

List tasks of a conversion


Displays the tasks related to the current disk conversion. Tasks are a set of jobs (conversion operations). Any of these tasks may still be in progress.

GET https://example.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates/{virtualmachinetemplate}/disks/{disk}/conversions/{conversion}/tasks

Roles : [ROLE_APPLIB_VIEW, ROLE_VDC_MANAGE_VAPP, ROLE_VAPP_CUSTOMISE_SETTINGS]

Accept : tasks

Error Codes

  • DISK-3 - Disk not found

Example

Get a task of a conversion


Displays a specific task on the disk conversion. Tasks are a set of jobs (conversion operations). Any of these tasks may still be in progress. Each task has a UUID.

GET https://example.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates/{virtualmachinetemplate}/disks/{disk}/conversions/{conversion}/tasks/{id}

Roles : [ROLE_APPLIB_VIEW, ROLE_VDC_MANAGE_VAPP, ROLE_VAPP_CUSTOMISE_SETTINGS]

Accept : task

Example