VM migrates to another host during VM resize even though
allow_resize_to_same_host=true is set in the nova configuration file.
- Platform9 Managed OpenStack - v4.0 and Higher
The config parameter
allow_resize_to_same_host=true set in /etc/nova/nova.conf on the Management Plane does not guarantee that the VM will be resized on the same host. If the scheduler selects a different host as a destination based on the calculation of the load then the instance will be moved out to a different host at the time of resizing.
The workaround is to create a host aggregate containing only the source hypervisor host to resize the instance. Detailed steps are available in the article Resize Instance to the Same Host.
You can refer to the article Resize and cold migrate for more details.