Resize VS
To resize a VS:
POST /virtual_machines/:virtual_machine_id/resize.xml
POST /virtual_machines/:virtual_machine_id/resize.json
XML Request example
curl -i -X POST -H 'Accept: application/xml' -H 'Content-type: application/xml' -u user:userpass -d '<?xml version="1.0" encoding="UTF-8"?><virtual_machine><memory>512</memory><cpus>2</cpus><cpu_shares>30</cpu_shares><allow_cold_resize>1</allow_cold_resize></virtual_machine>' --url http://cloud.neen.it/virtual_machines/:virtual_machine_id/resize.xml
JSON Request example
curl -i -X POST -H 'Accept: application/json' -H 'Content-type: application/json' -u user:userpass -d '{"virtual_machine":{"memory":"512","cpus":"2","cpu_shares":"30","allow_cold_resize":"1"}}' --url http://cloud.neen.it/virtual_machines/:virtual_machine_id/resize.json
You can change the following parameters:
- memory - the amount of RAM allocated to your VS in MB
- cpus - the number of CPUs
- cpu_shares - CPU priority in %
- allow_cold_resize - set 1 to switch to cold resize when hot resize failed
- You can also resize a VS using the PUT method (see Edit VS section).