Skip to content

Instantly share code, notes, and snippets.

@tgecho
Last active August 29, 2015 14:13
Show Gist options
  • Save tgecho/d7055d6e7b193e08a0e9 to your computer and use it in GitHub Desktop.
Save tgecho/d7055d6e7b193e08a0e9 to your computer and use it in GitHub Desktop.
{
"name": "test",
"versions": [
{
"version": "1",
"status": "active",
"providers": [{
"name": "virtualbox",
"url": "file:///Users/erik/project/packer/vagrant.dev.1.box"
}]
},
{
"version": "2",
"status": "active",
"providers": [{
"name": "virtualbox",
"url": "file:///Users/erik/project/packer/vagrant.dev.2.box"
}]
}
]
}
me:project erik$ vagrant box add --name test packer/metadata.json
==> box: Loading metadata for box 'packer/metadata.json'
box: URL: file:///Users/erik/project/packer/metadata.json
==> box: Adding box 'test' (v2) for provider: virtualbox
box: Downloading: file:///Users/erik/project/packer/vagrant.dev.2.box
==> box: Successfully added box 'test' (v2) for 'virtualbox'!
me:project erik$ vagrant box list
test (virtualbox, 1)
test (virtualbox, 2)
precise64 (virtualbox, 0)
raring32 (virtualbox, 0)
raring64 (virtualbox, 0)
ubuntu (virtualbox, 0)
me:project erik$ vagrant box update
==> default: Box 'test' not installed, can't check for updates.
me:project erik$ vagrant box outdated
me:project erik$
# -*- mode: ruby -*-
# vi: set ft=ruby :
dir = File.dirname(__FILE__)
Vagrant.configure("2") do |config|
config.vm.box = "test"
config.vm.box_version = "1"
config.vm.box_url = "file://" + dir + "/packer/metadata.json"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment