You would have read our earlier posts on Openstack installation and its various configuration setup’s and solutions to installation errors. Here’s another one on this topic. On excitement, I created an Instance with a flavor of m1.small and started installing many packages. Later I realized that the flavor I have selected is not sufficient for my activities. So I tried to resize instance, but instance remains in the same flavor without any error after giving “resize” command. After a thorough debugging found that the system is not allowed to resize the instance by default. We need to perform few actions to make it work.
How to resize instance in OpenStack?
Firstly, you need to instruct nova to allow the resize of the instance both at Controller and Compute nodes. Follow the below actions:
1. With your favorite editor open the “nova.conf” file on controller node: (/etc/nova/nova.conf) and add the below lines:
allow_resize_to_same_host = True allow_migrate_to_same_host = True scheduler_default_filters = AllHostsFilter
2. Restart all the nova related services like: nova-api, nova-conductor, nova-consoleauth, nova-novncproxy, nova-scheduler as shown below:
3. Repeat step 1 on the compute node also.
4. Restart all the nova related services like nova-compute as shown below:
Now you can re-size and it works !