Creating symbolic links within folders shared with the Windows host OS

Solution 1:

Make sure all VMs, as well as the VirtualBox GUI are closed.

Go to where VirtualBox is installed.

In my case, that's C:\Program Files\Oracle\VirtualBox.

There, execute command

VBoxManage.exe setextradata VM_NAME VBoxInternal2/SharedFoldersEnableSymlinksCreate/SHARED_NAME 1

Where VM_NAME is the name you've given the VirtualBox VM and SHARED_NAME is the name you've given the shared folder when you set it up.

E.g. if I have a Virtual machine named Linux, for which I've set up a shared folder SHARED that I can access with ~/SHARED from within the guest, the command will be

VBoxManage.exe setextradata Linux VBoxInternal2/SharedFoldersEnableSymlinksCreate/SHARED 1

Despite this command -- and the way I understand it, depending on your windows version -- you may additionally have to run VirtualBox as administrator to be able to create symlinks.

Tested with Virtualbox Version 5.1.22 r115126 (Qt5.6.2).