Could you also provide the preseed and at least relevant scripts.

On Mon, Sep 17, 2018, 18:10 Giovanni Vigna <[email protected]> wrote:

> Here is the file that I am using...
>
> {
>   "variables": {
>     "aws_access_key": "{{env `AWS_ACCESS_KEY`}}",
>     "aws_secret_key": "{{env `AWS_SECRET_KEY`}}",
>     "aws_region": "{{env `AWS_REGION`}}",
>     "aws_bucket": "{{env `AWS_BUCKET`}}"
>   },
>   "provisioners": [
>     {
>       "type": "shell",
>       "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash
> '{{.Path}}'",
>       "script": "scripts/ansible.sh"
>     },
>     {
>       "type": "shell",
>       "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash
> '{{.Path}}'",
>       "script": "scripts/setup.sh"
>     },
>     {
>       "type": "ansible-local",
>       "playbook_file": "ansible/main.yml",
>       "galaxy_file": "requirements.yml"
>     },
>     {
>       "type": "shell",
>       "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash
> '{{.Path}}'",
>       "script": "scripts/cleanup.sh"
>     }
>   ],
>   "builders": [
>     {
>       "type": "virtualbox-iso",
>       "output_directory": "builds",
>       "format": "ova",
>       "boot_command": [
>         "<esc><wait>",
>         "<esc><wait>",
>         "<enter><wait>",
>         "/install/vmlinuz<wait>",
>         " auto<wait>",
>         " console-setup/ask_detect=false<wait>",
>         " console-setup/layoutcode=us<wait>",
>         " console-setup/modelcode=pc105<wait>",
>         " debconf/frontend=noninteractive<wait>",
>         " debian-installer=en_US<wait>",
>         " fb=false<wait>",
>         " initrd=/install/initrd.gz<wait>",
>         " kbd-chooser/method=us<wait>",
>         " keyboard-configuration/layout=USA<wait>",
>         " keyboard-configuration/variant=USA<wait>",
>         " locale=en_US<wait>",
>         " netcfg/get_domain=vm<wait>",
>         " netcfg/get_hostname=vagrant<wait>",
>         " grub-installer/bootdev=/dev/sda<wait>",
>         " noapic<wait>",
>         " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort
> }}/preseed.cfg<wait>",
>         " -- <wait>",
>         "<enter><wait>"
>       ],
>       "boot_wait": "10s",
>       "disk_size": 81920,
>       "guest_os_type": "Ubuntu_64",
>       "headless": false,
>       "http_directory": "http",
>       "iso_urls": [
>         "../iso/ubuntu-18.04.1-server-amd64.iso",
>         "
> http://cdimage.ubuntu.com/ubuntu/releases/bionic/release/ubuntu-18.04.1-server-amd64.iso
> "
>       ],
>       "iso_checksum_type": "sha256",
>       "iso_checksum":
> "a5b0ea5918f850124f3d72ef4b85bda82f0fcd02ec721be19c1a6952791c8ee8",
>       "ssh_username": "vagrant",
>       "ssh_password": "vagrant",
>       "ssh_port": 22,
>       "ssh_wait_timeout": "10000s",
>       "shutdown_command": "echo 'vagrant'|sudo -S shutdown -P now",
>       "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso",
>       "virtualbox_version_file": ".vbox_version",
>       "vm_name": "packer-ubuntu-18.04-amd64",
>       "vboxmanage": [
>         [
>           "modifyvm",
>           "{{.Name}}",
>           "--memory",
>           "1024"
>         ],
>         [
>           "modifyvm",
>           "{{.Name}}",
>           "--cpus",
>           "1"
>         ]
>       ]
>     }
>   ],
>   "post-processors": [
>     {
>       "type": "amazon-import",
>       "keep_input_artifact": true,
>       "access_key": "{{user `aws_access_key`}}",
>       "secret_key": "{{user `aws_secret_key`}}",
>       "region": "{{user `aws_region`}}",
>       "s3_bucket_name": "{{user `aws_bucket`}}",
>       "license_type": "BYOL",
>       "tags": {
>         "Description": "packer amazon import "
>       }
>     },
>     {
>       "type": "vagrant",
>       "keep_input_artifact": true,
>       "output": "builds/{{.Provider}}-ubuntu1804.box"
>     }
>   ]
> }
>
>
> > On Sep 15, 2018, at 2:24 AM, Rickard von Essen <
> [email protected]> wrote:
> >
> > Could you share your template?
> >
> > On Fri, 14 Sep 2018 at 21:55, <[email protected]> wrote:
> > I am building an image from athe Ubuntu 18.04 LTS ISO, creating an OVA
> image, which I then attempt to import to AWS.
> > The first time I attempted this I got the dreaded "Unsupported kernel
> version..." error.
> >
> > Therefore, I launched this AMI:
> ubuntu/images-testing/hvm-ssd/ubuntu-bionic-daily-amd64-server-20180912
> (ami-00cc0fe8bda132f03)
> > Then I logged in and I checked (uname -a) which kernel was running:
> >
> > Linux ip-172-31-42-89 4.15.0-1021-aws #21-Ubuntu SMP Tue Aug 28 10:23:07
> UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
> >
> > So I changed the kernel to 4.15.0-1021-aws and then I got:
> > Post-processor failed: Import task import-ami-0a70505000abf192c failed:
> ClientError: Unsupported kernel version 4.15.0-1021-aws
> >
> > The two kernel versions are exactly the same...
> >
> > Any idea of what the cause could be?
> >
> > Thanks!
> >
> > G
> >
> > --
> > This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
> >
> > GitHub Issues: https://github.com/mitchellh/packer/issues
> > IRC: #packer-tool on Freenode
> > ---
> > You received this message because you are subscribed to the Google
> Groups "Packer" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected].
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/packer-tool/edbc2e32-bb40-4795-b2b4-7dbd1bd7cce3%40googlegroups.com
> .
> > For more options, visit https://groups.google.com/d/optout.
> >
> > --
> > This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
> >
> > GitHub Issues: https://github.com/mitchellh/packer/issues
> > IRC: #packer-tool on Freenode
> > ---
> > You received this message because you are subscribed to the Google
> Groups "Packer" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected].
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/packer-tool/CALz9Rt9vHk6jxU6FQZo9bRFNkzNEKGYM5J4DjL4rDgwCK2MN8A%40mail.gmail.com
> .
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: https://github.com/mitchellh/packer/issues
> IRC: #packer-tool on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Packer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/packer-tool/2545C16D-71D5-4DCB-9AA5-EC5D289B4166%40ucsb.edu
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/CALz9Rt9cLksd_n7hULKy0Z%2B%2BaJeS5azq41voSUXq89pLbOhHzA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to