2

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>' 
3
  • Having same issue. Any fix? Commented Jan 25, 2018 at 11:48
  • Sadly not yet.. Commented Jan 25, 2018 at 11:51
  • Can you launch VirtualBox machine manually and start the machine manually and see if it works? Commented Jan 26, 2018 at 18:30

2 Answers 2

2
+200

This is how I fixed the issue.

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

  2. run sudo /sbin/vboxconfig

Let me know if it works for you.

Sign up to request clarification or add additional context in comments.

2 Comments

I choose to accept this answer because it solves the problem and lets me use the most up to date software! I was able to ssh into my vagrant vm.
Also, mind explaining why this solves the problem? I'd really like to know.
0

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.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.