Based on the tutorial at https://www.packer.io/intro/getting-started/setup.html
$ packer version
Packer v0.12.1
$ vagrant -v
Vagrant 1.9.1
$ vboxmanage --version
5.0.24_Ubuntur108355
sudo apt-get install -y virtualbox-guest-additions-iso
sudo vagrant plugin install vagrant-vbguest
vagrant plugin install vagrant-vbguest
~/.aws/credentials
mv ~/docktermj.git/packer-example ~/docktermj.git/packer-example.$(date +%s)
git clone [email protected]:docktermj/packer-example.git ~/docktermj.git/packer-example
cd ~/docktermj.git/packer-example
packer build template.json
cd ~/docktermj.git/packer-example
vagrant box add --name="packer-example-virtualbox" ./packer-example-nnnnnnnnnn-virtualbox.box
mv /tmp/packer-example /tmp/packer-example.$(date +%s)
mkdir /tmp/packer-example
cd /tmp/packer-example
vagrant init packer-example-virtualbox
vagrant up
cd /tmp/packer-example
vagrant ssh
1 Uncomment config.vm.network
in /tmp/packer-example/Vagrantfile
. Example:
sed -i.$(date +'%s') \
-e 's/# config.vm.network \"public_network\"/config.vm.network \"public_network\"/g' \
/tmp/packer-example/Vagrantfile
- Start vagrant image.
cd /tmp/packer-example
vagrant ssh
- Find the IP address.
ip addr show
- Exit vagrant image and re-login