These Packer templates are derived from the templates for building Vagrant boxes for various OS produced by the Bento Project, produced under Apache 2 license.
Example 1: How to build an OSM box just for the VirtualBox provider:
cd packer_templates/osm packer build -only=virtualbox-iso osm-8.0.4-amd64.json
Example 2: How to build an OSM VM with the OpenStack provider:
source openrc.sh # This is only needed the first time jq 'del(."post-processors")' osm-8.0.4-amd64.json > tmp.json packer build -only=openstack tmp.json rm tmp.json
As it can be seen, this type of build needs some additional details and commands, since:
post-processors part of the template, since it is likely to be incompatible with the openstack builder. This rip can be made easily jq but, unfortunately, Packer does not work reliably with piped inputs, so we need to use an intermediate temporary file.cd ../../builds vagrant box add --name osm/osm-rel8 osm-8.0.4.virtualbox.box
vagrant_tests to test it:cd ../vagrant_tests/ # Edit the box name in `Vagrantfile` as appropriate vagrant up
vagrant destroy vagrant box remove osm/osm-rel8
You need to use the Vagrant web page.
Here there is a step-by-step guide with screenshots.