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 up hangs forever on Windows 7, Vagrant 1.9.7, VirtualBox 5.1.22.r115126 #8777

Closed
hopoffbaby opened this issue Jul 13, 2017 · 40 comments

Comments

@hopoffbaby
Copy link

hopoffbaby commented Jul 13, 2017

Vagrant version

C:\MyFiles\VagrantLSF>vagrant -v
Vagrant 1.9.7

Host operating system

Windows 7 64bit

Guest operating system

Centos/7

Vagrantfile

Vagrant.configure("2") do |config|
  config.vm.box = "centos/7"
end

Debug output

https://gist.github.com/hopoffbaby/be10d4873bdbe00cba23a58b48e00166

Expected behavior

Start virtual box vm with centos 7

Actual behavior

hang indefinitely after:
DEBUG push: finalizing
INFO subprocess: Starting process: ["C:\windows\System32\WindowsPowerShell\v1.0\/powershell.EXE", "-NoLogo", "-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-Command", "(new-object System.Security.Principal.WindowsPrincipal([System.Security.Principal.WindowsIdentity]::GetCurrent())).IsInRole([System.Security.Principal.WindowsBuiltInRole]::Administrator)"]
INFO subprocess: Command not in installer, restoring original environment...
DEBUG subprocess: Selecting on IO
DEBUG subprocess: stdout: False

Steps to reproduce

  1. install vagrant & virtual box - latest
  2. vagrant up --debug
@pnedkov
Copy link

pnedkov commented Jul 13, 2017

Same issue here. I started seeing this yesterday with Vagrant 1.9.6. I upgraded to 1.9.7 but I got the same result - it hangs after SSH auth method: private key. The new VM has booted and accessible over the network. On the other hand vagrant ssh does gives me:
ssh_exchange_identification: read: Connection reset by peer

I am on Arch Linux and using VirtualBox 5.1.22.r115126.

I run vagrant up --debug and here is the error: https://pastebin.com/7SSegYjH

@hopoffbaby
Copy link
Author

It seems that this issue is caused by 1.9.7. downgrading to 1.9.6 avoids this issue

@pnedkov
Copy link

pnedkov commented Jul 13, 2017

For me the problem started yesterday with 1.9.6. I upgraded to 1.9.7 - same problem. I just downgraded to 1.9.5 - same problem.

@pnedkov
Copy link

pnedkov commented Jul 13, 2017

I found what is causing my problem. It is the network adapter type. I am using 82545EM. When I changed it to 82540EM it works back again even with Vagrant 1.9.7. HTH

@Parithi
Copy link

Parithi commented Jul 14, 2017

@pnedkov I'm new to vagrant, can you tell me how to change the network adapter type?

I'm having the same setup, following @hopoffbaby and downgrading to vagrant 1.9.6 fixed my issue. But now stuck with vagrant ssh instead.

vagrant ssh --debug gives the following :

Please view this gist

@MaxLap
Copy link

MaxLap commented Jul 14, 2017

Had the same issue, downgrading to 1.9.6 solved the issue.

After a windows update restarted my PC when things when running, i had to vagrant destroy to start it over. When I did, i had mounting issues, so i trying to update VirtualBox to 5.1.22 and vagrant to 1.9.7.

After doing so, all the commands hung and had no output. Using the debug, it also finished with

INFO subprocess: Command not in installer, restoring original environment...
DEBUG subprocess: Selecting on IO
DEBUG subprocess: stdout: False

(Sorry, I didn't think of copying the exact Starting Process line i was getting, and since vagrant needs a reboot to install and to uninstall, I don't have it)

I tried repair and reinstall of vagrant 1.9.7 and nothing changed.
Downgrading to 1.9.6 solved that issue. Now, for some reason, vagrant ssh won't give me a prompt when used from gitbash, but it does from cmd. So i'll stay with that for now, i just want to run tests on this.

On Windows 7 Pro 64bit.
VirtualBox 5.1.22
It's for a rails dev box, which uses Ubuntu Zesty 17.04.

