我在IDC中有一个VM,并且我已经将这个VM捕获为我的自定义image_A。现在我想将image_A复制到IDC。
发布于 2016-09-06 17:52:45
若要跨数据中心复制图像:
您可以使用:
这里有一个使用REST的示例:
https://$user:$apiKey@api.softlayer.com/rest/v3.1/SoftLayer_Virtual_Guest_Block_Device_Template_Group/$templateGroupId/addLocations
Method: Post
{
"parameters":[
[
{
"id":1441195
}
]
]
}用您自己的信息替换:$user,$apiKey, (image)。1441195指的是达拉斯10数据中心的标识符(您需要用数据中心的id替换它,您希望在其中复制图像)。
要查看自己的块设备模板组(图像):
https://$user:$apiKey@api.softlayer.com/rest/v3.1/SoftLayer_Account/getPrivateBlockDeviceTemplateGroups
Method: Get方法: 账号:getPrivateBlockDeviceTemplateGroups
要从数据中心检索信息,请执行以下操作:
https://$user:$apiKey@api.softlayer.com/rest/v3.1/SoftLayer_Location/getDatacenters
Method: Get方法: 位置:getDatacenter
更新的
检索包含图像副本的位置
试试这个:
https://$user:$apiKey@api.softlayer.com/rest/v3.1/SoftLayer_Virtual_Guest_Block_Device_Template_Group/$templateGroupId/getDatacenters
Method: Get方法: 组:getDatacenter
https://stackoverflow.com/questions/39326006
复制相似问题