18

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.

3
  • 8
    Four downvotes and no one comment. Why has this question been downvoted? I could improve it, but I first have to know, what's wrong with it.
    – automatix
    Jul 1, 2013 at 7:55
  • 2
    I agree it belongs here so here it goes my upvote Nov 29, 2016 at 9:52
  • For me, running as administrator was not enough, and I still got "Protocol error" when trying to create symlinks. Here was what worked: stackoverflow.com/a/60741351/470749
    – Ryan
    Mar 18, 2020 at 14:17

3 Answers 3

24

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.

1
  • 1
    Even allowing the group "Everyone" in the policy, I was not able to achieve it without running the machine as administrator. Running vagrant up from an administrative console solved my problem. Apr 2, 2016 at 20:30
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.

5
  • Thank you for reply, but "Windows 7 and Windows Vista support symbolic links for both files and directories" (Wikipedia).
    – automatix
    Feb 8, 2013 at 20:23
  • @automatix The documentation states that only Mac, Linux and Solaris hosts are supported, so I'd guess that it hasn't been implemented for Windows.
    – mgorven
    Feb 8, 2013 at 20:54
  • 1
    The documentation only says, that a OS is need, that supports symlinks (e.g. Mac, Linux, Solaris...). Windows supports symlinks. Ergo symlinks should work on Windows hosts. Can you please post a link, where you've read, that Windows isn't supported.
    – automatix
    Feb 8, 2013 at 21:27
  • 1
    Emulating Posix links under Windows discusses how symbolic links differ on the two operating systems. TL;DR: they're implemented differently on Windows and are not interpreted as symlinks on Posix-compliant OSes.
    – cr0m
    Feb 9, 2013 at 0:18
  • 2
    Symlinks are supported on Windows but you have to run as administrator to be able to create them Nov 29, 2016 at 10:16
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

Not the answer you're looking for? Browse other questions tagged .