供应时如何向软层虚拟服务器添加两个或更多磁盘 [英] How to add two or more disk to softlayer virtual server while provisioning

查看:51
本文介绍了供应时如何向软层虚拟服务器添加两个或更多磁盘的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在软层中进行配置时,将两个或多个磁盘添加到虚拟服务器 使用剩余查询

Add two or more disk to virtual server while provisioning in softlayer using rest query

推荐答案

您可以在订购时设置磁盘,请参阅有关文档

you can set the disk at order time, see the documentation about

http://sldn.softlayer.com/reference/services/SoftLayer_Virtual_Guest/createObject

基本上,您必须在块设备部分进行配置:

basically you have to configure them at the block devices section:

{ 
    "blockDevices": [ 
        { 
            "device": "0", 
            "diskImage": { 
                "capacity": 100 
            } 
        }
        { 
            "device": "2", 
            "diskImage": { 
                "capacity": 25 
            } 
        }
    ], 
    "localDiskFlag": true 
}

然后,在预配置虚拟服务器后,可以通过升级虚拟服务器添加更多磁盘.

Then you can add more disk after the Virtual server has been provisioned vi Upgrading the Virtual Server.

要升级服务器,您需要使用以下方法: http://sldn.softlayer.com/reference/services/SoftLayer_Product_Order/placeOrder

To upgrade the server you need to use this method: 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"
        }]
    }

基本上,您需要指定:

  1. 您要升级的VSI的ID
  2. 要添加的项目的价格,要获取价格列表,可以使用以下方法: http://sldn.softlayer.com/reference/services/SoftLayer_Virtual_Guest/getUpgradeItemPrices
  3. 您需要指定必须升级VSI的日期
  1. the ID of the VSI you want to upgrade
  2. The prices of the items you want to add, to get the list of prices you can use this method: http://sldn.softlayer.com/reference/services/SoftLayer_Virtual_Guest/getUpgradeItemPrices
  3. You need to specify the date when the VSI must be ugraded

致谢

这篇关于供应时如何向软层虚拟服务器添加两个或更多磁盘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