Skip to content

Read-only file system. What's wrong? #713

itsNikolay opened this Issue Feb 5, 2012 · 81 comments

If you are not agains I continue after this discussion:

*** [err ::] creating symbolic link /vagrant/demoapp/current/log'
*** [err ::] : Read-only file system
itsnikolay@itsnikolay-VirtualBox:~/vagrant/1vagrant/projects/demoapp$ ssh vagrant@ 'ln -s /vagrant/demoapp/shared/log /vagrant/demoapp/current/log'
vagrant@'s password:
ln: creating symbolic link
/vagrant/demoapp/current/log': Read-only file system
The same error

Anybody has thoughts about the error, probably you met it before?


The VirtualBox shared folder filesystem doesn't allow symlinks, unfortunately.

Your only option is to deploy outside of the shared folders.

@mitchellh mitchellh closed this Feb 5, 2012
schisamo commented Mar 8, 2012

Since VirtualBox 4.0 this is supported with a few caveats:

Starting with version 4.0, VirtualBox shared folders also support symbolic links (symlinks), under the following conditions:

The host operating system must support symlinks (i.e. a Mac, Linux or Solaris host is required).

Currently only Linux Guest Additions support symlinks.

More info in the VBox Guest Additions documentation.

Although this appears to be broken with VirtualBox 4.1.8! :rage:


Thanks for answer.
It brings new features in vagrant.

schisamo commented Mar 9, 2012

So I did find a workaround to make this all work on VirtualBox 4.1.8+ again. Basically you need to issue this command:

VBoxManage setextradata VM_NAME VBoxInternal2/SharedFoldersEnableSymlinksCreate/SHARE_NAME 1

You can do this in the context of Vagrant by adding this to the block of your Vagrantfile:

config.vm.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/SHARE_NAME", "1"]

More information can be found on VirtualBox bug #10085.

Please note the commenter that shares the setextradata trick forgets to tell you the key name requires the SHARE_NAME. I found this out digging through the C code! :smiley:


Oh, Master!

divoxx commented Apr 12, 2012

I can't make this trick work. Is it still doable? Any other workaround?

Bartzy commented Apr 12, 2012

@divoxx: Did you replace SHARE_NAME with the name of the Virtualbox share you want this to be enabled for?


Does anyone know what the share name is for vagrant by default?

divoxx commented May 4, 2012

Its v-root


@divoxx Thanks!

till commented Jun 9, 2012

This works perfectly for symbolic links. Maybe this could be included by default? (cc @mitchellh)

Does anyone have a fix for hardlinks?


Thanks man, this works perfectly!


Please include this in the default vagrant package or least put a notice somewhere in docs!


ZeusTheTrueGod +1

rjmunro commented Oct 16, 2012

Just to be clear, the fix for this is to put:

config.vm.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]

in the Vagrantfile (for the default share that gets mounted at /vagrant)

jaypea commented Oct 17, 2012

is there a chance that vagrant would change this setting by default?


anyone have any ideas what to do if the host is windows? I'm on a Mac but some of my colleagues will be using windows :(

jaypea commented Oct 28, 2012

it works on windows too. vagrant need to be run with administrator priviledges.


I can't get this fix to work in VirtualBox 4.2.4.

illepic commented Dec 3, 2012

Same as @tenaciousflea above me, this appears to not work in VirtualBox 4.2.4 with all Guest Additions updated to 4.2.4.

@howardroark howardroark referenced this issue in pypa/virtualenv Dec 4, 2012

OSError: [Errno 30] Read-only file system #209


@rjmunro Thanks for specifying! It was difficult to find documentation on what SHARE_NAME should be, and this worked for me with VirtualBox 4.2.6.


Thanks man!


Using ...

config.vm.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]

... on Vagrant 1.0.6 with VirtualBox 4.2.6 on a Mac OSX Mountain Lion machine continues to result in failed symlink creation. Backing out and attempting to use the direct VirtualBox command gives no errors and appears to set the permission, but attempting to create symlinks continues to fail.

Are there any additional suggestions in relation to this issue?


I'm happy to say I finally made this a default. It'll be released with Vagrant 1.1.


I added this line to the block of my Vagrantfile:

config.vm.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]

I'm getting a slightly different error now, instead of "read only file system", I get a protocol error.

ln: failed to create symbolic link `': Protocol error

lixef commented Feb 13, 2013

Big thanks @schisamo for this hint.
Sounds good @mitchellh :)


This trick

config.vm.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]

totally did it for me! Thanks.


@schisamo Thanks bro!

brugnara commented Mar 5, 2013

You saved my day. Many thanks for "config.vm.customize [...]" trick.


I have the same issue as @kahlstrom
On a OS X Lion 10.8.2, with Vagrant 1.0.6, VirtualBox 4.2.6 and a ubuntu server guest, this is not working:
config.vm.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]

Symlink inside the share /vagrant are still in red and are not working


This issue still persists when using Windows 8x64, Vagrant 1.0.6 and Virtualbox 4.2.6 and 4.2.8.
It appears that even after reloading the vm

C:\Program Files\Oracle\VirtualBox>VBoxManage getextradata :id ENU
No value set!

Weirdly, running the VboxManage command to set the extra data fails as well:

VBoxManage setextradata :id VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root

VBoxManage.exe: error: Failed to create the VirtualBox object!
VBoxManage.exe: error: Code CO_E_SERVER_EXEC_FAILURE (0x80080005) - Server execu
tion failed (extended info not available)
VBoxManage.exe: error: Most likely, the VirtualBox COM server is not running or
failed to start.

(Command found:!!mine&t%5B%5D=!!bookmarks)

Has anyone found a solution? For now, I will be using some tricks to get node_modules working properly.

jrnt30 commented Mar 10, 2013

I was able to the sym links working properly with the associated command after reading the blog post you listed. The trick for me was starting the cmd prompt as admin and running VirtualBox GUI as admin.

I'd also like to point out, which I'm fairly sure you know, that the ":id" should be replaced by whatever your Vagrant box's name was created as. The easiest way to find that I know of is to simply open the VirtualBox GUI.


vm.customize method does not seem to work in 1.1.5. Is there a equivalent in 1.1.5, really need this to work...

lixef commented Apr 6, 2013

@eleventigers instead of config.vm.customize you need to configure it in the provider block for 1.1.x according to

This means:

config.vm.provider "virtualbox" do |v|
  v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/SHARE_NAME", "1"]

@lixef great, thank you!

schacki commented Apr 18, 2013

Hi all,
I am using version 1.21 and added the following code to my Vagrantfile:
config.vm.provider :virtualbox do |vb|
vb.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]
Unfortunately, I still get the Protocol Error, when creating symlinks. Do I miss anything?


Can you try like this:

config.vm.provider "virtualbox" do |v|
  v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]
schacki commented Apr 19, 2013

unfortunately, still no luck, same error

schacki commented Apr 24, 2013

Any help would be appreciated

rjmunro commented Apr 24, 2013

The share name has changed in 1.1 and above to vagrant-root instead of v-root.


config.vm.provider "virtualbox" do |v|
  v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/vagrant-root", "1"]
schacki commented Apr 29, 2013

me again. I do not want to get a pain, but at the moment, I cannot work with python virtualenvs, which makes vagrant unusable for me. So are there any further options? And again: is ":id" supposed to be substituted with some real value or will that be done by vagrant automatically.


@schacki, for whatever it's worth, my Vagrantfile looks like this: do |config|
    config.vm.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]

(I did not substitute ":id" with a real value.)

schacki commented Apr 30, 2013

still no luck

trex005 commented May 1, 2013

Just wondering if there has been any progress on this front. I actually just learned about vagrant today after getting very frustrated with my own virtualbox configurations. I was really hoping this was going to be one of the issues I'd be able to avoid.

schacki commented May 1, 2013

I only started using it lately, and am quite impressed. Even the shared folders worked out of the box - but only with read access and so far, I could not find anything to fix that ...

trex005 commented May 1, 2013

Alright guys, I did all of the following and then symlinks started working :
1) Added these lines to my config :
config.vm.provider "virtualbox" do |v|
v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/vagrant", "1"]
(Notice how I used the mounted name, and not the share name)
(Yes, I know this is supposed to default correctly but it was not working for me)
2) ran this command in an admin command prompt on windows :
fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
4) 'vagrant up' from an admin command prompt

Please, PLEASE someone try to reproduce to make sure this works. with the hundreds of other attempted solutions over many hours I can't be certain there was not something else contributing to the WIN.


@trex005 your solution works for me, even without restarting the host machine, and without running vagrant up from admin prompt.
On Windows 8x64 Vagrant 1.22

schacki commented May 2, 2013

@trex005 you just made my day, I got it working by following 1-4 ( @wcdolphin shortcut did not work for me)

Now I am wondering,
a) Is there now a way do get the final solution working without admin prompt?
b) Is this a general problem (if so, why are only a few people affected) or is it a very special case (if so, what is so special from all the other machines/setups that seem to be working)
c) Should that be added to the docs somewhere?

Thanks a lot

@Schpidi Schpidi added a commit to Schpidi/vagrant that referenced this issue Oct 23, 2013
@Schpidi Schpidi Automatically enable symlinks on vboxsf for VirtualBox 4.1 (see #713
…and 387692f).
xiankai commented Nov 5, 2013

@trex005 Thanks very much, your solution worked! (without the reboot part)

Remownz commented Nov 12, 2013

@xiankai: which version of vagrant and vbox do you use? i still get error:
ln: failed to create symbolic link `./dir': Read-only file system

