Friday, February 2, 2018

Vagrant 2.0.1 VBox 5.2.6, Errors when running vagrant

Leave a Comment

I have been following the vagrant Getting Started Guide.

I had a problem where vagrant would freeze my entire machine when using vagrant up, so I did what was suggested here (scroll down towards the bottom to a post by Valross.nu).

I have Vagrant 2.0.1 and VirtualBox 5.2.6 installed on Ubuntu 16.04.

When running vagrant init, vagrant up, or pretty much any other command, I get the following errors:

/opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/machine_index.rb:293:in `read': Input/output error @ rb_sysopen - /home/patrick/.vagrant.d/data/machine-index/index (Errno::EIO)     from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/machine_index.rb:293:in `read'     from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/machine_index.rb:293:in `unlocked_reload'     from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/machine_index.rb:53:in `block in initialize'     from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/machine_index.rb:323:in `block in with_index_lock'     from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/machine_index.rb:321:in `open'     from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/machine_index.rb:321:in `with_index_lock'     from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/machine_index.rb:52:in `initialize'     from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/environment.rb:741:in `new'     from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/environment.rb:741:in `machine_index'     from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/environment.rb:215:in `block in action_runner'     from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/action/runner.rb:33:in `run'     from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/environment.rb:543:in `hook'     from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/environment.rb:792:in `unload'     from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/bin/vagrant:141:in `ensure in <main>'     from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/bin/vagrant:141:in `<main>' 

2 Answers

Answers 1

This is how I fixed the issue.

  1. Delete vagrant.d directory from your working director.

  2. run sudo /sbin/vboxconfig

Let me know if it works for you.

Answers 2

There seems to be somebody else running into the same issue at https://superuser.com/questions/1286465/vagrant-and-virtualbox-suddenly-don-t-work-for-me-on-ubuntu-16-04-3.

I wrote this in as a comment there as well, but I noticed that VirtualBox had a new release on Jan 15; have you considered downgrading just VirtualBox? https://www.virtualbox.org/wiki/Changelog (Vagrant was last updated on Nov 2 which was longer ago, hence my suggestion to focus on VirtualBox. https://github.com/hashicorp/vagrant/releases)

If it were me, I'd major try downgrading both Vagrant and Virtualbox just a little (eg, maybe still Vagrant 2.0.x and VBox 5.2.x), and if I were still running into issues, further downgrades to Vagrant 1.9.x and VBox 5.1.x.

If this works, then "it works good enough" might be fine (and potentially desired at a workplace) unless you absolutely need any cutting edge features that may happen to be in the latest versions.

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment