Issue mounting a shared folder using Windows 7 SP1 using Vagrant 1.7.4

442 views
Skip to first unread message

Ben Salem

unread,
Jul 31, 2015, 9:52:35 AM7/31/15
to Vagrant
I've been trying to get a basic coreOS box up and running with a shared directory for the past day or so, but I've run into a couple of roadblocks, and I haven't been able to find an answer to this one online! I upgraded to Powershell 3.0 to get rid of the first issue I was seeing (a hang right after trying to name the box) and now I'm seeing the following problem!

The line that I'm using to create the synced folder is:

     # Attempt to make synced dir
      config.vm.synced_folder ".", "/home/core/dev", id: "core", :nfs => true, :mount_options => ['nolock,vers=3,udp']    

The error that I see when running normally is:
c:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/guests/linux/cap/c
hoose_addressable_ip_addr.rb:7:in `block in choose_addressable_ip_addr': undefined method `each' for nil:NilClass (NoMethodError)

Turning on debug spew gives me the following:
DEBUG subprocess: stderr: Get-NetIPAddress : The term 'Get-NetIPAddress' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of
the name, or if a path was included, verify that the path is correct and try
again.
At C:\HashiCorp\Vagrant\embedded\gems\gems\vagrant-1.7.4\plugins\synced_folders
\smb\scripts\host_info.ps1:3 char:8
+ $net = Get-NetIPAddress | Where-Object {
+        ~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Get-NetIPAddress:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Tracking that down led me to discover that Powershell 3.0 doesn't actually have the Get-NetIPAddress scriptlet installed on Win7 SP1, nor does it support it, which is problematic. I know other vagrantfiles I've used in the past (not authored by me) have worked doing this exact thing on Win7, but I don't know what they've done differently. Would anyone happen to have any advice on getting this up and running?

Thanks!

Alvaro Miranda Aguilera

unread,
Jul 31, 2015, 9:25:52 PM7/31/15
to vagra...@googlegroups.com
Hello

what is windows? the host or the client?

NFS works easily on unix systems, but is not straightforward on
windows (either server or client)

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 vagrant-up+...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/vagrant-up/04204194-783f-4128-b079-bc7ae412fb0b%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Ben Salem

unread,
Aug 3, 2015, 9:53:38 AM8/3/15
to Vagrant
Hi!

The host machine is running win7 - I would like the VM itself to be coreos. I've tried using SMB as well, but seem to get the same issue there when I do so.

Alvaro Miranda Aguilera

unread,
Aug 3, 2015, 8:44:17 PM8/3/15
to vagra...@googlegroups.com
Have you tried rsync?

There are some past emails with formulas that works. (rsync on Windows)

I think that will be the simple way
> https://groups.google.com/d/msgid/vagrant-up/4457d9e0-eeb6-43a0-a839-ef3a98f59d5e%40googlegroups.com.

Jegadheswaran Palanisamy

unread,
Sep 1, 2015, 2:43:04 PM9/1/15
to Vagrant
Hi All,

anyone fixed this error ?

C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/guests/linux/cap/choose_addressable_ip_addr.rb:7:in `block in choose_addressable_ip_addr': undefined method `each' for nil:NilClass (NoMethodError)

am facing the above error ... when i try to spin up a AWS EC2 box from my windows vagrant ... 

not sure something messedup bcz of the below powershell issue :(

DEBUG subprocess: stderr: Get-NetIPAddress : The term 'Get-NetIPAddress' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
DEBUG subprocess: stdout: {     "ip_addresses":  null }


Jega

Jegadheswaran Palanisamy

unread,
Sep 1, 2015, 2:50:12 PM9/1/15
to Vagrant
Hi Ben.

did you solved this issue ? . am facing the same issue which you are faced ...
kindly post if you have short it out already 

Jega

Alvaro Miranda Aguilera

unread,
Sep 1, 2015, 4:06:05 PM9/1/15
to vagra...@googlegroups.com
Hello,

Does your Windows VM have Powershell installed? Is the current/latest version?

The error is coming from Windows (host?)
> https://groups.google.com/d/msgid/vagrant-up/9cc2e57b-f8a8-4733-9384-b83c5ea88bed%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages