So couple of days back, I took a snapshot of volume that was attached to an EC2 instance running ubuntu 16.04 LTS for backup purposes.
It so happened that I needed to restore that instance using that snapshot and therefore, I used that volume snapshot, created AMI out of it and launched the instance. However, the instance failed status checks and in the system log, I could see error messages indicating ‘kernel panic’.
After thinking about it, it clicked in my mind: when I was creating AMI out of my volume’s snapshot, I picked the virtualization type and I had selected the default dropdown value of ‘paravirtual’. However, the AMI I had selected from the AWS Marketplace indicated that the ubuntu 16.04 LTS image I used was of type ‘hvm’ virtualization.
Therefore, I recreated another AMI out of my snapshot and this time, I selected ‘hvm’ as the virtualization type and then launched my EC2 instance and success!
I then did some research online and turns out, others had also ran into same issue due to mistake made in selecting incorrect virtualization type!
Here is a good explanation of Hardware virtual machine (HVM) and ParaVirtual (PV) from AWS: