I'm using Vagrant for virtual machines and want to start creating my own base boxes to try and match a production environment.
I've created a plain Debian base box using VMware Fusion Pro 8.1.1 and I've been able to add
the box, but I'd like to start using the box metadata.json to set version numbers. I read in the vagrant doc that the only required key is the "provider"
, and that works great, but when I vagrant box list
I get v0
work-debian7-11-64 (vmware_fusion, 0)
I can see it when I remove to try again with a an updated metadata.json
file.
$ vagrant box remove work-debian7-11-64
Removing box 'work-debian7-11-64' (v0) with provider 'vmware_fusion'...
If I follow the documentation and use "version":"0.1.0"
something like:
{
"name": "hashicorp/precise64",
"description": "This box contains Ubuntu 12.04 LTS 64-bit.",
"versions": [
{
"version": "0.1.0",
"providers": [
{
"name": "virtualbox",
"url": "http://somewhere.com/precise64_010_virtualbox.box",
"checksum_type": "sha1",
"checksum": "foo"
}
]
}
]
}
I end up with an error when I go to add
the box. This is some of the output (it goes on with more details with from
)
$ vagrant box add work-debian7-11-64 debian-7.11-64.vmware.box
==> box: Box file was not detected as metadata. Adding it directly...
==> box: Adding box 'work-debian7-11-64' (v0) for provider:
box: Unpacking necessary files from: file:///Users/dave/Code/code_resources/vagrant_examples/vagrant-bird-box-vmware-debian-nodesktop/debian-7.11-64.vmware.box
/opt/vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/box_collection.rb:155:in `block (3 levels) in add': undefined method `to_sym' for nil:NilClass (NoMethodError)
This is my metadata.json
file:
{
"name": "workalicious/debian7-11-64",
"description": "Debian 7.11.0 64-bit web server.",
"versions": [{
"version": "0.1.0",
"providers": [{
"name": "vmware_fusion"
}]
}]
}
I'm wondering if it's something I'm doing wrong with the format of the metadata.json
? When I only use the provider
key box add
works without errors. I know there is Altas and Packer, but I wanted to try this locally.