Is it possible to create a hardware virtual machine (HVM) AMI from an existing paravirtual (PV) AMI.
My initially thought was to start a new PV instance and use the ec2-create-image
command to create a new image while specifying HVM as the virutalization type. However, ec2-create-image
does not have a command line parameter to specify the virtualization type.
Is there another way to go about doing this?
Best Answer
Update
AWS has enabled this feature in the EC2 API. It is available as the
--virtualization-type
option toaws ec2 register-image
in the new Boto based awscli.Original answer
Yes! Unfortunately, there is not a direct way to do so. Also, some PV instances may need kernel and bootloader modifications.
ec2-create-image
on the HVM instance.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.