How to deploy AWS AMI from vagrant box(bento source)?

33 views
Skip to first unread message

falconws

unread,
Aug 12, 2020, 1:17:46 AM8/12/20
to Packer
I'm using Packer builder like this.

```
{
  "builders": [
    {
      "communicator": "ssh",
      "source_path": "bento/ubuntu-20.04",
      "provider": "virtualbox",
      "type": "vagrant",
      "output_dir": "target",
      "skip_add": true
    }
  ],
  "provisioners": [
    {
      "type": "shell",
      "script": "packer_script.sh"
    },
}
```

So this is output target/package.box.
I want to deploy AWS AMI from this box image.
How to?
Maybe use this Post-Processor

But, this post-processor is not supported `.box` image.
Am I need .box -> .vmdk convert?
Can I direct import .box to AWS AMI?

Thanks.

Megan Marsh

unread,
Aug 12, 2020, 2:33:34 PM8/12/20
to packe...@googlegroups.com
a vmware .box is just a tarfile, so you can untar it using the shell-local post-processor and get the vmdk that way, then use the artifice post-processor to set that vmdk as the artifact, and then upload that using the amazon-import post-processor.

--
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/hashicorp/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 packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/ca5f133b-4101-4683-8d07-dacbcb676148n%40googlegroups.com.

falconws

unread,
Aug 12, 2020, 9:39:12 PM8/12/20
to Packer
Reply all
Reply to author
Forward
0 new messages