You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
The text was updated successfully, but these errors were encountered:
I'm attempting to build a slew of slightly different Amazon Linux images locally with qemu, and then trying to import them with amazon-import, and similar to what's mentioned here, it's complaining with...
==> Some builds didn't complete successfully and had errors:
--> alpine.qemu.edge-aarch64-uefi-tiny-aws: 1 error(s) occurred:
* Post-processor failed: Import task import-ami-01c8ff48cc465f998 failed with status message: ClientError: Unsupported kernel version virt, error: ResourceNotReady: failed waiting for successful resource state
--> alpine.qemu.edge-x86_64-bios-tiny-aws: 1 error(s) occurred:
* Post-processor failed: Import task import-ami-0116dd9338d501277 failed with status message: ClientError: Unknown OS / Missing OS files., error: ResourceNotReady: failed waiting for successful resource state
==> Builds finished but no artifacts were created.
The local disk images are raw format. Difference between the first and second builds above is that aarch64 partitions the disk (GPT/FAT32 for EFI, ext4 for root, using GRUB EFI), and x86_64 formats the whole disk as ext4 instead of partitioning, and uses extlinux as the bootloader.
I've yet to try the above s3 -> import-snapshot -> register-ami process manually, but having this officially supported by a Packer post processor would be very handy...
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).
The text was updated successfully, but these errors were encountered: