- Newest
- Most votes
- Most comments
Hi Dub ,
I understand that your instance is getting an ‘instance reachability check failed’ error.Please correct me if I misunderstood.
The output you provided indicates that there is some issues with the cloud-init service as it has failed to run during the instance’s boot time.The solution is removing the cloud-init package that’s currently present and re-install cloud-init package again so that it is installed correctly.
You won’t be able to access the instance because of the failing status checks so you need to create a recovery instance.Firstly you will need to detach the root volume of the instance and attach it to the recovery instance, by following this link[1] and mount the volume to /mnt directory.Once it is mounted ,do the following :
# mount bind the pseudo filesystems like /proc , /sys and /dev and chroot to /mnt
$ sudo mount -o bind /proc /mnt/proc
$ sudo mount -o bind /dev /mnt/dev
$ sudo mount -o bind /sys /mnt/sys
$ sudo chroot /mnt
Next up you need to do a simple ping to check if the instance is reachable to the internet.Once that is done you must remove the current cloud-init package followed by re-installing a new cloud-init package following the commands below
# apt update
# apt remove cloud-init
# apt purge cloud-init -y
# apt install cloud-init -y
# rm -rf /var/lib/cloud/* — remove existing configurations corresponding to the cloud-init service
When you are done ,you need to exit the chroot then unmount the volume that you mounted at the beginning.You should then re-attach the volume from the recovery instance to the first instance.
You will then need to take an image from the fixed instance,Please follow link[2] and use the working AMI for your instances.
I hope this was helpful!
Reference
[1]https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html
Relevant content
- Accepted Answerasked 6 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 9 months ago