Vagrant: 2.0.1 not showing bash prompt in ssh session

Created on 7 Nov 2017  ยท  8Comments  ยท  Source: hashicorp/vagrant

Vagrant version

$ vagrant -v
Vagrant 2.0.1

Host operating system

Windows 7 Enterprise

Guest operating system

Linux (this happens with centos and ubuntu via virtualbox)

Vagrantfile

Vagrant.configure("2") do |config|
  config.vm.box = "ubuntu/xenial64"
end

Debug output

https://gist.github.com/jk3us/604581a986b661256e30d9bab9607558

Notice that I do get bash (echo $$ / ps) shows that I am in a bash instance. bash -i does give me the expected prompt, but with the warning:

bash: cannot set terminal process group (1739): Inappropriate ioctl for device
bash: no job control in this shell

Expected behavior

Get a regular bash instance with prompt

Actual behavior

Got some sort of minimal bash shell with no prompt or other bash. From my googling, it seems to have something to do with allocating ttys.

Steps to reproduce

  1. vagrant init -m ubuntu/xenial64
  2. vagrant up
  3. vagrant ssh

References

8739 seems similar

duplicate

Most helpful comment

The following solution worked for me:

export VAGRANT_PREFER_SYSTEM_BIN=1

The solution and the reason why this works can be found here:

https://github.com/hashicorp/vagrant/issues/9143

All 8 comments

This may be a duplicate of #9143

Hi @jk3us - yep, this looks to be a dupe. I'll close it as such. Thanks!

Same thing is happening to me.
I started after I upgraded to Vagrant 2.0.1 and VirtualBox Version 5.2.0 r118431 (Qt5.6.2).
I'm running a "ubuntu/trusty64" box.
Also I'm running on a Windows 8.1 machine.

When I execute the ssh command directly the prompt appears fine, but when I use "vagrant ssh" there is no command prompt.

Also when I use vagrant ssh when I press the up and down keys it doesn't show my history instead the cursor actually moves up and down. Though pressing enter does seem to execute a command from my history. So it looks like it's working correctly it's just not displaying correctly.

Running bash -i does show me the command prompt but inconsistently, sometimes after I execute a command the prompt shows up, other times it does not.

It looks like sometimes I have to press enter a couple of times before the command executes.

In some cases I type the exit command and it doesn't execute. Sometimes it displays the word exit a couple of times in response.

The following solution worked for me:

export VAGRANT_PREFER_SYSTEM_BIN=1

The solution and the reason why this works can be found here:

https://github.com/hashicorp/vagrant/issues/9143

@luisperezphd Works !! tkx

I have the same problem. I tried everything and nothing works.

Not working for me also

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

Cbeck527 picture Cbeck527  ยท  3Comments

jazzfog picture jazzfog  ยท  3Comments

bbaassssiiee picture bbaassssiiee  ยท  3Comments

luispabon picture luispabon  ยท  3Comments

mpontillo picture mpontillo  ยท  3Comments