vagrant synced_folders and VBoxInternal2/SharedFoldersEnableSymlinksCreate

5,268

I answered this question in a different context on Stackoverflow: https://stackoverflow.com/a/21450513/1867779

Here's the summary, assuming Vagrant is making /vagrant the shared folder:

config.vm.provider :virtualbox do |vb|
  vb.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate//vagrant","1"]
end
Share:
5,268

Related videos on Youtube

Hertzel Armengol
Author by

Hertzel Armengol

Updated on September 18, 2022

Comments

  • Hertzel Armengol
    Hertzel Armengol over 1 year

    ok here's the deal

    I'm running vagrant(ubunttu 12.10) on top of windows 8 but everytime I try to create a virtualenv (python) from within my non nfs shared folder I get a 'Protocol error', turns out that virtualbox does not allow sym-linking by default but one can use this to enable it per share

    "VBoxInternal2/SharedFoldersEnableSymlinksCreate/SHARE_NAME", "1"

    the thing is that the latest vagrant no longer accepts a 'name/alias' for my shares, how am I supposed to refer to it from that setting? if my share is /var/www ?

      #   # Use VBoxManage to customize the VM. For example to change memory:
      #   vb.customize ["modifyvm", :id, "--memory", "1024"]
      # end
      #
      # View the documentation for the provider you're using for more
      # information on available options.
      
      vb.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/SHARE_NAME", "1"]
    
    

    any help will be appreciated.

  • SgtPooki
    SgtPooki about 9 years
    I know this is serverfault but this is a perfect example of a still open, and valid, question that we need to show to all the SO haters... Similar question, answer in two spots.. but question and context is different, and so the question is still open 6+ months later. Have an upvote.
  • Bryan
    Bryan about 9 years
    Thanks. I think this is one of those DevOps questions, which intersects across programming, system configuration, and IT. No matter how much ontology people bicker about, I think mutual exclusion cannot be guaranteed between any two StackExchanges.
  • Simon A. Eugster
    Simon A. Eugster almost 8 years
    It seems that current versions of Vagrant automatically add this configuration. When I check it with VBoxManage.exe getextradata Vagrant_minion_1468000220278_59592 enumerate, all shared folders have this flag even without adding it in Vagrantfile.
  • Simon A. Eugster
    Simon A. Eugster almost 8 years
    Instead, vagrant needs to be run as Administrator on Windows: vagrantup.com/docs/synced-folders/smb.html
  • Bryan
    Bryan over 7 years
    SMB is one type of synced folder which only works on Windows. Handy to know using type: "smb" takes some of the effort out, but it is highly limited in its use: i.e. Windows only.