Closed gnoffer closed 4 months ago
here is some logging with debug=1
null.example1 (amazon-import): Setting license type to 'BYOL'
2024/02/07 15:13:48 packer-plugin-amazon_v1.3.0_x5.0_linux_amd64 plugin: 2024/02/07 15:13:48 Calling EC2 to import from s3://ova-deploy-tz/packer-import-1707318800.ova
null.example1 (amazon-import): Started import of s3://ova-deploy-tz/packer-import-1707318800.ova, task id import-ami-09d54c3a601f5967b
null.example1 (amazon-import): Waiting for task import-ami-09d54c3a601f5967b to complete (may take a while)
2024/02/07 15:13:54 packer-plugin-amazon_v1.3.0_x5.0_linux_amd64 plugin: 2024/02/07 15:13:54 error: Import task import-ami-09d54c3a601f5967b failed with status message: ClientError: Disk validation failed [Unsupported OVA format], error: ResourceNotReady: failed waiting for successful resource state
2024/02/07 15:13:54 [INFO] (telemetry) ending amazon-import
* Post-processor failed: Import task import-ami-09d54c3a601f5967b failed with status message: ClientError: Disk validation failed [Unsupported OVA format], error: ResourceNotReady: failed waiting for successful resource state
==> Wait completed after 34 seconds 705 milliseconds
2024/02/07 15:13:54 machine readable: error-count []string{"1"}
==> Some builds didn't complete successfully and had errors:
2024/02/07 15:13:54 machine readable: null.example1,error []string{"1 error(s) occurred:\n\n* Post-processor failed: Import task import-ami-09d54c3a601f5967b failed with status message: ClientError: Disk validation failed [Unsupported OVA format], error: ResourceNotReady: failed waiting for successful resource state"}
* Post-processor failed: Import task import-ami-09d54c3a601f5967b failed with status message: ClientError: Disk validation failed [Unsupported OVA format], error: ResourceNotReady: failed waiting for successful resource state
==> Builds finished but no artifacts were created.
Build 'null.example1' errored after 34 seconds 705 milliseconds: 1 error(s) occurred:
2024/02/07 15:13:54 [INFO] (telemetry) Finalizing.
* Post-processor failed: Import task import-ami-09d54c3a601f5967b failed with status message: ClientError: Disk validation failed [Unsupported OVA format], error: ResourceNotReady: failed waiting for successful resource state
for me it iooks like a corrupt ovf/ova ... ?!
anything i do, fails: 1) s3 upload ova generated by packer with rhel8 and lvm, and exported by packer-amazon-plugin to ovf+convert to ova via ovftool or direct export via ofvtool to ova 2) s3 upload a manually installed rhel8 vm without lvm and exported via ovftool directly to ova
both fails to import to aws (by packer-amazon-plugin or also manually via aws-gui).
so there might be some incompatibility between vsphere and aws which isnt documented, yet ?! anyone having same issue or an idea to solve it ?
reimport a ova (exported via ovftool) to vcenter(7.0.3) via gui is no problem. so OVA should be OK. switching over to vmdk import is also not possible
i have it: kms key had no permission in my IAM Policy for vmimport.
Overview of the Issue
via packer, i am trying to build a rhel8 vm on vsphere, export to ovf, convert to ova with ovftool from vmware, upload to s3 and create an ami out of it.
Plugin and Packer version
packer-version: 1.10.1 vsphere plugin: 1.2.4 amazon plugin: 1.3.0
Simplified Packer Buildfile
Operating system and Environment details
latest RHEL 8
Log Fragments and crash.log files