Before modifying the specifications (flavor) of your virtual machine, ensure to back up the data to a volume.
Solutions:
If the virtual machine you want to modify was created from a bootable volume:
- The VM created from a bootable volume can be deleted without losing its data since the data is stored on the volume. Subsequently, you can create a new virtual machine from the existing bootable volume by specifying the volume's name in the volume_name field during VM creation or the Hyperstack UI. This allows the new VM to access the saved data on the volume and use its operating system, offering a way to change the VM's specifications without losing its data. Note that a bootable volume can only be attached to a single virtual machine at a time due to the limited support for parallel access to a single disk by most operating systems and file systems.
If the virtual machine was NOT created from a bootable volume:
-
Create a new bootable volume. See instructions on how to create a new bootable volume.
-
The new bootable volume must be attached to the virtual machine containing the custom data you wish to save. See volume attachment details.
-
Once the bootable volume is attached and the data is tranfered, the VM can be deleted as the data is stored on the volume.
-
Create a new VM with your desired specifications (flavor) from the bootable volume that contains the saved custom data.
References: