Reputation: 352
I had a dedicated instance Computing Instance with 2G guest_core and wanted to update as 4G. This scenario has been tested and verified on public instances. I got price id from package 46 and this error message was: Invalid price 4 x 2.0 GHz or higher Cores (Dedicated Host) (200315) provided on the order container. Please select a dedicated instance Computing Instance price to order a dedicated instance
[Integration:softlayerGo] 2018/08/20 14:04:10 [DEBUG] Request URL: POST https://api.softlayer.com/rest/v3.1/SoftLayer_Product_Order/placeOrder.json
[Integration:softlayerGo] 2018/08/20 14:04:10 [DEBUG] Parameters: {"parameters":[{"complexType":"SoftLayer_Container_Product_Order_Virtual_Guest_Upgrade","packageId":46,"prices":[{"id":200315},{"id":200339}],"properties":[{"name":"MAINTENANCE_WINDOW","value":"2018-08-20T06:04:10Z"},{"name":"NOTE_GENERAL","value":"Upgrade instance configuration."}],"virtualGuests":[{"id":60076795}]},false]}
[Integration:softlayerGo] 2018/08/20 14:04:12 [DEBUG] Status Code: 500
[Integration:softlayerGo] 2018/08/20 14:04:12 [DEBUG] Response: {"error":"Invalid price 4 x 2.0 GHz or higher Cores (Dedicated Host) (200315) provided on the order container. Please select a dedicated instance Computing Instance price to order a dedicated instance.","code":"SoftLayer_Exception_Order_Item_Invalid"}
And this package could be used to assign guest_disk1 and could not find another valid package.
And I found some people suggested a host id when placing the order: getting error while creating dedicated vsi from softlayer slcli
But my instance was auto assigned, so I could not find a host ID.
Upvotes: 0
Views: 89
Reputation: 728
The error that you go is because you are using ¨Dedicated Host¨ item prices, but you have to find just ¨Dedicated¨ items prices the same that the following item example:
¨4 x 2.0 GHz or higher Cores (Dedicated)¨
Do not forget that the item prices have to be in the same location as your dedicated instance.
The dedicated instance created by auto assigned does not have ¨hostId¨ because it was auto assigned to a datacenter available and not to a dedicated host.
Try to upgrade your instance with the following items prices:
"prices":[
{
"id" : 24886 // "4 x 2.0 GHz or higher Cores (Dedicated)"
},
{ "id" : 32597 // "1 GB"
}
]
You can find the ¨ guest_disk1 ¨ in the same package, try searching e.g. by the "keyName": "GUEST_DISK_25_GB_SAN" depending on the disk size you want.
With the following rest api you can get the item prices available for your dedicated instance with their respective locations:
Method: POST
https://[username]:[apiKey]@api.softlayer.com/rest/v3.1/SoftLayer_Virtual_Guest/[virtualGuestId]/getUpgradeItemPrices
Body: Json
{
"parameters": [
false
]
}
If you want to include the the downgrade item prices you just have to change the data ¨false¨ to true in the json body.
The item prices that do not have locations are standard, it means that all location are available for that items.
Reference: https://softlayer.github.io/reference/services/SoftLayer_Virtual_Guest/getUpgradeItemPrices/
Upvotes: 1