Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
1  
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 '13 at 7:55

3 Answers 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.

share|improve this answer
    
Thank you for reply, but "Windows 7 and Windows Vista support symbolic links for both files and directories" (Wikipedia). –  automatix Feb 8 '13 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 '13 at 20:54
    
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 '13 at 21:27
    
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 '13 at 0:18

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.

share|improve this answer

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.