vagrant 1.8 fails to mount shared folder specified with UNC path

605 views
Skip to first unread message

Vince Skahan

unread,
Dec 23, 2015, 1:29:07 PM12/23/15
to Vagrant
Running 1.8 on Windows7pro, vagrant seems to be getting confused re: backslashes in shared folder definitions.   Worked under 1.7.4 and earlier.

  • I'm trying to mount a remote \\host.domain\path_here onto /some/local/path in the VM
  • previously, we had to escapebackslashes and double them up ala \\\\host.domain\\path_here in our vagrantfiles
  • now this confuses heck out of vagrant with an error ala:

    There was an error while executing `VBoxManage`, a CLI used by Vagrant
    for controlling VirtualBox. The command and stderr is shown below.

Command: ["sharedfolder", "add", "2850746f-ba92-4866-b3be-7871613e20b0", "--name", "somenamehere", "--hostpath", "\\\\?\\\\\\host.domain\\path_here"]


Stderr: VBoxManage.exe: error: Shared folder path '\\?\\\host.domain\path_here' is not absolute
VBoxManage.exe: error: Details: code E_INVALIDARG (0x80070057), component SharedFolder, interface ISharedFolder, callee IUnknown
VBoxManage.exe: error: Context: "CreateSharedFolder(Bstr(name).raw(), Bstr(hostpath).raw(), fWritable, fAutoMount)" at line 1015 of file VBoxManageMisc.cpp

Worked on 1.7.4, fails on 1.8 so one of them seems to have a bug.

Questions:
  •  is 1.8 broken here ?
  •  how do we specify a UNC name as the target to mount via our Vagrantfile ?
  •  if I mounted the UNC path as a drive under windows ala S:\something, how would I specify that
Using cygwin if that matters...

Vince Skahan

unread,
Dec 29, 2015, 11:07:40 AM12/29/15
to Vagrant
update: 1.8 is definitely broken somewhere - updated to VirtualBox 5.0.10 and still fails.   Reverted to vagrant 1.7.4 and everything works again.

Again - how do we specify a \\server\path\here as the path to mount ?  Using Win7Pro and cygwin as the shell if that matters.

Norman Branitsky

unread,
Feb 9, 2016, 1:28:43 PM2/9/16
to Vagrant
Vagrant 1.8 does appear to be broken.
I'm launching Vagrant from my Z:\ network drive.

Command: ["sharedfolder", "add", "xxxxx", "--name", "vagrant", "--hostpath", "Z:\\"]

Stderr: VBoxManage.exe: error: Shared folder path 'Z:"' is not absolute

Note the spurious " (double-quote) in the folder path above: 'Z:"'.
I tried playing with the following spec in my vagrantfile to no avail:
Neither
config.vm.synced_folder ".", "/vagrant"
nor
config.vm.synced_folder "Z:\\", "/vagrant"
worked.

Norman Branitsky

unread,
Feb 9, 2016, 4:03:20 PM2/9/16
to Vagrant
Uninstalling Vagrant 1.8.1 and installing Vagrant 1.7.4 solved my problem for now -
shared folders mounted correctly.

Vince Skahan

unread,
Feb 9, 2016, 7:45:29 PM2/9/16
to Vagrant
On Tuesday, February 9, 2016 at 1:03:20 PM UTC-8, Norman Branitsky wrote:
Uninstalling Vagrant 1.8.1 and installing Vagrant 1.7.4 solved my problem for now -
shared folders mounted correctly.


yes - I had a coworker verify that 1.8.1 is broken today too.

How can we get this worked in 1.8.real_soon_now by the Vagrant team ? 

Vince Skahan

unread,
Feb 10, 2016, 12:58:07 PM2/10/16
to Vagrant
I tried to open a issue on github for this one - https://github.com/mitchellh/vagrant/issues/7011

Vince Skahan

unread,
May 4, 2016, 3:32:53 PM5/4/16
to Vagrant
On Wednesday, February 10, 2016 at 9:58:07 AM UTC-8, Vince Skahan wrote:
I tried to open a issue on github for this one - https://github.com/mitchellh/vagrant/issues/7011


It's been 4+ months since I reported this in 1.8.0, and 3 months since I reported it in github issues.
What's it take to reach a human to tell when/if this will ever be worked ?

Do 'no' windows users mount shared folders at all ?
 

rossi-fi

unread,
Jul 12, 2016, 11:12:47 AM7/12/16
to Vagrant
Mapping a network drive works:
 
config.vm.synced_folder "X:/some/path", "/some/path"

Mapping a network drive without a folder does not:

config.vm.synced_folder "X:/", "/some/path"

Still figuring out how to map a non-mapped plain UNC path.

rossi-fi

unread,
Jul 12, 2016, 12:50:19 PM7/12/16
to Vagrant
I had a look at the history of vm.synced_folder changes. As you have noticed, mapping UNC shares hasn't worked since 1.7.4 - it's collateral damage from another fix. See your bug report for details.

Right now you'll have to map the network drives to drive letters first - see above.
Reply all
Reply to author
Forward
0 new messages