Search code examples
windowsnetwork-programmingvagrantsambavagrantfile

Vagrant on Windows and access to shared folders


I'm working with Vagrant to leverage development environments for my developer teams. Their host OS is Windows, the Vagrant development box is Ubuntu. But most important, our boxes will be stored on our NAS, in folder shared with samba.

My own PC runs Fedora, and my Vagrant file contains this code:

config.vm.box_url = "smb://<nas>/boxes/ubuntu-1404-64.box"

From Fedora, this works. From Windows, this doesn't with the following error:

protocol smb not supported or disabled in libcurl

I've tried on Windows with file://, but this logically doesn't work. So, here I am, looking for a good solution. I know a possible workaround is to mount the network share on each Windows PC, but I don't like this solution.

Any idea? Thanks.


Solution

  • I'm not sure what's the status now, but in the past you could've done it by using file:////server/path/file, not sure if its still possible.

    P.S #1 box_url setting can be an array of possible URLs. So try just putting all possible combination for every OS there to create multiplatform Vagrantfile.

    P.S #2 We solved this by hosting the box over local httpd and not using NFS/SMB.