VirtualBox: issue with symlinks in shared folders

17

Some time ago there was a thread to exact the same problem: Can't create symlinks in virtualbox shared folders. Now it's closed (why?). So I start a new one, because I've got this issue now and cannot find a solution.

Short issue description: By attepms to create/place a symlink in a shared folder an error occurs:

root@devmv:/var/www/sandbox/zf1sandbox# ln -s /lib/ZendFramework/ZF1 ZF1
ln: creating symbolic link `ZF1': Protocol error

I've already tried to activate the symlinks for my shared folder "workspace" in different ways:

C:\Windows\system32>VBoxManage setextradata "Dev VM" VBoxInternal2/SharedFoldersEnableSymlinksCreate/var/www 1
C:\Windows\system32>VBoxManage setextradata "Dev VM" VBoxInternal2/SharedFoldersEnableSymlinksCreate/var/www/ 1
C:\Windows\system32>VBoxManage setextradata "Dev VM" VBoxInternal2/SharedFoldersEnableSymlinksCreate/workspace 1
C:\Windows\system32>VBoxManage setextradata "Dev VM" VBoxInternal2/SharedFoldersEnableSymlinksCreate/workspace/ 1
C:\Windows\system32>VBoxManage setextradata "Dev VM" VBoxInternal2/SharedFoldersEnableSymlinksCreate/M:\workspace 1
C:\Windows\system32>VBoxManage setextradata "Dev VM" VBoxInternal2/SharedFoldersEnableSymlinksCreate/M:\workspace\ 1

I don't get errors like

C:\Windows\system32>VBoxManage setextradata devvm VBoxInternal2/SharedFoldersEnableSymlinksCreate/workspace 1
VBoxManage.exe: error: Failed to create the VirtualBox object!
VBoxManage.exe: error: Code CO_E_SERVER_EXEC_FAILURE (0x80080005) - Server execution failed (extended info not available)
VBoxManage.exe: error: Most likely, the VirtualBox COM server is not running or failed to start.
C:\Windows\system32>VBoxManage setextradata "Dev VM" VBoxInternal2/SharedFoldersEnableSymlinksCreate/workspace 1
VBoxManage.exe: error: Failed to create the VirtualBox object!
VBoxManage.exe: error: Code CO_E_SERVER_EXEC_FAILURE (0x80080005) - Server execution failed (extended info not available)
VBoxManage.exe: error: Most likely, the VirtualBox COM server is not running or failed to start.

but it is still not working.

I've also installed the Oracle VM VirtualBox Extension Pack (can be downloaded here). But it simply doesn't want to work.

Would be great, if someone could help.

Thanks

System parameter:
Host: Winwows 7 64Bit
Guest: Debian 6.0.6 64Bit
VirtualBox: 4.2.6

EDIT:

Some additional information:

C:\Windows\system32>VBoxManage getextradata "Dev VM" enumerate
Key: GUI/LastCloseAction, Value: shutdown
Key: GUI/LastGuestSizeHint, Value: 720,400
Key: GUI/LastNormalWindowPosition, Value: 390,158,1424,819,max
Key: GUI/LastScaleWindowPosition, Value: 640,345,640,480,max
Key: GUI/MiniToolBarAlignment, Value: bottom
Key: GUI/SaveMountedAtRuntime, Value: yes
Key: GUI/ShowMiniToolBar, Value: yes
Key: VBoxInternal2/SharedFoldersEnableSymlinksCreate/M:\workspace, Value: 1
Key: VBoxInternal2/SharedFoldersEnableSymlinksCreate/M:\workspace\, Value: 1
Key: VBoxInternal2/SharedFoldersEnableSymlinksCreate/var/www, Value: 1
Key: VBoxInternal2/SharedFoldersEnableSymlinksCreate/var/www/, Value: 1
Key: VBoxInternal2/SharedFoldersEnableSymlinksCreate/workspace, Value: 1
Key: VBoxInternal2/SharedFoldersEnableSymlinksCreate/workspace/, Value: 1

So, the config changes have been saved. But they don't work.

windows
debian
network-share
virtualbox
symlink
asked on Server Fault Feb 7, 2013 by automatix • edited Apr 13, 2017 by Community

3 Answers

23

It works!

On Windows by default only administrators can create symlinks. When I start VirtualBox as administrator, I can create symlinks without any problems.

In order to be able to create symlinks without starting the VB as admin, you need to set this permission for your user/usergroup. Here is a short how-to.

The only problem is -- I have not found a way to permit creating of symlinks to admin-users. I don't know, whether it's possible.

answered on Server Fault Feb 9, 2013 by automatix • edited Mar 20, 2017 by Community
3

From the documentation:

Starting with version 4.0, VirtualBox shared folders also support symbolic links (symlinks), under the following conditions:

  1. The host operating system must support symlinks (i.e. a Mac, Linux or Solaris host is required).
  2. Currently only Linux and Solaris Guest Additions support symlinks.

Since your host is Windows, symlinks are not supported.

answered on Server Fault Feb 8, 2013 by mgorven • edited Jun 11, 2020 by Community
0

On Linux host I had a similar problem. What I did was make the symlink in the shared folder on the host but pointing to the folder on the guest. The guest then picked this up and ran quite happily. Probably need to work out why I can't do it directly from the guest at some point, but this is a handy quick fix.

eg:

(host:)/var/www/mysharedfolder#ln -s (guest:)/var/www/mylinkedfolder myfolder

answered on Server Fault Sep 12, 2013 by steve

User contributions licensed under CC BY-SA 3.0