@pnedkov
Copy link

pnedkov commented Jul 14, 2017

@Parithi

vb.customize ["modifyvm", :id, "--nictype1", "82540EM"]

Refer to my vagrant repo if you want the complete Vagrantfile. I am not saying this will solve everyone's problem. But in my case 82545EM was the issue.

@ikus060
Copy link

ikus060 commented Jul 14, 2017

Seams to be duplicate of #8783

@ikus060 ikus060 marked this as a duplicate of #8783 Jul 14, 2017
@digash
Copy link

digash commented Jul 25, 2017

Same issue here. I noticed that it gets hung on powershell, killing the powershell using process explorer allows the vagrant to continue with no issue.

@inverbis
Copy link

Cheers @digash, saved me from banging my head into the wall

@pscheit
Copy link

pscheit commented Aug 1, 2017

killing powershell did not help, because i need vagrant to know that i am administrator so it is able to use smb. I am on vagrant 1.9.6 and it is still happening

@thanamanil
Copy link

I exactly had the same problem with vagrant 1.9.7 on 2 of my machines. Downgrading the Vagrant to 1.9.3 fixed the issue.

@nurid
Copy link

nurid commented Aug 1, 2017

The same problem with me (vagrant version 1.9.7; windows 7 64bit).
here are the last lines of vagrant up --debug:

...

DEBUG push: finalizing
 INFO subprocess: Starting process: ["C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\/powershell.EXE", "-NoLogo", "-NoProfi

le", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-Command", "(new-object System.Security.Principal.WindowsPrincipal([System.Security.Principal.WindowsIdentity]::GetCurrent())).IsInRole([System.Security.Principal.WindowsBuiltInRole]::Administrator)"]
 INFO subprocess: Command not in installer, restoring original environment...
DEBUG subprocess: Selecting on IO
DEBUG subprocess: stdout: False

.

@thanamanil
Copy link

@nurid: Try downgrading the vagrant version. I had the same issue and it was resolved after downgrading.

@pscheit
Copy link

pscheit commented Aug 2, 2017

upgrade powershell to fix it

@nurid
Copy link

nurid commented Aug 3, 2017

@thanamanil : Thanks, it works. I downgraded the software from vagrant 1.9.7 to 1.9.6.

@pscheit : Thanks, my powershell version is 2.0 (c) 2009; I haven't tried your suggestion.

I checked the version as per this article:
https://4sysops.com/archives/powershell-versions-and-their-windows-version/
using a command inside the powershell console window:
$PSVersionTable

And I found the latest powershell update info:
https://docs.microsoft.com/en-us/powershell/wmf/5.0/requirements
in case I need it in the future.

@pscheit
Copy link

pscheit commented Aug 3, 2017

I have a windows 7 installation where vagrant version 1.8.6 had the same behaviour

@tlongren
Copy link

tlongren commented Aug 3, 2017

@nurid, updating powershell, as suggested by @pscheit, resolved this for me.

@marcoebbinghaus
Copy link

Downgrade to 1.9.6 solved the same issue for me too, thanks. Was stuck with 1.9.7 at the same line nurid stated.

@ashokvaddevalli
Copy link

I am also getting same issue on using Vagrant 1.9.6 version.

INFO subprocess: Starting process: ["C:\Windows\System32\WindowsPowerShell\v1.0/powershell.EXE", "-NoLogo", "-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-Command", "(new-object System.Security.Principal.WindowsPrincipal([System.Security.Principal.WindowsIdentity]::GetCurrent())).IsInRole([System.Security.Principal.WindowsBuiltInRole]::Administrator)"]
INFO subprocess: Command not in installer, restoring original environment...
DEBUG subprocess: Selecting on IO
DEBUG subprocess: stdout: True

@goodwinb99
Copy link

Colleague of mine had the same issue. Upgrading from PowerShell 2.0 to 5.1 resolved the issue.

@ashokvaddevalli
Copy link

Ok. Thanks.

I am getting another issue Synced Folders on below.

