Patrick Drost
Patrick Drost

Reputation: 1

Using SoftLayer API editObject to add disks to vm

I've created a softlayer VM using a custom image template. Through the UI I am able to change parameters such as memory and number of SAN disks. Through the SoftLayer API editObject endpoint I'm only able to change the hostname even though I've specified memory and disks.

Here is my curlpostupdate file:

    {
      "parameters":[
        {
          "hostname": "terraform-pat-test-update2",
          "maxMemory": 8192,
          "blockDevices": [
            {
              "device": "0",
              "diskImage": {
                "capacity": 100
              }
            },
            { 
                "device": "2", 
                "diskImage": { 
                    "capacity": 500
                } 
            }
          ]
        }
      ]
    }

And this is the command I am running:

curl -X POST --data @curlpostupdate https://<username>:<key>@api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/24570499/editObject

The response:

true⏎   

After I run the command and check in the UI I see nothing but the name has been changed.

Screenshot of device details

Screenshot of upgrade showing disks

Upvotes: 0

Views: 154

Answers (1)

To add disk to the VM the editObject does not work you need to use the placeOrder method see here the example How to add two or more disk to softlayer virtual server while provisioning

Regards

Upvotes: 0

Related Questions