Skip to content

Instantly share code, notes, and snippets.

@ocxo
Created December 16, 2014 17:10
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save ocxo/ce376fb4ab3298392048 to your computer and use it in GitHub Desktop.
Save ocxo/ce376fb4ab3298392048 to your computer and use it in GitHub Desktop.
temporary hack to address bug with vagrant-vbguest installation on vagrant 1.7.1
# temporary hack to address bug with vagrant-vbguest installation
# https://github.com/mitchellh/vagrant/issues/4962
if awk "BEGIN {exit `vagrant -v` == "1.7.1" ? 0 : 1 }"
then
sudo sed -i .original 's/\*\*opts/opts/g' /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/machine.rb
fi
@nikolashermann
Copy link

Thank you.
One note: The option '-i original' results in a syntax error on sed 4.2.1 (Ubuntu 12.04)
Could you change it to '--in-place=.original' as seen here: https://gist.github.com/nikolashermann/b9c079a75cfda1105757/revisions
This should be safe.

@skepticfx
Copy link

Wow! Works like a charm. Will this cause any un-intended side-effects when I update to the latest Vagrant when its released?

@adam-paterson
Copy link

Life saver! Thanks @fromonesrc

@c0nsaw
Copy link

c0nsaw commented Jan 2, 2015

Anybody help me with this fix, alas Im using Windows 7 x64. Thanks.

Cannot box anything.

@rorysavage77
Copy link

Confirmed 1.7.2 does indeed fix this problem. Prior to upgrading to 1.7.2 myself, I was getting this:

~/VAGRANT/BRONZE ᐅ vagrant package --output silver.box
/opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/machine.rb:153:in action': wrong number of arguments (2 for 1) (ArgumentError) from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/plugins/commands/package/command.rb:83:inpackage_vm'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/plugins/commands/package/command.rb:72:in block in package_target' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/plugin/v2/command.rb:226:inblock in with_target_vms'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/plugin/v2/command.rb:220:in each' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/plugin/v2/command.rb:220:inwith_target_vms'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/plugins/commands/package/command.rb:70:in package_target' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/plugins/commands/package/command.rb:44:inexecute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/cli.rb:42:in execute' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/environment.rb:301:incli'
from /opt/vagrant/bin/../embedded/gems/gems/vagrant-1.7.1/bin/vagrant:174:in `

'

@afilter
Copy link

afilter commented May 8, 2015

cool, this solved the packaging problem for me, btw, how do you find this bug?
find it using --debug message? but it seems the error message is not in the debug infomation, so how do you locate this bug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment