Migrate AWS PV to HVM Instance


As everyone knows AWS provides two type of virtualization. PV (para virtual) and HVM. Its easier to build custom PV based AMI and register it. But, how can you build a HVM based instance ? Unfortunately, AWS doesn't provides any direct methods for registering or building HVM based instance.( atleast at the time of writing this article.)

Here, I'll try to give you the quick steps involved in migrating your existing CentOS PV based AMI to HVM based AMI.

  1. Launch any HVM based centos.
  2. Create a volume snapshot from your PV based instance
  3. Attach the snapshot to the HVM
  4. Copy kernel and other boot files from HVM to PV snapshot volume
  5. Stop the instance
  6. Detach root disk from HVM
  7. Attach the PV snapshot to the instance as root device
  8. Launch the instance

Contact me if you need help.