1

So I have virtualbox with shared folder

linux host:

/home/www/shared
/home/www/shared/storage -> /home/www-storage/

what linux guest sees:

/var/vb-share
/var/vb-share/storage -> /home/www-storage (i want virtualbox to follow symlink instead)

How to make virtualbox follow host machine symlink?

I can mount --bind folders and it works ok but I would rather use symlinks.

I also can just use /home/www-storage as second share but symlink would be more convenient for me.

There is plenty of questions related to creating symlink on linux guest from windows host but I think this is different. I don't want to create symlinks in guest OS. I want virtualbox to follow symlink in host OS.

I found this answer but it doesn't seem to work (I use vagrant) and I don't need to create links on guest. I want host follow symlink in shared folder.

Another user says "Short answer is it cannot be done." but the answer is from 2014.

migrated from serverfault.com Jul 7 '17 at 10:01

This question came from our site for system and network administrators.

1

You want the symlink resolution to be done on the host and not on the client. To do that you can use a network file system like Samba running on the host. The clients will mount the file system via CIFS.
Some notes:

1) you want to make sure the the target is on the same share OR that wide links are enabled on the share with the symlink.

2) you want to make sure that "unix extensions" are disabled on the server or that the symlink's target is on the same 'share'.

If you need unix extensions AND wide links, you need to set the "allow insecure wide links" option to true.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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