This issue was originally opened by @Roxyrob as hashicorp/packer#9582. It was migrated here as a result of the Packer plugin split. The original body of the issue is below.
Feature Description
amazon-import supporting "import-snapshot" (ami import passing through snapshot.).
Use Case(s)
I know support from vendor is important, this case can be an exception. AWS is not declaring support for kernel version present in many new OS (CentOS 8, Fedora 31, ...) and stop vmimport task on ami import stage with error: " Unable to determine kernel version" (see hashicorp/packer#8302 from where we start to search for a solution/workaround).
AWS does not stop however import task as snapshot (instead ami directly). We succesfully reach a working CentOS8 custom AMI manually starting from an virtualbox ova e.g created with packer virtualbox-iso
- extracting VMDK inside ova (tar -xvf packer-centos8min-x86_64.ova)
- uploading vmdk (aws s3 cp ...)
- importing VMDK to aws as "snapshot" (aws ec2 import-snapshot...)
- Creating AMI from snapshot (aws ec2 register-image...)
ova was made using packer provisioned to set right iniramfs with needed modules to allow root device discovery on boot stages for xen-base es2 instances (xen-blkfront), nitro-based ec2 instances (nvme, ena).
It would be nice if amazon-import can support import-snapshot (using VMDK in ova) automating all image creation steps useful to make custom image of new OS release (when kernel version is not yet supported by AWS as often it is a long time lack).
This issue was originally opened by @Roxyrob as hashicorp/packer#9582. It was migrated here as a result of the Packer plugin split. The original body of the issue is below.
Feature Description
amazon-import supporting "import-snapshot" (ami import passing through snapshot.).
Use Case(s)
I know support from vendor is important, this case can be an exception. AWS is not declaring support for kernel version present in many new OS (CentOS 8, Fedora 31, ...) and stop vmimport task on ami import stage with error: " Unable to determine kernel version" (see hashicorp/packer#8302 from where we start to search for a solution/workaround).
AWS does not stop however import task as snapshot (instead ami directly). We succesfully reach a working CentOS8 custom AMI manually starting from an virtualbox ova e.g created with packer virtualbox-iso
ova was made using packer provisioned to set right iniramfs with needed modules to allow root device discovery on boot stages for xen-base es2 instances (xen-blkfront), nitro-based ec2 instances (nvme, ena).
It would be nice if amazon-import can support import-snapshot (using VMDK in ova) automating all image creation steps useful to make custom image of new OS release (when kernel version is not yet supported by AWS as often it is a long time lack).