=> default: Machine booted and ready!
INFO warden: Calling IN action: #Vagrant::Action::Builtin::Provision:0x00000003d82388
INFO provision: Checking provisioner sentinel file...
INFO warden: Calling IN action: #Vagrant::Action::Builtin::SyncedFolders:0x000000037db880
INFO synced_folders: SyncedFolders loading from cache: false
INFO subprocess: Starting process: ["C:\Windows\System32\WindowsPowerShell\v1.0\/powershell.EXE", "-NoLogo", "-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-Command", "(new-object System.Security.Principal.WindowsPrincipal([System.Security.Principal.WindowsIdentity]::GetCurrent())).IsInRole([System.Security.Principal.WindowsBuiltInRole]::Administrator)"]
INFO subprocess: Command not in installer, restoring original environment...
DEBUG subprocess: Selecting on IO
DEBUG subprocess: stdout: True

@flashfs
Copy link

flashfs commented Aug 17, 2017

Same problem here.. it just hangs. Vagrant 1.9.7, Windows 7 and Power Shell 2.0.

 INFO subprocess: Starting process: ["C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\/powershell.EXE", "-NoLogo", "-NoP
rofile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-Command", "(new-object System.Security.Principal.WindowsPrin
cipal([System.Security.Principal.WindowsIdentity]::GetCurrent())).IsInRole([System.Security.Principal.WindowsBuiltInRole
]::Administrator)"]
 INFO subprocess: Command not in installer, restoring original environment...
DEBUG subprocess: Selecting on IO
DEBUG subprocess: stdout: True

@tiagolpadua
Copy link

Samething here, in Windows 10 works fine, but in Windows 7 it hangs

@ghost
Copy link

ghost commented Aug 21, 2017

Same problem here. Windows, latest vagrant.

@jmontilla202
Copy link

Windows 7 Pro 64-bit (recent fresh install)
VirtualBox 5.1.26
Vagrant 1.9.8

Issue resolved by upgrading Powershell from 2.0 to 5.0 ...

image

image

@chrisroberts
Copy link
Member

Closing as a duplicate of #8783

#8783 (comment)

Cheers!

@Sathiyarajan
Copy link

Killing the powershell.exe process from Windows Task Manager has resolved the issue in Windows 7.

@ghost
Copy link

ghost commented Nov 7, 2017 via email

@KingGeneral
Copy link

first you need to force close the powershell with taskmanager like @digash say.

then it will show the error where it stuck.
for me i need to upgrade my powershell,
then restart the computer
run the vagrant up,

if stuck then after you type vagrant up, search power shell ,
run windows powershell ISE
now it works

@Gaurav2586
Copy link

Updating powershell to v3.0 solved this issue: http://www.microsoft.com/en-us/download/details.aspx?id=34595

@felixtheflex
Copy link

Yep updating powershell did the trick :-)

@kclay
Copy link

kclay commented Dec 28, 2017

Thanks @Gaurav2586 just ran into this problem!

@oussaka
Copy link

oussaka commented Feb 11, 2018

Updating powershell to 4 or 5 solved this issue.

@renatoadsumus
Copy link

Same problem here. Windows, latest Vagrant 2.0.2, Oracle Virtual Box 5.2.8 and PowerShell 2.0.

I have done update to PowerShell 5.0 and "vagrant up" have back working normally.

choco upgrade powershell

@glmagicworks
Copy link

glmagicworks commented Mar 14, 2018

This fix is from a Google+ group.
Just run:

vagrant up --provider virtualbox

Be happy!
https://groups.google.com/forum/#!topic/vagrant-up/MAbhSWNIxYk

@shahker141
Copy link

Hi gabriellacerda,

Thank you very much, this is fixed the issue.

@LiuHD
Copy link

LiuHD commented May 7, 2018

it works!!!
just follow gabriellacerda, vagrant up --provider virtualbox

@ghost
Copy link

ghost commented Mar 30, 2020

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.

@ghost ghost locked and limited conversation to collaborators Mar 30, 2020
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