Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vagrant unable to start VMs - (force shutdown, unable to find net/ssh) #5580

Closed
fedesilva opened this issue Apr 10, 2015 · 4 comments
Closed

Comments

@fedesilva
Copy link

I am trying to start a stock (generated by vagrant) Vagrantfile with ubuntu 14.04 machines from chef/ubuntu-14.04 and/or ubuntu cloud images and apparently vagrant is forcing shutdown before connecting to the vm and is reporting failure to require "net/ssh"

Versions are

f@Omoikane:~/tmp/vms$ vagrant --version
Vagrant 1.7.2
f@Omoikane:~/tmp/vms$ vboxmanage --version
4.3.26r98988

Host OS: Mac OS X 10.10.3

Here is sample output without debug flag

f@Omoikane:~/tmp/vms$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'ubuntu1404'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: vms_default_1428708392362_68895
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 22 => 2222 (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
==> default: Forcing shutdown of VM...
==> default: Destroying VM and associated drives...
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/communicators/ssh/communicator.rb:8:in `require': cannot load such file -- net/ssh (LoadError)
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/communicators/ssh/communicator.rb:8:in `<top (required)>'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/communicators/ssh/plugin.rb:14:in `require'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/communicators/ssh/plugin.rb:14:in `block in <class:Plugin>'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/registry.rb:27:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/registry.rb:27:in `get'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/machine.rb:235:in `communicate'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builtin/wait_for_communicator.rb:16:in `block in call'

Here is a link to the full vagrant output with --debug on:
https://www.dropbox.com/s/um106bi3zvp9z4g/vagrant.log

Virtualbox works correctly if one installs a machine manually.

For the sake of completeness here is the installed plugin list (after removing everything, nothing changed)

f@Omoikane:~/tmp/vms$ vagrant plugin list
vagrant-share (1.1.3, system)
@fedesilva
Copy link
Author

Tried downgrading to Vagrant 1.6.5 without success. Same exact error output.

@fedesilva
Copy link
Author

This happens with manually installed vagrant and virtualbox and also with them installed via Homebrew Cask (fwiw).

@fedesilva
Copy link
Author

FIXED!

Turned out an old .vagrant.d was being used as restored from Time Machine (old machine died, new machine is restored from old backup).

Moved away (kept for testing later) the .vagrant.d directory and problem solved.

I would not close this issue as this can happen to someone else and the output is not helpful plus still no idea what is broken in the old one.

@mitchellh
Copy link
Contributor

Thanks for the great debugging. Do you have any suggestions of how Vagrant might better detect this? Old ".vagrant.d" directories certainly do cause problems but there isn't a good sentinel file to detect when this is the case. I'm not sure if we can actually error here. :(

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants