I have a AWS Lightsail VM with the following configuration
The main problem is the RAM which is not enough for my current work and facing out of memory issues.
I want to increase RAM to at least 2GB or more.
I already have number of softwares installed and necessary settings on my current machine.
Main point is, I don't want to go through the pain of reinstalling all the softwares again and doing the settings which is not easy process at all. I also have data available in the MongoDB docker instance.
What can be the best solution to migrate to a new VM with 2GB RAM, softwares + settings and data.
I used the following article to resolve my issue.
I didn't have to change anything and got the new upgraded Lightsail instance with all the software and settings which were there in my old VM. The services were also up and running. This is exactly what I was looking for.
Manual Steps
After assigning the new insance(VM) to the static IP, when you try to ssh the instance(VM) you may get this error.
WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
.
To resolve this use the following command
$ ssh-keygen -f "/home/<username>/.ssh/known_hosts" -R "static IP"
The above instruction will add a new host key entry in known_hosts
file.
Also, I have to manually allow ssh
port in the networking section.
Article: https://cloudconfusing.com/2019/11/22/upgrading-your-lightsail-instance/
Thanks to @Robert for his input as well.