-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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 seems to hang during smb setup. #3139
Comments
I have the same system set up, except I have Vagrant installed in a path with no spaces (the default location). I get a hang in the same place.
|
Yeah, same here if I reinstall Vagrant in the default location. |
Same here. |
I experienced the same problem with Windows 7 Professional. Here is my debug for log level info and debug: https://gist.github.com/mzeis/9503045 Please note that "Zuordnungen von Kontennamen und Sicherheitskennungen wurden nicht durchgeführt." translates to "No mapping between account names and security IDs was done". I don't know if this is related: http://support.microsoft.com/kb/285903/en-us |
I am having the same issue. I added some output to the set_share.ps1 script and we found that it comes to the exit 0 command, but after that nothing else is written, it just hangs. I am working on Windows 7. My colleague is working on Win8 and the same Vagrant machine works for him. The first two lines of logs it writes on his machine that are after the same lines I get are: DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000 I never get these written after this: INFO subprocess: Starting process: ["C:\Windows\System32\WindowsPowerShell\v1.0/powershell.EXE", "-NoProfile", "-ExecutionPolicy", "Bypass", "C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5 |
Seeing the same as @andyclarke
Only difference being I include the username/password options in the vagrantfile so it doesn't ask for them. Host is Windows 7 64bit, guest is CentOS 6.4, I tried booting without the shares and manually installing samba-client in case vagrant wasn't able to (I think it makes reference to something like this in the docs but can't find it right now) |
I've seen this happen once in awhile and I'm not sure why. If someone can dig deeper and debug this a bit more I'd really appreciate it since I can't often reproduce it. The powershell script is there for you to look at! |
As far as I can tell so far it seems to complete the powershell script successfully, creating the share (can be seen with "net share"). |
Yeah, $result = net share $share_name=$path /unlimited /GRANT:$grant
if ($result -Match "$share_name was shared successfully.") {
exit 0
} However, I added some output right above script_path = File.expand_path("../scripts/set_share.ps1", __FILE__)
# some other stuff here
r = Vagrant::Util::PowerShell.execute(script_path, *args)
machine.ui.output("test") # this is not executed
if r.exit_code != 0
raise Errors::DefineShareFailed,
host: hostpath.to_s,
stderr: r.stderr,
stdout: r.stdout
end |
I added some debug output to the childprocess gem's |
Well after 5 hours of debugging this with no knowledge of Ruby or PowerShell I found the solution is to install PowerShellV3 (since Win7 comes with v2) from here http://www.microsoft.com/en-us/download/details.aspx?id=34595 Now I'm off to see why php suddenly disappeared from my virtual machine... |
Right, upgrading to Powershell v3 does solve the problem with the powershell script not returning. However, now I get the following error instead (after the machine is booted): (JSON::ParserError)6)/Vagrant/embedded/lib/ruby/2.0.0/json/common.rb:155:in `parse': 757: unexpected token at 'C:/Program Files (x86)/Vagrant/embedded/gems/gems/vagrant-1.5.0/plugins/synced_folders/smb/scripts/host_info.ps1 Running that script manually outputs the following (valid) JSON: {
"ip_addresses": [
"192.168.50.172",
"fe80::a190:ae95:cfa1:1834",
"192.168.3.1",
"fe80::7c08:9a7a:605e:5edd",
"192.168.56.1",
"fe80::c183:c7bf:9793:7273",
"192.168.99.1",
"fe80::c0b3:faec:8503:2224"
]
} |
same here - windows 7 professional x64, powershell v2.0 |
This may be a different issue, however I have had PowerShell v3 already installed and I receive the same error as @mzeis. |
Yeah, after the change I made in #3210 I receive the same error as @sskorc and @mzeis.
Error code 1332 with the message "No mapping between account names and security IDs was done.". |
After installing PowerShell v3, I receive the same message as mentioned by @jyggen, @sskorc et al before (but now without setting the log level to debug). After installing Vagrant 1.5.1 and rebooting, the current error is |
Fixed by #3210 |
How do I get this change? I am dead in the water with the same issue. |
try updating powershell to v3.0 (if it's not) from here - http://www.microsoft.com/en-us/download/details.aspx?id=34595 it worked for me |
Appreciate your prompt reply wkiril. I did install powershell and I got past the hanging issue ... I am missing the applying the commit part. Where do I apply it? I have not done it before now and I dont think I have the setup to compile and run vagrant from source. |
actually the file on Windows is located at: HashiCorp\Vagrant\embedded\gems\gems\vagrant-1.5.1\lib\vagrant\util\powershell.rb at line 24 (assuming HashiCorp\Vagrant is your install directory). you don't need to compile anything |
Thanks wkiril. I had a fix a couple more missing cookbooks (as a result of removing berkshelf plugin due to incompatibilities with vagrant 1.5.1) ... but once I fixed them, everything booted up cleanly ... said it mounted my smb drives ... but when I log into the guest box, the mounted drives are empty. Did u have similar problems? |
quick note because I finally got down to this issue after 8 hours of frustration and finally debugging the ruby script enough to figure out what was going on. Was seeing this on vagrant 1.6.2 release, installed powershell v3.0, and it finally started working. There really should be something in the documentation about making sure you have the latest version of powershell during the install process. |
I spent 8 freaking hours figuring this out. Instructions related to working around this bug: hashicorp/vagrant#3139
IMHO PowerShell 3.0 requirement should be stated in SMB docs, this would save me time trying to make SMB work. |
+1, this recommended documentation change would be GREATLY appreciated. wasted an hour on this. |
I have an issue where Vagrant hangs during
vagrant up
right after I've entered the credentials for my Windows account. It's been running for an hour or so no with no sign of wanting to be my friend anytime soon.If I up the log level to debug there seems to be an issue with my Vagrant install being in a path with spaces in it.
Running Windows 7 x64, VirtualBox 4.3.8 and Vagrant 1.5.
The text was updated successfully, but these errors were encountered: