I using Virtual box + gem Vagrant
One week before everything works well.
I had packaged my box. And now I've deployed the box again with the same project.
and Capistrano has outputted error:
*** [err :: 33.33.33.10] creating symbolic link `/vagrant/demoapp/current/log'
*** [err :: 33.33.33.10] : Read-only file system
https://gist.github.com/1746250 (error + deploy.rb)
I have set sudo chmod 777 -R 1vagrant/
But it still doestn't work.
What happen?
There is a workaround to make symlinks in shared folders 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 Vagrant::Config.run
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!
Official answer of Vagrant gem's author:
The VirtualBox shared folder filesystem doesn't allow symlinks, unfortunately.
Your only option is to deploy outside of the shared folders.
https://github.com/mitchellh/vagrant/issues/713
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With