Resizing Virtual Machine Instance in Platform9 Managed OpenStack
You can resize a running virtual machine instance to modify the compute power, memory or disk size, by assigning a different flavor to the instance.
The workflow to resize an instance is as follows.
- Resize the instance with the following command.
- When the resize is complete, the instance status becomes VERIFY_RESIZE.
- After verifying that the instance has been resized as expected, run the following command to confirm this operation.
This sets the instance status to ACTIVE again.
If the resize fails or does not work as expected, you can revert the resize with the following command.
- The instance status becomes ACTIVE, irrespective of whether you accept the resize or revert the resize.
Instance resizing can be done in one of the following ways.
- The instance can be resized to the same host. The instance continues to run on the same host after resize.
- The instance is resized to a different host. The instance runs on the new host after resize.
Points to remember
Following are the points to remember while resizing an instance.
- You must always resize a VM instance to a different flavor.
- You cannot resize a VM instance that is already in the resized state.
- You cannot resize a VM instance to a non-zero disk flavor of a size that is lower than the current non-zero disk flavor of that instance.
- If you resize to the same host, but the host has no capacity for a new flavor, the instance continues in the active state without change in flavor.
- You can reduce the compute power, but you cannot reduce disk size of any instance, by using the instance resizing feature.
Resize Instance to Same Host
Resizing an instance to the same host can be achieved with the following steps.
- Create a host aggregate containing only the hypervisor host that you want to use to resize the instance. Add aggregate metadata to it.
- Assign this aggregate metadata to the new flavor you are going to create for resizing.
- Resize the instance using the following command.
Once the resize step has completed successfully, run the following command to make sure that the instance status has changed to 'VERIFY_RESIZE'.
Run the following command, to confirm this operation.
The above command sets the instance status to ACTIVE again.
Resize to Different Host
During the resize process, the node where the instance is currently running, uses SSH to connect to the new node where the resized instance would live, and copies the instance and associated files to the new node.
To allow resizing to a different host, OpenStack requires password-less login to be set up between the current host and new host.
If you want to set up password-less authentication to resize an instance to a different host, contact Platform9 support.