资源中心/云资源池/镜像相关接口
POSTImage Operations起始版本 0.6同步需要认证
从根云盘创建根云盘镜像
从根云盘创建根云盘镜像
调试可用性
在线调试
使用当前认证信息和示例参数提交 Mock 请求。
请求参数
请求体字段
paramsObject必填请求体参数结构
nameString必填根云盘镜像名称
descriptionString根云盘镜像的详细描述
guestOsTypeString根云盘镜像对应客户机操作系统类型
backupStorageUuidsList镜像服务器UUID列表
rootVolumeUuidString必填根云盘UUID
platformString根云盘镜像对应的系统平台
systemboolean是否系统根云盘镜像
resourceUuidString根云盘镜像UUID。若指定,根云盘镜像会使用该字段值作为UUID。
architectureString可选。
virtioList可选。
systemTagsList系统标签
userTagsList用户标签
响应状态
请求地址
POST/zstack/v1/images/root-volume-templates/from/volumes/{rootVolumeUuid}
/zstack/v1/images/root-volume-templates/from/volumes/{rootVolumeUuid}
请求示例
curl -X POST 'http://{host}/zstack/v1/images/root-volume-templates/from/volumes/{rootVolumeUuid}' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"name":"<name>","description":"<description>","guestOsType":"<guestOsType>","backupStorageUuids":["<backupStorageUuids>"],"rootVolumeUuid":"<rootVolumeUuid>","platform":"<platform>","system":true,"resourceUuid":"<resourceUuid>","architecture":"<architecture>","virtio":["<virtio>"]},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'
响应示例
200{ "inventory": { "uuid": "fadea0efc22e3e6fa43f537f1af6ee6b", "name": "TinyLinux", "url": "http://192.168.1.20/share/images/tinylinux.qcow2", "mediaType": "RootVolumeTemplate", "platform": "Windows", "architecture": "x86_64", "format": "qcow2", "backupStorageRefs": [ { "id": 0, "imageUuid": "fadea0efc22e3e6fa43f537f1af6ee6b", "backupStorageUuid": "b94ff32725d133fea53e8ada5ea7f0fc", "installPath": "ceph://zs-images/f0b149e053b34c7eb7fe694b182ebffd", "status": "Ready" } ] } }变更历史
此 API 暂无变更历史记录。
