Cygwin, Vagrant and Windows 10

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Cygwin, Vagrant and Windows 10

Rod Oliver
I'm running Cygwin (updated), Vagrant (latest) & VirtualBox on Windows 10. Vagrant up on a Windows command shell works just fine. When I do the same thing in a Cygwin terminal I get the error below.

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/xenial64' is up to date...
C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/util/platform.rb:164:in `open': Permission denied @ dir_initialize - C:/Documents and Settings (Errno::EACCES)
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/util/platform.rb:164:in `entries'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/util/platform.rb:164:in `block in fs_real_path'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/util/platform.rb:163:in `each'

If I run the Cygwin terminal as administrator the error doesn't come. However when I try to access the box I get an error that the key isn't found I guess Vagrant is using a wrong path with Cygwin but not natively in Windows.

D069683@WDFN34201151A ~/Projects/Ubuntu
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/xenial64' is up to date...
==> default: Configuring proxy for Apt...
==> default: Configuring proxy environment variables...
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.

D069683@WDFN34201151A ~/Projects/Ubuntu
$ vagrant ssh
Warning: Identity file C:/Documents not accessible: No such file or directory.
ubuntu@127.0.0.1's password:


Any ideas what I should do?

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/00d93337-f153-4feb-8db0-ab1da9abfe80%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Cygwin, Vagrant and Windows 10

Alvaro Miranda Aguilera
Hello,

Looks like the home directory from cygwin is being set to C:/Documents and Settings and the process is failing to create directories there.

Can you open cmd.exe, go to your home directory, cd into .vagrant.d and get the full path.

Then, on Cygwin, set the variable VAGRANT_HOME to this same path.

be sure you can do cd $VAGRANT_HOME so you can confirm is properly set.

Then try the command again.

In windows, for some reason, sometimes the home directory change, has something to do with profiles, and other stuff.

However, if this work, then you can just put this variable in .bash_profile in your home directory, and will be used on new logons.

Alvaro.

On Fri, Apr 28, 2017 at 9:38 AM, Rod Oliver <[hidden email]> wrote:
I'm running Cygwin (updated), Vagrant (latest) & VirtualBox on Windows 10. Vagrant up on a Windows command shell works just fine. When I do the same thing in a Cygwin terminal I get the error below.

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/xenial64' is up to date...
C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/util/platform.rb:164:in `open': Permission denied @ dir_initialize - C:/Documents and Settings (Errno::EACCES)
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/util/platform.rb:164:in `entries'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/util/platform.rb:164:in `block in fs_real_path'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/util/platform.rb:163:in `each'

If I run the Cygwin terminal as administrator the error doesn't come. However when I try to access the box I get an error that the key isn't found I guess Vagrant is using a wrong path with Cygwin but not natively in Windows.

D069683@WDFN34201151A ~/Projects/Ubuntu
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/xenial64' is up to date...
==> default: Configuring proxy for Apt...
==> default: Configuring proxy environment variables...
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.

D069683@WDFN34201151A ~/Projects/Ubuntu
$ vagrant ssh
Warning: Identity file C:/Documents not accessible: No such file or directory.
[hidden email]'s password:


Any ideas what I should do?

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/00d93337-f153-4feb-8db0-ab1da9abfe80%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0ez92t%3D9ZN8B2tGjvBehCAYRNChnJgrh%3DdEhS55US8ALtw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.