在softlayer中进行配置时,将两个或更多磁盘添加到虚拟服务器 使用休息查询
答案 0 :(得分:0)
您可以在订购时设置磁盘,请参阅有关
的文档http://sldn.softlayer.com/reference/services/SoftLayer_Virtual_Guest/createObject
基本上你必须在块设备部分配置它们:
{
"blockDevices": [
{
"device": "0",
"diskImage": {
"capacity": 100
}
}
{
"device": "2",
"diskImage": {
"capacity": 25
}
}
],
"localDiskFlag": true
}
然后,您可以在配置虚拟服务器后添加更多磁盘vi升级虚拟服务器。
要升级服务器,您需要使用此方法: http://sldn.softlayer.com/reference/services/SoftLayer_Product_Order/placeOrder
见这个例子:
POST https://api.softlayer.com/rest/v3.1/SoftLayer_Product_Order/placeOrder
body:
{
"parameters": [{
"virtualGuests": [{
"id": 49495232
}],
"prices": [{
"id": 2277,
"categories": [{
"categoryCode": "guest_disk1",
"complexType": "SoftLayer_Product_Item_Category"
}],
"complexType": "SoftLayer_Product_Item_Price"
},
{
"id": 2270,
"categories": [{
"categoryCode": "guest_disk2",
"complexType": "SoftLayer_Product_Item_Category"
}],
"complexType": "SoftLayer_Product_Item_Price"
}
],
"properties": [
{
"name": "NOTE_GENERAL",
"value": "adding disks"
},
{
"name": "MAINTENANCE_WINDOW",
"value": "2014-08-25T9:50:00-05:00"
}
],
"complexType": "SoftLayer_Container_Product_Order_Virtual_Guest_Upgrade"
}]
}
基本上你需要指定:
此致