For security reasons, creating symbolic links in a shared folder is disabled in the guest OS (ticket 10085 and manual 5.3 Shared Folders). If you trust your Linux guest OS, you can enable symlinking from the host OS with the following command:
~ $ VBoxManage setextradata "VM_Name" VBoxInternal2/SharedFoldersEnableSymlinksCreate/Folder_Name 1
Replace VM_Name and Folder_Name with your own names. To get a list of names of your virtual machines, execute in the host console:
~ $ VBoxManage list vms
You can also list information about a specific machine with:
~ $ VBoxManage showvminfo "VM_Name"
Now you can start your Linux guest OS and create the symbolic link, in my case I wanted to point my shared folder to the apache directory /var/www/html, e.g.
~ $ sudo ln -s /media/sf_Websites /var/www/html
Note: On a Windows host you need to enable symlinks also on the OS level for the current user, otherwise you have to run VirtualBox with administrator rights, @see How do I create a symlink in Windows
For more info on needing to use Administrator rights, and why that still matters for now, see this VirtualBox ticket #18680: https://www.virtualbox.org/ticket/18680
Also, other links and discussion here: https://askubuntu.com/a/1400544/1583901
Nice tutorial
Thanks for the idea!
However 1 more important thing was not mentioned:
VirtualBox have to be started as Admin after the change.
This is only true for a window host, where creating symlinks is restricted to admins. But you can enable symlinks also for normal users: https://superuser.com/questions/124679/how-do-i-create-a-link-in-windows-7-home-premium-as-a-regular-user#125981