How to Create Symlinks in a Folder Shared to VirtualBox via Guest Additions on Windows

Symbolic links in shared folders were disabled on VirtualBox for security reasons. If you are sure the symlinks in your shared folder will not pose a security problem, you can enable them like this:

1. Run the VirtualBox as administrator on Windows.

For me, this was the only way to avoid symbolic link creation errors like:

(source)

Please notice: Maybe on your versions of Windows and VirtualBox this problem was solved already. And you do not need to run the VirtualBox as administrator.

I had this problem on Windows 10 Pro Build 19045.4651, VirtualBox v. 7.0.14.

After your symlink gets created, you can run the VirtualBox not as an administrator again. The already existing symbolic links kept working for me.

2. Get the name of your shared folder:

Get the Shared Folder Name
Get the Shared Folder Name

3. On Windows in the terminal:
Go to the folder where the VirtualBox is installed. And list the virtual machines:

cd C:\Program Files\Oracle\VirtualBox\
VBoxManage list vms

4. In the same folder run the command:

VBoxManage.exe setextradata "Virtual_Machine_Name" VBoxInternal2/SharedFoldersEnableSymlinksCreate/Shared_Folder_Name 1

(source)

For example, in my case the VM name was “wpd_22_04 88” and the shared folder name (see item #2 above) was “projects”. So the command was:

VBoxManage.exe setextradata "wpd_22_04 88" VBoxInternal2/SharedFoldersEnableSymlinksCreate/projects 1

5. Try to create some symlink in your VM terminal to make sure it is possible:

sudo ln -s /opt/projects/myproject/test1.txt /opt/projects/myproject/test2.txt

Please notice: You can find detailed information on sharing a folder to VirtualBox using Guest Additions in this article.

Sergei Korolev
Sergei Korolev
Web developer and the author of all articles on this site. With over 26 years of programming experience, he has specialized in web programming for more than 20 years. He is a Zend Certified Engineer in PHP 5.3 and holds several additional certifications in programming, SEO, web design, UX design, digital marketing, copywriting. You can see his resume here. He is available for remote projects at a rate of $60 USD per hour. You can contact him via this contact form. He currently lives in Belgrade, Serbia.

Leave a Reply

Your email address will not be published. Required fields are marked *