Installing symbolic folder in vagrant & virtualbox

Ok, here's my problem: I am using Vagrant with VirtualBox. Host - Windows 8.1, guest - Ubuntu (64 bit). I am trying to use the Windows symbolic folder created by

mklink /j somefolder someotherfolder

      

as a synced folder in Vagrant. In my Vagrantfile, I have

# disable the default synced folder
config.vm.synced_folder ".", "/vagrant", disabled: true
# sync my desired folder
config.vm.synced_folder "./somefolder", "/vagrant"

      

Unfortunately it doesn't work, but it gives the following error:

Failed to mount folders in Linux guest. This is usually because
the "vboxsf" file system is not available. Please verify that
the guest additions are properly installed in the guest and
can work properly. The command attempted was:

mount -t vboxsf -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3`
vagrant /vagrant
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` vagrant /vagrant

The error output from the last command was:

stdin: is not a tty
/sbin/mount.vboxsf: mounting failed with the error: Invalid argument

      

Before you ask: Guest Additions have been added and the regular install folders are working flawlessly.

Is there a way to use symbolic directories as synced folders in vagrant with vbox?

Thank you for your help!

+3


source to share


2 answers


I had a similar problem. I couldn't get Symlinks to work with Vagrant, but Hardlink Clone did. I tried to sync the Dev folder with Google Drive, but I don't want to move the folder.

My solution: Hardlink Clone

pick link source context option



  1. In the place where you want the "symbolic link" right click and select Drop as -> Hardlink Clone

hardlink clone context option

This is what it took me to get it to work with a vagrant. I initially tried as symlink with no success.

0


source


Cut the folder to where you need it from the VM, then create a connection (or symbolic link) in the original location.



0


source







All Articles