xiankai commented Nov 13, 2013

@Remownz using Vagrant 1.2.2 and VirtualBOx 4.2.16. Hope that helps!

Remownz commented Nov 14, 2013

@xiankai : made my day, thank you!


The only way I make it work for my case is by running Vagrant as administrator.
VirtualBox: 4.2.18 r88780
Windows 7
Vagrant 1.3.5

I am running vagrant from git-bash, I opened git-bash as administrator. Make sure no virtual box processes are running, like: VBoxSVC.exe, if yes kill all VBox related processes.

SharedFoldersEnableSymlinksCreate && fsutil did not help, I tried with and without them no difference. I am not using VBox 4.3.2 because it did not work with vagrant 1.3.5.

Hope this helps somebody.

@paulfurley paulfurley added a commit to gds-attic/pp-development that referenced this issue Dec 9, 2013
@paulfurley paulfurley Fix Vagrant file on Ubuntu with extra VM config
On the following two Ubuntu systems, the "vagrant up" command failed
with an issue related to symlinks in Shared folders.

- Ubuntu 12.04 with vagrant-1.3.5 and VirtualBox 4.1.12
- Ubuntu 13.10 with vagrant-1.3.5 and Virtualbox 4.2.16

See the following discussion and fix:
- rodjek/librarian-puppet#57
- mitchellh/vagrant#713
@paulfurley paulfurley referenced this issue in gds-attic/pp-development Dec 11, 2013

Fix Vagrant file on Ubuntu with extra VM config #11


Thank You Iaithshadeed! first answer that worked!

Windows 7

Also running vagrant from git-bash.

@joeyespo joeyespo referenced this issue in gratipay/ Jan 13, 2014

Vagrant Issues #1887

@crankeye crankeye added a commit to crankeye/vagrant-symfony that referenced this issue Feb 17, 2014
@crankeye crankeye Update Vagrantfile
Correcting a typo for enabling the symbolic links in windows. This will allow a Windows host to create symbolic links in the shared folder after running (as administrator):
"fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1". See mitchellh/vagrant#713
@jb510 jb510 referenced this issue in Varying-Vagrant-Vagrants/VVV Feb 25, 2014

handling sysmlinks for vvv-hosts #224


Any pointers on how to get this working for Vagrant running on Mac/Linux?

rjmunro commented Feb 26, 2014

@paulfurley @keithxm23 You can use the vagrant-vbguest plugin to check that automatically.

alvinteh commented Mar 3, 2014


Thanks for your solution. Worked for me on the following configuration:

Vagrant 1.4.3
VirtualBox 4.3.8
Windows 8.1 x64
Like @schacki, the "shortcut" posted by @wcdolphin did not work for me.

@jgoux jgoux referenced this issue in fideloper/Vaprobash Mar 4, 2014

npm and Windows host paths length #183

@JacobDorman JacobDorman added a commit to JacobDorman/protobox-web that referenced this issue Mar 23, 2014
@JacobDorman JacobDorman Removed SharedFoldersEnableSymlinksCreate from synced folder config
- wrong share name (v-root)
- default since 1.1 mitchellh/vagrant#713
@jtreminio jtreminio added a commit to puphpet/puphpet that referenced this issue Aug 8, 2014
@jtreminio jtreminio Removes "setextradata" key for Virtualbox. Closes #1002
Per mitchellh/vagrant#713 (comment)
this feature is now enabled by default.
jhofer commented Nov 2, 2014

You have to run VirtualBox as Administrator otherwise you still get the protocoll error

@jberger jberger referenced this issue in TechEmpower/FrameworkBenchmarks Nov 6, 2014

Vagrant guest cannot create hardlink #1202

stalal commented Nov 8, 2014

@trex005 : You're a life saver. The solution worked for me on the following configuration:

Virtualbox 4.3.18
Vagrant 1.6.5
Windows 7 x86

jesalg commented Dec 1, 2014

@trex005 You saved the day! Thank you!

My config:
Virtualbox 4.3.18
Vagrant 1.6.3
Windows 8.1 x64

tacoben commented Dec 4, 2014

can anyone show me / point to how to find ANY share name? I dont use the default often, and I suspect that this is hurting me.

iwanwan commented Jan 8, 2015

Not work, I try like this on my Vagrantfile

  config.vm.provider "virtualbox" do |v|
    v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]

it return

* The following settings shouldn't exist: customize

I have the same problem as @iwanwan. @trex005's solution doesn't work for me either.

Running Vagrant 1.6.5 on Mac OS X Yosemite.


Same Problem for me.

* The following settings shouldn't exist: customize```

Can't get this to work. Is anyone able to help me out?

I have following setup:

Windows 8.1
Vagrant 1.7.4
VirtualBox 5

I have multiple shared folders like this:

config.vm.synced_folder "../webapp", "/srv/webapp", type: "smb"
config.vm.synced_folder "../backend", "/srv/backend", type: "smb"

For the webapp I use nodejs, when I install node packages using npm it tries to create symlinks and fails with the following error.

vagrant@devenvbk:/srv/webapp$ npm install --save-dev gulp
npm ERR! Linux 3.2.0-4-amd64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "--save-dev" "gulp"
npm ERR! node v0.12.7
npm ERR! npm  v2.11.3
npm ERR! path ../user-home/cli.js
npm ERR! code ENOTSUP
npm ERR! errno -95

npm ERR! nospc ENOTSUP, symlink '../user-home/cli.js'
npm ERR! nospc This is most likely not a problem with npm itself
npm ERR! nospc and is related to insufficient space on your system.

npm ERR! Please include the following file with any support request:
npm ERR!     /srv/webapp/npm-debug.log

Also tried to manually create a symlink using ln -s but that also fails with following output.

