AWS has enabled this feature in the EC2 API. It is available as the
--virtualization-type option to
aws ec2 register-image in the new Boto based awscli.
Yes! Unfortunately, there is not a direct way to do so. Also, some PV instances may need kernel and bootloader modifications.
- Create a volume from your existing PV AMI. If it was your own PV AMI, you can make a volume from the snapshot. If it is a 3rd party AMI, you will need to launch an instance and take a snapshot.
- Launch an HVM instance with any AMI.
- Stop that HVM instance.
- Detach the root volume from that instance.
- Attach the PV volume as the root volume(/dev/sda1 or /dev/sda if it was partitioned) to the HVM instance.
ec2-create-image on the HVM instance.
- Launch other instances with your new HVM AMI.
If that doesn't work, then before step 5, you will need to attach that volume to a running instance, set up a chroot, and install a kernel and bootloader for your distribution. You may also want to clear logs and any cloud-init cache.