Correct way to setup Virtualbox 4.3 to use symlinks on guest (for meteor)
Asked Answered
E

2

15

I use Windows 8 and installed Virtualbox so i can access to a Linux (Ubuntu) System.

The most i still did to do this - so at this moment i have a working Virtualbox with Ubuntu 14.04 LTS.

In my case i need this Virtualbox with Linux for meteor.

The problem:

meteor uses nodejs and so i need to have symlinks access (i think its symlinks - i read a few about it)

Reference: How to run meteor app inside an Ubuntu VrtualBox and edit using an editor on a Windows host?

He describes the same problem i have now:

Error: EROFS, read-only file system '/media/sf_Shared/Dropbox/dev_uhurajr/chat/.meteor/local/.build320446.build/programs/server/npm/logging/main/node_modules'

So i tried to enabled Symlinks on my host (windows) this way:

VBoxManage setextradata YOURVMNAME VBoxInternal2/SharedFoldersEnableSymlinksCreate/YOURSHAREFOLDERNAME 1

Reference: http://www.ahtik.com/blog/fixing-your-virtualbox-shared-folder-symlink-error/

This works fine! When i check the extradata for my VM the field SharedFoldersEnableSymlinksCreate is on 1

I set this value for 2 folders. The shared folder on Windows and also the name of the shared folder on my Linux VM.

But .. the same problem. The following error occurs everytime meteor tries to write symlinks:

Error: UNKNOWN, unknown error '/media/Projekte/test/.meteor/local/.build320446.build/programs/server/npm/logging/main/node_modules'

So whats the right way to get this working ?

Eighty answered 29/5, 2014 at 15:2 Comment(1)
The first link is broken now - do you know of an alternative URL?Stephanus
S
35

Guessing you were using Virtualbox version after 4.0, please:

  1. Enable symlinks VBoxManage.exe setextradata YOUR_VM VBoxInternal2/SharedFoldersEnableSymlinksCreate/YOUR_SHARED_FOLDER 1
  2. Run VirtualBox 'as admininstrator' on Windows.

Replace the YOUR_VM and YOUR_SHARED_FOLDER with your own value. You can check the value via VBoxManage.exe getextradata YOUR_VM enumerate

VirtualBox enabled symbolic for shared folder since 4.0, it's Windows permissions blocking you. You can either enable the permission for user or simply run VirtualBox as an administrator.

Please to refer the Virtualbox documentation:

Doc updated, please refer to the doc Shared Folders:

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.

Severable answered 23/2, 2015 at 13:9 Comment(8)
I've tested and others as seen here guest linux VMs on host Windows 10 with shared folders and symlink files and they work. The VirtualBox documentation IMO is not correct (the documentation is correct so far as "The host operating system must support symlinks"... but the list SHOULD include Windows 7 and up because Windows 7 and up DOES support symlinks via mklink command).Conducive
Can confirm @TrevorBoydSmith comment, Win10 host + Linux guest works as long as you create the symlink under linux (said symlink will only work under the guest, it won't be a proper windows symlink on the host, but otherwise it's fine)Expiratory
@TrevorBoydSmith your link is deadPisarik
With your solution I could create a python virtual environment on a shared folder of a VirtualBox VM managed by Vagrant: ( python3 -m venv venv ) The advice to run VirtualBox, or in my case to run PowerShell as administrator, was missing in other posts about this issue, and it is fundamental to the solution.Grasmere
Here's Trevor Boyd Smith's link working: ahtik.com/fixing-your-virtualbox-shared-folder-symlink-errorJamisonjammal
For some reason I had to open the Command prompt as Administrator as well for this to work. When I set the value as a normal user and then opened the VirtualBox it didn't work.Pilothouse
The VirtualBox documentation linked no longer seems to mention symlinks.Stephanus
The correct link is now virtualbox.org/manual/ch04.html#sharedfoldersSocha
R
0

I made a development vm with setup and run scripts.

https://github.com/gfk-ba/meteor-dev-vm

Just put your meteor app in the app directory and follow the instructions in the readme.md

Raddi answered 30/5, 2014 at 14:22 Comment(3)
Hi before i will do this: i still use Vagrant after reading alot about this. This works fine - just with one problem: The meteor server crashs after every change. I now use a workaround script found in the internet which restarts meteor everytime when meteor is not running anymore. Does your solution fix this issue or not ?Eighty
Adding a script that restarts meteor when it crashes only fixes a sympton not the problemRaddi
Thats right and this is what i have said: Do oyu have a real solution, or just a workaround like me ?Eighty

© 2022 - 2024 — McMap. All rights reserved.