This API is used to export the system disk data or data disk data as an IMS image. The exported image will be displayed in the IMS private image list and can be viewed and used.
If the target disk is in the in-use state, stop the server where the disk has been attached before calling this API. If the target disk is a shared disk, stop all servers where the shared disk has been attached before calling this API.
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
os-volume_upload_image |
Object |
Yes |
Specifies the operation to export the disk data as an image. For details, see Parameters in the os-volume_upload_image field. |
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
disk_format |
String |
No |
Specifies the format of the exported image. The value can be vhd, zvhd, zvhd2, raw, or qcow2. The default value is zvhd2. |
image_name |
String |
Yes |
Specifies the name of the exported image.
|
force |
Boolean |
No |
Specifies whether to forcibly export the image. The default value is false.
|
container_format |
String |
No |
Specifies the container type of the exported image. The value can be ami, ari, aki, ovf, or bare. The default value is bare. |
__os_type |
String |
No |
Specifies the OS type of the exported image. Currently, only windows and linux are supported. The default value is linux. NOTE:
|
{ "os-volume_upload_image": { "image_name": "sxmatch2", "force": true, "container_format": "bare", "disk_format": "vhd", "__os_type": "linux" } }
Parameter |
Type |
Description |
---|---|---|
os-volume_upload_image |
Object |
Specifies the operation to export the disk data as an image. For details, see Parameters in the os-volume_upload_image field. |
error |
Object |
Specifies the error message returned when an error occurs. For details, see Parameters in the error field. |
Parameter |
Type |
Description |
---|---|---|
status |
String |
Specifies the disk status after the image is exported. The correct value is uploading. |
image_id |
String |
Specifies the ID of the exported image. |
image_name |
String |
Specifies the name of the exported image. |
volume_type |
Object |
Specifies the disk type information. For details, see Parameters in the volume_type field. |
container_format |
String |
Specifies the container type of the exported image. The value can be ami, ari, aki, ovf, or bare. The default value is bare. |
size |
Integer |
Specifies the disk size, in GB. |
disk_format |
String |
Specifies the format of the exported image. The value can be vhd, zvhd, zvhd2, raw, or qcow2. The default value is vhd. |
id |
String |
Specifies the disk ID. |
display_description |
String |
Specifies the disk description. |
updated_at |
String |
Specifies the time when the disk was updated. Time format: UTC YYYY-MM-DDTHH:MM:SS.XXXXXX |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Specifies the ID of the disk type. |
name |
String |
Specifies the name of the disk type. |
deleted |
Boolean |
Specifies whether to delete the disk type. |
is_public |
Boolean |
Reserved field |
extra_spec |
Object |
Specifies the disk type specifications. For details, see Parameters in the extra_specs field. |
description |
Integer |
Specifies the description of the disk type. |
created_at |
String |
Specifies the time when the disk type was created. Time format: UTC YYYY-MM-DDTHH:MM:SS.XXXXXX |
updated_at |
String |
Specifies the time when the disk type was updated. Time format: UTC YYYY-MM-DDTHH:MM:SS.XXXXXX |
deleted_at |
String |
Specifies the time when the disk type was deleted. Time format: UTC YYYY-MM-DDTHH:MM:SS.XXXXXX |
Parameter |
Type |
Description |
---|---|---|
volume_backend_name |
String |
Reserved field |
availability-zone |
String |
Reserved field |
HW:availability_zone |
String |
Reserved field |
RESKEY:availability_zones |
String |
Specifies the AZs that support the current disk type. |
Parameter |
Type |
Description |
---|---|---|
message |
String |
Specifies the error message returned when an error occurs. |
code |
String |
Specifies the error code returned when an error occurs. For details about the error code, see Error Codes. |
{ "os-volume_upload_image": { "status": "uploading", "size": 40, "id": "16369c5d-384d-4e64-b37a-56d898769362", "image_id": "c5333daa-fbc8-4d1d-bf79-b0567bb45d15", "image_name": "evs-ims-test1027", "volume_type": { "description": "None", "deleted": false, "created_at": "2015-05-24T14:47:22.132268", "updated_at": "2017-07-29T11:29:33.730076", "extra_specs": { "volume_backend_name": "<or> iaas blockstorage_SATA <or> iaas blockstorage_SAS <or> iaas blockstoragesata", "XX:availability_zone": "az-dc-1" }, "is_public": true, "deleted_at": null, "id": "8247b6ed-37f0-4c48-8ef1-f0027fb332bc", "name": "SATA" }, "container_format": "bare", "disk_format": "vhd", "display_description": "", "updated_at": "2018-01-11T01:50:25.800931" } }
{ "error": { "message": "XXXX", "code": "XXX" } }
{ "itemNotFound": { "message": "XXXX", "code": "XXX" } }
For details, see Error Codes.