Edit Virtual Server Max Memory

The request is available for the following KVM-based virtual servers:

  • Virtual servers from KVM compute zones with the Ballooning release resource type and the Set max memory option enabled
  • Virtual servers that are built on templates that support Hot Resize

The edit a VS max memory limit, use the following request: 

PUT /virtual_machines/:virtual_machine_id/max_memory.xml
PUT /virtual_machines/:virtual_machine_id/max_memory.json 

XML Request Example

curl -i -X PUT -H 'Accept: application/xml' -H 'Content-type: application/xml' -u user:userpass --url http://onapp.test/virtual_machines/12/max_memory.xml -d'<virtual_machine><max_memory_override type="boolean">true</max_memory_override><preset_max_memory type="integer">200</preset_max_memory></virtual_machine>'

JSON Request Example

curl -i -X PUT -H 'Accept: application/json' -H 'Content-type: application/json' -u user:userpass --url http://onapp.test/virtual_machines/12/max_memory.json -d'{"virtual_machine":{"max_memory_override":true,"preset_max_memory":200}}'


max_memory_override - true to enable the max memory limit, otherwise, false 

preset_max_memory - the maximum amount of RAM in MB allocated to the VS