ln: failed to create symbolic link `test': Operation not supported

So it seems the symlinks are not working for me out of the box. Any ideas on what I can try to solve this?

jesalg commented Aug 12, 2015

@marcofranssen Try adding this to your Vagrantfile:

config.vm.provider "virtualbox" do |v|
  v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/vagrant", "1"]

Following command works on VirtualBox 4.3.28

VBoxManage setextradata centos-mp_1 VBoxInternal2/SharedFoldersEnableSymlinksCreate/git 1

centos-mp_1 is my vm name, git is my share folder name. After restart the Virtalbox, it works.
By the way, this command could be executed in install dir.


So based on this

config.vm.synced_folder "../webapp", "/srv/webapp", type: "smb"

What is the name of the shared folder?


@marcofranssen I don't know your share folder but these ../webapp, /srv/webapp are not like names of share folder. Follow is my share folder setting.
'E:/work/git' is the real dir, and the 'git' is the share folder name. I have executed the command and it works as expected. Don't forget to restart your Virtualbox finally.

VBoxManage setextradata centos-mp_1 VBoxInternal2/SharedFoldersEnableSymlinksCreate/git 1

This solution is not for vagrant - virtualbox. Actually I don't know too much about vagrant. Sorry for any misunderstand.


Somehow the shared folders created with vagrant don't show up in the Virtualbox UI. Any ideas on how I can get my hands on the shared folder names created using Vagrant?


I can't get it to work using:

  config.vm.provider :virtualbox do |vb|
      vb.customize ["modifyvm", :id, "--memory", 2048]
      vb.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/vagrant", "1"]


Ubuntu 14.04
Vagrant 1.7.4
VirtualBox 4.3.16

I try doing creating the symlink with python 2.7.6 and but i get a OSError: [Errno 1] Operation not permitted.

Any ideas?


Note that symbolic links appear to have been broken in VirtualBox 5 on Windows. See this vagrant issue.

In addition to some combination of the solutions mentioned above, downgrading to VirtualBox 4.3.3 was also required for me to get symbolic links working in shared folders.

@nivl4 nivl4 added a commit to nivl4/habitrpg that referenced this issue Oct 24, 2015
@nivl4 nivl4 Remove vagrant customization that enables symlinks in /vagrant shared…
… folder, at that is the default behavior of vagrant since 1.1. (mitchellh/vagrant#713 (comment))

I can confirm being able to create and browse symlinks inside the /vagrant shared folder using @trex005 method above on the following configuration:

Host OS: Windows 10
VirtualBox: 5.0.10 r104061
Vagrant: 1.7.4 (self-patched #6493 to re-enable UNC filepath on windows -> this may not be necessary!)

Guest OS: Ubuntu/trusty64

What is not working is creating symlinks inside synced_folders that are synced via smb!

@marcofranssen: you can get the names of the shares via 'net share' on the windows command prompt (as you mentioned correctly they are not shown within virtualbox manager).

Nevertheless using the sharename of an smb share together with

v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/<SMBShareName>", "1"]

does not work as those shares are mounted as cifs shares instead of vboxsf shares (like /vagrant is) inside the guest OS.

Symlinks for synced_folders that are using vboxsf in the guest OS are working on my system
Symlinks for synced_folders that are using cifs in the guest OS are not working on my system


ok, finally got this working on a windows 10 host, without having to enable symlinks outside the vagrant box.

use type "smb" for the synced folder, force smb3 and mfsymlinks as mount options and everything works fast and like a breeze on windows 10:

config.vm.synced_folder "../.", "/var/www", type: "smb", mount_options: ["vers=3.02","mfsymlinks"]

Important: the linux guest must have a kernel version >= 3.18, otherwise mfsymlinks does not work.

pYr0x commented Jan 7, 2016

@Perni1984 i tried your solution. unfortunately it is not working for me.

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:


The error output from the last command was:

stdin: is not a tty
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

i have no passwort for my windows user. so i skip the prompt when i was asking:

default: You will be asked for the username and password to use for the SMB
default: folders shortly. Please use the proper username/password of your
default: Windows account.
default: Username: MYUSERNAME
default: Password (will be hidden):

@pYr0x: reading mount permission denied means for me that mount.cifs cannot connect to the host System.

I suppose you have Windows 10, and I read here on Github that Microsoft made Windows 10 more "secure" by disabling insecure guest Access per default. On the following links you can find an Explanation:

I guess there are two ways to solve this Problem:
1. put a Password to your Default user (I would prefer this one)
2. allow insecure guest Access as described in the link above.

Important, make sure your the Linux kernel of your guest OS is > 3.18, otherwise you won't have emulated symlink Support.

jaywhy13 commented Jan 8, 2016

:( I still can't get it to work for me. I'm trying to share a folder from the VM to my host OS. I'm running Mac OS X It shows up as invalid in Mac OS 10.11.1 with a Ubuntu 14.04 VM.
I have the following in my configuration:

  config.vm.provider "virtualbox" do |vb|
    vb.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/vagrant", "1"]
    vb.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]
    vb.memory = "768"

I've tried both vagrant and v-root. Nothing works. I'm using Vagrant 1.7.4 and VirtualBox 5.0.10

maoizm commented Jan 27, 2016

@Perni1984 Seems that your solution works only if I run vagrant as Administrator, otherwise I get error message from Vagrant.

Host: Windows 10 x64, Vagrant 1.8.1, Virtualbox 5.0.10
Guest: ubuntu/trusty32


@maoizm: you are right, to use smb for the synced Folders, vagrant has to be run as Administrator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.