Capistrano Deploys in Virtual Machne

I am using Virtual box + gem Vagrant
A week before everything will be fine.
I packed my box. And now I again expanded the window with the same project.

and Capistrano throws an 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 installed sudo chmod 777 -R 1vagrant /
But it still does not work.

What will happen?

+4
source share
3 answers

The official answer of the Vargan pearl by

A file system with a VirtualBox shared folder, unfortunately, does not allow symbolic links.

The only option is to deploy outside of public folders.

https://github.com/mitchellh/vagrant/issues/713

+2
source

There is a workaround for symbolic links in shared folders to work again on VirtualBox 4.1.8+. Basically you need to run this command:

 VBoxManage setextradata VM_NAME VBoxInternal2/SharedFoldersEnableSymlinksCreate/SHARE_NAME 1 

You can do this in the Vagrant context by adding this to the Vagrant::Config.run your Vagrantfile:

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

More information can be found on Error VirtualBox # 10085 .

Note that the commenter who shares the setextradata trick forgets to tell you that the key name requires SHARE_NAME . I found this digging C code !

+7
source

Are you using VirtualBox 4.1.8? Going to VirtualBox 4.1.6 solved the problem for me.

0
source

Source: https://habr.com/ru/post/1394878/


All Articles