Openstack: nova resize

Posted . Visible to the public.

To change RAM size, VDISK size or VCPU count of an openstack instance you have to use nova resize. You can't change for e.g. just the RAM size with a parameter, you have to assign a new/other flavor. If there is no suitable flavor for the new properties of the VM, create a new one.

nova resize [--poll] <server> <flavor>

The resize could take a while, after it is finished, the VM boots up with the new specifications. SSH into the VM and check if everything is alright. If so -> use nova resize-confirm <server> to get rid of the old VM image and keep the new one. If you run into any trouble you can use nova-resize-revert <server> to drop the new VM image and use the old one.

Please mind the following:

  • openstack will shutdown the VM before the resize, so you have to acknowledge a downtime
  • be careful if you resize a vdisk to a smaller value, as there is the risk of losing data
  • as openstack recreates the image with qemu-img convert, a resize can take a long time (depending on the size of the disk)
Claus-Theodor Riegg
Last edit
Claus-Theodor Riegg
License
Source code in this card is licensed under the MIT License.
Posted by Claus-Theodor Riegg to makandra dev (2015-07-31 08:33)