问题
I have an Amazon EC2 micro instance (t1.micro). I want to upgrade this instance to large. This is our production environment, so what is the best and risk-free way to do this?
Is there any step by step guide to do this?
回答1:
From my experience, the way I do it is create a snapshot of your current image, then once its done you'll see it as an option when launching new instances. Simply launch it as a large instance at that point.
This is my approach if I do not want any downtime(i.e. production server) because this solution only takes a server offline only after the new one is up and running(I also use it to add new machines to my clusters by using this approach to only add new machines). If Downtime is acceptable then see Marcel Castilho's answer.
回答2:
Using AWS Management Console:
- Right-Click on the instance
- Instance Lifecycle > Stop
- Wait...
- Instance Management > Change Instance Type
回答3:
Using the AWS Management Console
- Go to "Volumes" and create a Snapshot of your instance's volume.
- Go to "Snapshots" and select "Create Image from Snapshot".
- Go to "AMIs" and select "Launch Instance" and choose your "Instance Type" etc.
回答4:
Use the AWS EC2 console, not ElasticFox.
First Way:
- Create a new AMI of the instance
- Launch it
Alternative Way:
- Make a snapshot of the disk
- Launch a large EBS instance with the same AMI type (please note that at this point the disk will contain the data that was present when this AMI was created, not your latest changes)
- Once is fully booted, stop the new instance
- Detach the root volume from the stopped instance
- Create a virtual disk from the snapshot created before in the same availability zone of the new instance
- Attach the root volume to /dev/sda1
- Start the new instance again
回答5:
Create AMI -> Boot AMI on large instance.
More info http://docs.amazonwebservices.com/AmazonEC2/gsg/2006-06-26/creating-an-image.html
You can do this all from the admin console too at aws.amazon.com
来源:https://stackoverflow.com/questions/5898308/how-to-safely-upgrade-an-amazon-ec2-instance-from-t1-micro-to-large