-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Read-only file system. What's wrong? #713
Comments
The VirtualBox shared folder filesystem doesn't allow symlinks, unfortunately. Your only option is to deploy outside of the shared folders. |
Since VirtualBox 4.0 this is supported with a few caveats:
More info in the VBox Guest Additions documentation. Although this appears to be broken with VirtualBox 4.1.8! 😡 |
Thanks for answer. |
So I did find a workaround to make this all work on VirtualBox 4.1.8+ again. Basically you need to issue this command:
You can do this in the context of Vagrant by adding this to the
More information can be found on VirtualBox bug #10085. Please note the commenter that shares the |
Oh, Master! |
I can't make this trick work. Is it still doable? Any other workaround? |
@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? |
Its v-root |
@divoxx Thanks! |
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 |
Just to be clear, the fix for this is to put:
in the Vagrantfile (for the default share that gets mounted at /vagrant) |
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 :( |
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. |
Same as @tenaciousflea above me, this appears to not work in VirtualBox 4.2.4 with all Guest Additions updated to 4.2.4. |
@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 Vagrant::Config.run 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 `local_settings.py': Protocol error |
Big thanks @schisamo for this hint. |
@marcofranssen Try adding this to your Vagrantfile:
|
Following command works on VirtualBox 4.3.28
centos-mp_1 is my vm name, git is my share folder name. After restart the Virtalbox, it works. |
So based on this
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.
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:
on
I try doing creating the symlink with 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. |
… folder, at that is the default behavior of vagrant since 1.1. (hashicorp/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 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
does not work as those shares are mounted as cifs shares instead of vboxsf shares (like /vagrant is) inside the guest OS. Summarizing: |
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:
Important: the linux guest must have a kernel version >= 3.18, otherwise mfsymlinks does not work. |
@Perni1984 i tried your solution. unfortunately it is not working for me.
and
i have no passwort for my windows user. so i skip the prompt when i was asking:
|
@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:
Important, make sure your the Linux kernel of your guest OS is > 3.18, otherwise you won't have emulated symlink Support. |
:( 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've tried both vagrant and v-root. Nothing works. I'm using Vagrant 1.7.4 and VirtualBox 5.0.10 |
@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 |
@maoizm: you are right, to use smb for the synced Folders, vagrant has to be run as Administrator. |
I can't believe this issue still persists! |
Virtualbox 5.1.22-win.exe Host: Windows 7 On Windows Host, run VirtualBox as Administrator, and then login to the vm Guest OS, and create a symblic link in shared folder in /media/sf_tmp, pops out errors "Failed to create symbolic link 'xxx': Read-only file system" |
I found a workaround by using bind mounts in Linux. I'm running into this issue with a node project where npm wants to use symlinks when it installs modules. (and the no-bin-links setting doesnt catch everything) So I create a node_modules directory in the vagrant user home dir (an actual VM filesystem). Then I mount it on top of the node_modules on the vagrant shared fs.
I put this in a provision always shell script in my vagrant file This has a similar effect as if I had symlinked it to the local filesystem. The main drawback is that contents of the node_modules is not visible to the host system. |
I got this message running macOS host with a Linux guest when I was trying to symlink to another file in the in the shared folder from the guest. Thinking it over, I guess it makes sense that would never really work. I used a relative path symlink inside the host instead to address it. Keep the docs in mind on whether symlinks are supported https://www.virtualbox.org/manual/ch04.html#sharedfolders especially (as noted above):
|
Worked for me: My config : |
EDIT: |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
If you are not agains I continue after this discussion:
http://stackoverflow.com/questions/9150732/capistrano-deploy-in-virtual-machne
*** [err :: 33.33.33.10] creating symbolic link
/vagrant/demoapp/current/log' *** [err :: 33.33.33.10] : Read-only file system and itsnikolay@itsnikolay-VirtualBox:~/vagrant/1vagrant/projects/demoapp$ ssh vagrant@33.33.33.10 'ln -s /vagrant/demoapp/shared/log /vagrant/demoapp/current/log' vagrant@33.33.33.10's password: ln: creating symbolic link
/vagrant/demoapp/current/log': Read-only file systemThe same error
Anybody has thoughts about the error, probably you met it before?
The text was updated successfully, but these errors were encountered: