Vagrant: 1.9.6 Failed to present a shell prompt

Created on 29 Jun 2017  ยท  17Comments  ยท  Source: hashicorp/vagrant

Please note that the Vagrant issue tracker is reserved for bug reports and
enhancements. For general usage questions, please use the Vagrant mailing list:
https://groups.google.com/forum/#!forum/vagrant-up. Thank you!

Vagrant version

1.9.6

Host operating system

Windows 10

Guest operating system

Ubuntu

Vagrantfile

# -*- mode: ruby -*-
# vi: set ft=ruby :

# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
  # The most common configuration options are documented and commented below.
  # For a complete reference, please see the online documentation at
  # https://docs.vagrantup.com.

  # Every Vagrant development environment requires a box. You can search for
  # boxes at https://atlas.hashicorp.com/search.
  config.vm.box = "ubuntu/xenial64"

  config.vm.network "forwarded_port", host_ip: "127.0.0.1", guest: 8080, host: 8080

  config.vm.provision "shell", inline: <<-SHELL
    # Update and upgrade the server packages.
    sudo apt-get update
    sudo apt-get -y upgrade
    # Set Ubuntu Language
    sudo locale-gen en_GB.UTF-8
    # Install Python, SQLite and pip
    sudo apt-get install -y python3-dev sqlite python-pip
    # Upgrade pip to the latest version.
    sudo pip install --upgrade pip
    # Install and configure python virtualenvwrapper.
    sudo pip install virtualenvwrapper
    if ! grep -q VIRTUALENV_ALREADY_ADDED /home/ubuntu/.bashrc; then
        echo "# VIRTUALENV_ALREADY_ADDED" >> /home/ubuntu/.bashrc
        echo "WORKON_HOME=~/.virtualenvs" >> /home/ubuntu/.bashrc
        echo "PROJECT_HOME=/vagrant" >> /home/ubuntu/.bashrc
        echo "source /usr/local/bin/virtualenvwrapper.sh" >> /home/ubuntu/.bashrc
    fi
  SHELL

end

Please note, if you are using Homestead or a different Vagrantfile format, we
may be unable to assist with your issue. Try to reproduce the issue using a
vanilla Vagrantfile first.

Expected behavior

File should have run and a shell prompt should have appeared in the guest OS

Actual behavior

No shell prompt

Steps to reproduce

  1. Run Vagrent file on 1.9.6
  2. run it on 1.9.5 NO ISSUES
    3.

References

Are there any other GitHub issues (open or closed) that should be linked here?
For example:

  • GH-1234
  • ...
hoswindows installer

Most helpful comment

The solution I found is here. Basically, set the VAGRANT_PREFER_SYSTEM_BIN environment variable to get vagrant to use your normal ssh executable instead of the msys one that it ships with.

All 17 comments

I'm having the same issue in Windows 7, with homestead and virtualbox. I updated my osx machine to 1.9.6 also and didn't get the issue.

Same issue on windows 7 with virtual box 5.1.22 with both babun and git bash to ssh.

Same issue on Windows 7 x64 with VirtualBox 5.1.22 and from git bash.
Works fine when ssh starts from win cmd.

Same issue on Windows 7 x64 with VirtualBox 5.1.22 and from git bash, Guest operating system is CentOS

Same issue on windows 10 x64 with VirtualBox 5.1.22 and from git bash. Vagrant ssh works in windows CMD

Same problem with win 10 and Git Bash (Git version 2.23.2)
no shell promt affter vagrant ssh

Same problem with Win 10 x64, Virtual Box 5.1.22 and Git Bash (Git version 2.13.0)

Fixed in latest release

I think I'm seeing this problem, or something with very similar symptoms, again in version 2.0.0. Am I the only one?

I have just upgraded to version 2.0.1 and the issue is occurring again.
Virtualbox 5.2.0
Windows 7
git 2.15.0 with gitbash

Yes, still happens with 2.0.1 on Windows 10 with git bash.

Yep. Latest version and same problem.

I'm getting this with cygwin and version 2.0.1, too. Currently working around with: (your command maybe be somewhat different)

ssh [email protected] -p2222 -i .vagrant/machines/web/virtualbox/private_key -o 'StrictHostKeyChecking no'

Should a new issue be opened about this?

@jk3us - if you are experiencing this with vagrant 2.0.1, please open a new issue so we can triage it. Thanks!

A workaround that works for me is to use winpty in Git Bash (this package is pre-installed). For example instead of calling "vagrant ssh" you can prepend winpty and call "winpty vagrant ssh". To make this seamless you can create an alias where vagrant="winpty vagrant".

The solution I found is here. Basically, set the VAGRANT_PREFER_SYSTEM_BIN environment variable to get vagrant to use your normal ssh executable instead of the msys one that it ships with.

I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

barkingfoodog picture barkingfoodog  ยท  3Comments

gwagner picture gwagner  ยท  3Comments

luispabon picture luispabon  ยท  3Comments

DreadPirateShawn picture DreadPirateShawn  ยท  3Comments

dorinlazar picture dorinlazar  ยท  3Comments