Resize VS
(Creata pagina con 'To resize a VS: POST /virtual_machines/:virtual_machine_id/resize.xml<br>POST /virtual_machines/:virtual_machine_id/resize.json XML Request example curl -i -X POST -H 'Accept...') |
|||
Riga 1: | Riga 1: | ||
− | To resize a VS: | + | To resize a VS: |
POST /virtual_machines/:virtual_machine_id/resize.xml<br>POST /virtual_machines/:virtual_machine_id/resize.json | POST /virtual_machines/:virtual_machine_id/resize.xml<br>POST /virtual_machines/:virtual_machine_id/resize.json | ||
− | XML Request example | + | '''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:// | + | 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 |
− | <br>JSON Request example | + | <br>'''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:// | + | 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 <br> |
− | You can change the following parameters: | + | You can change the following parameters: |
− | memory - the amount of RAM allocated to your VS in MB | + | *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). | ||
− | + | <br><br> | |
− | + | [[Category:Neencloud]] | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + |
Versione attuale delle 17:12, 20 feb 2014
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).