I am trying to migrate a VSI from SAN to Local disk using the SoftLayer API. I originally tried using the editObject
method with the SoftLayer_Virtual_Guest
service and although the command returned true
no transaction was started and the VSI is still using SAN storage. REST or Python examples would be most appreciated.
Using the Chrome Dev tools and migrating the VSI via the Portal shows placeOrder being called (Request URL:https://control.softlayer.com/sales/productorder/placeorder) but it does not appear that placeOrder will accept a VSI ID.
That's right, you should use placeOrder method and you need to specify the VSI in "virtualGuests" property, below an example
https://$user:$apiKey@api.softlayer.com/rest/v3/SoftLayer_Product_Order/verifyOrder
Method: Post
{
"parameters":[
{
"complexType":"SoftLayer_Container_Product_Order_Virtual_Guest_Upgrade",
"packageId":46,
"prices":[
{
"id":13899,
"categories":[
{
"categoryCode":"guest_disk0",
"id":81,
"name":"First Disk"
}
]
}
],
"properties":[
{
"name":"MAINTENANCE_WINDOW",
"value":"2016-11-04T18:51:37.165Z"
}
],
"virtualGuests":[
{
"id":25011999
}
]
}
]
}
Replace: $user, $apiKey, 25011999 (vsiId) and 13899 (The priceId from the new disk, in this case the local disk price to migrate) with your own information.
To get upgrade item prices from your vsi, try the following request:
https://$user:$apiKey@api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/25011999/getUpgradeItemPrices
Method: Get
Replace: $user, $apiKey and 25011999 with your own information
References: