Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vagrant: Unknown configuration section 'omnibus' but vagrant-omnibus plugin is installed

I've followed the instructions at: http://berkshelf.com/ after installing the latest ChefDK (from here: http://downloads.getchef.com/chef-dk/mac/#/). When I do "vagrant up", I get the error:

Vagrant:
* Unknown configuration section 'omnibus'.

Various posts (e.g. Vagrant Install chef-client on top of base image) have suggested this means that the vagrant-omnibus plugin is not installed. In my case, I have installed it. "vagrant plugin list" displays:

vagrant-berkshelf (2.0.1)
  - Version Constraint: 2.0.1
vagrant-login (1.0.1, system)
vagrant-omnibus (1.4.1)
vagrant-share (1.1.1, system)

Any suggestions as to how I can get this example cookbook to run on a new VM instance launched with "vagrant up"?

like image 806
eswenson Avatar asked Jan 10 '23 22:01

eswenson


1 Answers

It turns out the issue for me was that while ~/.vagrant.d/plugins.json included the vagrant-omnibus plugin, the ~/.vagrant.d/gems/gems and ~/.vagrant.d/gems/specifications directories did not contain the appropriate GEM or gemspec files. Not sure how this happened, but I suspect it was due to accidentally typing ^C in the middle of execution of the vagrant plugin install command and then reexecuting that command.

It would appear vagrant plugin install does not do appropriate ^C handling and that it writes the contents of plugins.json before it has stored the gem and gemspec.

Subsequent vagrant plugin install commands don't fix the problem. Manually editing plugins.json to remove the plugin and then reexecuting the vagrant plugin install vagrant-omnibus command fixed the issue.

like image 148
eswenson Avatar answered Apr 09 '23 13:04

eswenson