Hi, never heard that packer has that feature. But you can craft the "vagrant version" by yourself. Its just a json.
An example for illustration, from our setup: > http://vagrant.sprd.net/sprd_ubuntu_16_04_vagrant/sprd_ubuntu_16_04_vagrant.json { "name": "sprd_ubuntu_16_04_vagrant", "description": "sprd_ubuntu_16_04_vagrant", "versions": [ { "providers": [ { "checksum": "f4cb81f1179b13e01ff288cec87f0d0305005317", "name": "virtualbox", "url": "http://vagrant.sprd.net/sprd_ubuntu_16_04_vagrant/boxes/sprd_ubuntu_16_04_vagrant--201606.28.0.box", "checksum_type": "sha1" } ], "version": "201606.28.0" }, { "providers": [ { "checksum": "c4c7bbca2d51d02911c3133fd8c2f6adbbaa179b", "name": "virtualbox", "url": "http://vagrant.sprd.net/sprd_ubuntu_16_04_vagrant/boxes/sprd_ubuntu_16_04_vagrant--201607.06.0.box", "checksum_type": "sha1" } ], "version": "201607.06.0" }, { "providers": [ { "checksum": "b70d0f69a0061c8786330ccb2f2349a55a99ebd2", "name": "virtualbox", "url": "http://vagrant.sprd.net/sprd_ubuntu_16_04_vagrant/boxes/sprd_ubuntu_16_04_vagrant--201607.11.0.box", "checksum_type": "sha1" } ], "version": "201607.11.0" } ] } I do this as a post-build script with python. Just pump everything in a python object/dictionary, and use json.dumps(obj) to stream it in a file... Hope that helps. Greetings, Bernd On 07/12/2016 07:27 PM, Bob Tanner wrote: > Creating a Virtualbox (5.0.24 r108355) .box with Packer (0.10.0) for use > in Vagrant (1.8.4). > > The .box is stored on my local file system. > > I cannot figure out how to version the .box when it's added to Vagrant. > Below real-time/xenial64 is the box. > > $ vagrant box list > opensuse/openSUSE-42.1-x86_64 (virtualbox, 1.0.0) > real-time/xenial64 (virtualbox, 0) > ubuntu/precise64 (virtualbox, 20160627.0.0) > ubuntu/trusty64 (virtualbox, 20160627.0.0) > ubuntu/trusty64 (virtualbox, 20160708.1.0) > > Now the .box file itself is versioned > > packer.git/build/virtualbox/base-xenial64-20160712.0.0.box > > And the ubuntu boxes I'm getting from atlas (online) and they are versioned. > > I'm guessing "post-processors" of "type": "vagrant" cannot be versioned? > At least when I try the "version": I cannot validate. > > $ packer validate ubuntu/xenial/base-xenial64.json > Template validation failed. Errors are shown below. > > Errors validating build 'virtualbox'. 1 error(s) occurred: > > * unknown configuration key: "version" > > > Any help on how to version a Virtualbox gotten from a local file system > for use in Vagrant would be helpful. > > Thanks. > > Virtualbox-5.0.24 r108355 > Packer-0.10.0 > Vagrant-1.8.4 > -- 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 packer-tool+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/f82ce653-15e0-ab72-7890-f62dc4333519%40spreadshirt.net. For more options, visit https://groups.google.com/d/optout.
signature.asc
Description: OpenPGP digital signature