0

I see vagrant as a great tool for testing and I am surprised the aws plugin (here https://github.com/mitchellh/vagrant-aws but which seems deprecated) is here to instanciate ec2 and not copy same configuration as ec2 on a local vm.

I would like to reproduce ec2 on local vm by using the ami (amazon linux 2 and debian11) provided by aws but in vagrant box formats.

There is a iso file that can be downloaded here : https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/amazon-linux-2-virtual-machine.html

I have also found the debian 11 amazon image here in tar.xz format https://cloud.debian.org/images/cloud/bullseye/20220503-998/

I also have found how to Export a VM directly from an Amazon Machine Image (AMI) here : https://docs.aws.amazon.com/vm-import/latest/userguide/vmexport_image.html

I would like to use these images with vagrant, but i have no clue of how to write the Vagrantfile to do so...could you help me? Thank you

  • Your question is quite difficult to follow. Could you please edit it to try to make your core problem more clear? I suspect you want to run Vagrant on Amazon Linux on-premises but need a tutorial to walk you through it - is that correct? – Tim Sep 21 '22 at 21:08
  • yes amazon linux or debian11 as run on amazon. i will edit –  Sep 21 '22 at 21:28
  • You can only export a VM that was imported. I suggest you install Debian 11 locally the standard way, rather than trying to get an AWS version of Debian running locally. From there you should be able to use Vagrant normally. It's not entirely clear what you want help with, but it's unlikely someone will write you a Vagrant file. Suggest you have a go yourself, if you have problem post a clear question about what you're trying to achieve and what's not working. – Tim Sep 21 '22 at 22:21
  • I already installed "normal" debian11 and it works well. But because it is in "box" format it is very easy to use. These files i m talking about are not in box format. Then explain to me how i can convert these images to "box" formats... –  Sep 22 '22 at 07:58

1 Answers1

0

In the ReadMe of this repo, there is "How to make a VirtualBox-based Vagrant Amazon 2 Linux Base Box". https://github.com/poflynn/AMZN2Vagrant