Symlinks within shared folders in VirtualBox: Operation not permitted and Read Only Filesystem

Note: This post is 9 years old. Some information may no longer be correct or even relevant. Please, keep this in mind while reading.

This is not a bug, it is a security feature of Virtual Box. Nevertheless it is annoying when you want to use your virutal system as a build system which needs symlinks in shared folders. To enable symlink creation, do the following:

Shut down your virtual machine, close all VirtualBox windows, including the main GUI window

VBoxManage setextradata MACHINE_LABEL VBoxInternal2/SharedFoldersEnableSymlinksCreate/SHARE_LABEL 1

For example, if your virtual machine is called “Debian Wheezy” (with a space), you have to escape that space with a backslash. In my case, I had to do:

VBoxManage setextradata Debian\ Wheezy VBoxInternal2/SharedFoldersEnableSymlinksCreate/Public 1

To check if your setting has been taken, run

VBoxManage getextradata MACHINE_LABEL enumerate

Restart your virtual machine and creating of symlinks should work. I found that creating hard links still doesn’t work with this method. If anyone knows a fix for hard links, please let me know!

2 thoughts on “Symlinks within shared folders in VirtualBox: Operation not permitted and Read Only Filesystem”

  1. what are we looking for in

    VBoxManage getextradata MACHINE_LABEL enumerate

    to verify settings?

  2. Thank you for your post, it’s very useful. I use it to relate folders from ubuntu to mac, but unfortunately in my mac the symlinks are created but nothing inside.
    Do you have an idea? Thank you very much for your answer!

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.