Windows Shared Folders Not Allowing Links

Discussions about using Windows guests in VirtualBox.
Post Reply
Trysis
Posts: 51
Joined: 12. Apr 2013, 22:06
Primary OS: MS Windows 8
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Linux, assorted; Windows 7; Windows 8.1

Windows Shared Folders Not Allowing Links

Post by Trysis »

I'm sure this has been asked many times before, but I'm not able to find satisfactory answers on Google. Is there any way to create a symbolic link from a Windows guest's local filesystem to one of its shared folders? As an example, I am transferring a folder "C:\Users\Sean\new" to the shared folder MultiMaker, currently bound to drive F, and a file "C:\Users\Sean\new2.txt" to the same shared folder. Therefore, to link the folder from local to the shared folder, I'd need "mklink /D F:\new new", and to link the other way around I'd need "mklink /D new F:\new". For the file, I'd need "mklink F:\new2.txt new2.txt" to link from the local filesystem to the shared folder, and "mklink new2.txt F:new2.txt" for the other way around. I can't use the other 2 options, /H (hard link) for the file and /J (junction folder) for the folder, because they don't work across partitions.

I am able to do this the other way around, i.e. from the shared folder/file to the "local" OS, I'm assuming because Windows doesn't check the original location, only the link's location. In order to even see the shared folder using an administrator account, as admins can't see network shares created by non-admins, I had to run "net use F: \\vboxsrv\MultiMaker". Then, when I tried again, I got "The device does not support symbolic links". Researching the error, I found out that shared folders are of the special filesystem type "VBoxSharedFolderSF". Is there a way to trick Windows into thinking this is an NTFS mount, or otherwise create these symlinks? I would rather do this from the Windows command line or PowerShell, but I'll consider other alternatives.

P.S. I'm able to create shortcuts, but they only work for the guest. As you can no doubt guess, I'd like to access this folder/file from the host, as well.

VirtualBox 4.3.12
Extension Pack Enabled

Host:
Windows 8.1
500GB HDD
x64
6GB RAM

Guest:
Windows 8.1
75GB HDD (I think)
x64
2GB RAM given
Guest Additions enabled (obviously)
BillG
Volunteer
Posts: 5106
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Windows Shared Folders Not Allowing Links

Post by BillG »

I would never have even tried something as complex as that using the Shared Folders option.

Why not use standard Windows file sharing between host and guest?
Bill
Trysis
Posts: 51
Joined: 12. Apr 2013, 22:06
Primary OS: MS Windows 8
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Linux, assorted; Windows 7; Windows 8.1

Re: Windows Shared Folders Not Allowing Links

Post by Trysis »

1: I don't trust Windows file sharing and am getting mistrustful enough of Windows lately without it.

2: The challenge.

3: It should be possible, it's included with VirtualBox, and it's frustrating that it doesn't work properly with Windows considering it's one of the main selling points of VirtualBox.
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: just about all that run

Re: Windows Shared Folders Not Allowing Links

Post by loukingjr »

Trysis wrote:3: It should be possible, it's included with VirtualBox, and it's frustrating that it doesn't work properly with Windows considering it's one of the main selling points of VirtualBox.
As far as I know Shared Folders were never meant to be the equivalent of full shares and are more a convenience to be able to copy files between a host and guest. In that sense they do exactly what they are designed to do. Also, free software doesn't have selling points. Because it's free.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
Trysis
Posts: 51
Joined: 12. Apr 2013, 22:06
Primary OS: MS Windows 8
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Linux, assorted; Windows 7; Windows 8.1

Re: Windows Shared Folders Not Allowing Links

Post by Trysis »

Sorry, I got frustrated. I'm more mad at Microsoft than VirtualBox, because I'm sure they made it this hard on purpose so it would be harder to reverse-engineer or whatever. My point was that shared folders don't work with NTFS symlinks, and they should, but I understand that, again, this is more because of Microsoft than because of Sun/Oracle/independent devs who make VBox.
noteirak
Site Moderator
Posts: 5231
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: Windows Shared Folders Not Allowing Links

Post by noteirak »

I think the bottom line of this topic is that the limitation is known and documented :
User Manual wrote: Starting with version 4.0, VirtualBox shared folders also support symbolic links (symlinks), under the following conditions:
  • The host operating system must support symlinks (i.e. a Mac, Linux or Solaris host is required).
  • Currently only Linux and Solaris Guest Additions support symlinks.
1: I don't trust Windows file sharing and am getting mistrustful enough of Windows lately without it.
But you do trust Windows with your file, your account, your data, your passwords and any other piece of information that ever transited by your computer. What is the difference if you setup a real network share instead? you can even do it using host-only, so it never leaves the host.

I have to be honest: I don't see any valid argument (not even #2 here!) to bash your head with this. Don't be frustrated.
It won't work, simple as that. IT is about saving you time, or being fun, not kicking yourself over something silly like this.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: just about all that run

Re: Windows Shared Folders Not Allowing Links

Post by loukingjr »

I learned something :)
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
Trysis
Posts: 51
Joined: 12. Apr 2013, 22:06
Primary OS: MS Windows 8
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Linux, assorted; Windows 7; Windows 8.1

Re: Windows Shared Folders Not Allowing Links

Post by Trysis »

Thanks, I saw that as saying VBox doesn't allow symlinks at all on Windows, which was obviously incorrect, but I just read wrong. I wonder why they can emulate the entire hard drive, including symlinks, but can't figure out how to allow symlinks on shared folders, even with the same OS as host & guest? It may be something to do with screwed-up permissions on Windows.

It's actually pretty easy, and I only want to do this if I can, I'm not going out of my way. I'll find another way.
BillG
Volunteer
Posts: 5106
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Windows Shared Folders Not Allowing Links

Post by BillG »

Trysis wrote: I'll find another way.
An excellent idea.
Bill
Post Reply