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!
source to share
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
- Download and install Linkshell for windows (and the prerequisite package listed) [ direct Link to the actual file I downloaded | direct link to the required package that I downloaded ] Direct link is good for Windows XP64, Windows Vista64, Windows Server, 2003/2008/20012 64bit, Windows 7/8/10 64bit
- Right click on the source folder (in my case the one I copied to google drive) and select the link source for the link
- In the place where you want the "symbolic link" right click and select Drop as -> Hardlink Clone
This is what it took me to get it to work with a vagrant. I initially tried as symlink with no success.
source to share