Recover EC2 classic instance

0

Hello,

I want to recover my data from my EC2 classic instance which is in a stopped state (data in /dev/sda1; Root device type EBS)

When I try to start it I get the error:

"Failed to start the instance <instance_id> You can't start a stopped instance in EC2-Classic. Instead, you must launch a new instance in a virtual private cloud (VPC)."

I understand EC2 classic instances were discontinued a long time ago. Is there any way for me to start/migrate my instance and recover my data. I have created a default VPC but cannot figure out how to proceed.

I also tried using the AWSSupport-MigrateEC2ClassicToVPC but it fails at the HVM check (my instance is paravirtualized):

Step 3: checkIfVirtualizationTypeIsHVM ... Step fails ...Property value 'paravirtual' from the API output is not in the desired values. Desired values: ['hvm']

Also, I cannot use the AWS Application Migration Service since my instance is in a stopped state.

Links tried unsucessfully:

https://aws.amazon.com/blogs/aws/ec2-classic-is-retiring-heres-how-to-prepare/

https://repost.aws/questions/QUhJAsEPSkRt2yX23yG6pm-A/recover-an-ec2-classic-instance

Can anyone please help?

Thanks!

sahil
asked 5 months ago292 views
4 Answers
1

A couple of options to try. Snapshot and restore the instance as a new version of ec2.

Create a new ec2 and attach the volume to the new ec2 and copy the data off.

These are the 2 approaches I’d look at.

profile picture
EXPERT
answered 5 months ago
profile picture
EXPERT
Steve_M
reviewed 5 months ago
  • Thank you Gary for your response! However, I couldn't get them to work :(

    1. I don't see a snapshot option on my stopped instance.

    2. I don't see any volume entry under "Elastic Block Store > Volumes" or in the instance's "Block devices" field

0

Thank you Gary for your response! However, I couldn't get them to work :(

  1. I don't see a snapshot option on my stopped instance.

  2. I don't see any volume entry under "Elastic Block Store > Volumes" or in the instance's "Block devices" field

sahil
answered 5 months ago
0

I need to preface my answer by saying I've never done any of this myself, but this knowledge document appears to cover much of the ground that your question is asking https://repost.aws/knowledge-center/ssm-migrate-ec2classic-vpc

If that doesn't work for you, what about creating an AMI from the stopped EC2 Classic instance, and then from this provisioning a new EC2 in a VPC?

Or spin up a fresh EC2 with a plain new AMI and mount the volumes from the EC2 Classic instance onto it. This may not be possible right away if the volumes on the EC2 Classic are outside of the VPC that the new instance will be in, so in that case try snapshotting the EC2 Classic's volumes, and then creating new volumes from those snapshots https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-creating-volume.html#ebs-create-volume-from-snapshot

profile picture
EXPERT
Steve_M
answered 5 months ago
profile picture
EXPERT
reviewed 5 months ago
0

Thanks Steve for your response!

The first link leads to the AWSSupport-MigrateEC2ClassicToVPC solution which as I mentioned doesn't work in my case.

As for your second solution, I can't mount the volumes from the EC2 Classic instance onto a new instance because I don't see any volume entry under "Elastic Block Store > Volumes" or in the instance's "Block devices" field

I tired the create image option but got the error:

Instance does not have a volume attached at root (/dev/sda1)

Thanks for the options, will try some more

sahil
answered 5 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions