packer-plugin-amazon icon indicating copy to clipboard operation
packer-plugin-amazon copied to clipboard

Add root_device_name to amazon-import

Open N3WWN opened this issue 3 years ago • 0 comments

I did not find this feature discussed for amazon-import, but I do see it for other parts of the amazon plugin (the chroot builder, for instance). It may be possible to do this with an existing feature, but I have not been able to figure that out.

Description

Please add the equivalent of root_device_name to the amazon-import post-processor.

Use Case(s)

This configuration item is necessary for multi-partition images that are built with other packer builders where the root partition is not /dev/sda1.

Potential configuration

      ,{
        "type": "amazon-import",
        "profile": "serviceAccount",
        "region": "us-east-1",
        "s3_bucket_name": "{{user `s3bucket`}}",
        "s3_key_name": "{{user `template`}}-disk001{{user `suffix`}}.vmdk",
        "license_type": "BYOL",
        "tags": {
          "Name": "{{user `template`}}",
          "Description": "packer amazon-import {{user `template`}} @ {{timestamp}}"
        },
        "format": "vmdk",
        "architecture": "x86_64",
        "boot_mode": "uefi",
        "root_device_name": "/dev/sda2",
        "ami_name": "{{user `template`}}"
      }

N3WWN avatar Jun 15 '22 16:06 N3WWN