vbox provider shared folder centos/7 base image

70 views
Skip to first unread message

Chris Schafer

unread,
Mar 14, 2017, 6:43:17 PM3/14/17
to Vagrant
So I am building a cross platform dev env.  Works great on ubuntu and OS X.  Dies on Win 10.  

The first issue is the centos/7 dependancy no rsync for first mount of /vagrant.  

I am attempting to override that as follows:

config.vm.synced_folder ".", "/vagrant", type: "virtualbox"

Which stops the vagrant up process from blowing up but the mount fails.

mount -t vboxsf -o uid=1000,gid=1000 vagrant /vagrant

Blows up.  I have virtual box extensions.  I am at latest vagrant and virtualbox.

The kernel modules are loading but it says something about a device not existing.

So inside virtual box I see the shared folder.  instead of the path being C:\blah\blah\blah

it is \\?\C:\blah\blah\blah.  If I remove the leading \\?  and attempt the mount it works.

Can I create a work around to fix this?  is the leading stuff supposed to work?  Is this  a real bug?

Thanks


Chris Schafer

unread,
Mar 14, 2017, 6:56:08 PM3/14/17
to Vagrant
Shared folders:

Name: 'vagrant', Host path: '\\?\C:\Users\ME\Documents\cent7lamp\platform\build' (machine mapping), writable


==> default: Checking for guest additions in VM...
==> default: Mounting shared folders...
    default: /vagrant => C:/Users/ME/Documents/cent7lamp/platform/build
Vagrant was unable to mount VirtualBox shared folders. This is usually
because the filesystem "vboxsf" is not available. This filesystem is
made available via the VirtualBox Guest Additions and kernel module.
Please verify that these guest additions are properly installed in the
guest. This is not a bug in Vagrant and is usually caused by a faulty
Vagrant box. For context, the command attempted was:

mount -t vboxsf -o uid=1000,gid=1000 vagrant /vagrant

The error output from the command was:

/sbin/mount.vboxsf: mounting failed with the error: No such file or directory

Then if I fix it to this in the gui:

Shared folders:

Name: 'vagrant', Host path: 'C:\Users\ME\Documents\cent7lamp\platform\build' (machine mapping), writable

ME@SOMEBOX ~/Documents/cent7lamp/platform/build (master)
$ vagrant ssh
[vagrant@localhost ~]$ sudo mount -t vboxsf -o uid=1000,gid=1000 vagrant /vagrant
[vagrant@localhost ~]$ df -k
Filesystem                      1K-blocks      Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00  39269648   1216988  38052660   4% /
devtmpfs                           238292         0    238292   0% /dev
tmpfs                              250196         0    250196   0% /dev/shm
tmpfs                              250196      4416    245780   2% /run
tmpfs                              250196         0    250196   0% /sys/fs/cgroup
/dev/sda2                         1038336     90576    947760   9% /boot
tmpfs                               50040         0     50040   0% /run/user/1000
vagrant                         975940604 213848844 762091760  22% /vagrant


Thinus Barnard

unread,
Mar 14, 2017, 7:00:00 PM3/14/17
to Vagrant
We also found that the default share doesn't work in VirtualBox 5.1.16 and removing the "\\?\" makes it work. In VirtualBox 5.1.14 the share also has the "\\?\" prefix but it actually works. So we have rolled back to 5.1.14 for now.

Chris Schafer

unread,
Mar 14, 2017, 7:05:13 PM3/14/17
to vagra...@googlegroups.com
Hey thanks for the quick followup.  I will test that and confirm.  So likely a virtualbox bug?

Thinus Barnard

unread,
Mar 14, 2017, 8:27:21 PM3/14/17
to Vagrant
Dunno if it is a VirtualBox bug. I am fairly new to Vagrant+VirtualBox. The "\\?\" prefix looks weird so I am not sure why it gets constructed like that in the first place. Something seems to have changed between VBox 15.1.14 and 15.1.16 though, whether it is a bug or a *bug fix* I am unsure about.

I had a peek at the Vagrant source and it seems to be calling VBoxManage under the covers when hosted on Windows. I may experiment a bit sometime with creating shares by calling VBoxManage directly and see if I get the same result as Vagrant. Too busy trying to get our deployment stuff working at the moment though.

Chris Schafer

unread,
Mar 14, 2017, 8:34:40 PM3/14/17
to Vagrant
Yeah exactly.  I had considered calling manage to fix it but there is the chicken and egg problem.  Yeah I don't know why they need the alias but I will wait for them to work it out and call it at .14.  Thanks for confirming and pointing me that way.  I can now stop fighting windows.  
Reply all
Reply to author
Forward
0 new messages