Openstack instance resize

Short version for demo environment:

Change the following values in nova.conf:

allow_resize_to_same_host=true
resize_confirm_window=5

Then, restart nova: openstack-service restart nova

Long version for multi compute node environment:

Add a bash to your nova users on each host:

usermod -s /bin/bash nova

Allow SSH without password between all your hosts under the “nova” user:

cat << EOF > ~/.ssh/config
Host *
    StrictHostKeyChecking no
    UserKnownHostsFile=/dev/null
EOF

When your migration is failing, you can reset the state of a instance using the following command:

nova reset-state --active

More details about the second procedure on this blog:
http://funcptr.net/2014/09/29/openstack-resizing-of-instances/