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 ?

Community
  • 1
  • 1
TJR
  • 6,307
  • 10
  • 38
  • 64

2 Answers2

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.

hao
  • 1,144
  • 12
  • 15
  • 5
    I've tested and [others as seen here](http://www.ahtik.com/blog/fixing-your-virtualbox-shared-folder-symlink-error/) 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). – Trevor Boyd Smith Feb 14 '16 at 19:09
  • 1
    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) – Mahn Jul 14 '16 at 21:20
  • 1
    @TrevorBoydSmith your link is dead – OrangeDog Sep 14 '17 at 14:26
  • 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. – Márcio Moreira May 09 '18 at 18:08
  • 2
    Here's Trevor Boyd Smith's link working: https://ahtik.com/fixing-your-virtualbox-shared-folder-symlink-error/ – ArianJM Aug 16 '18 at 13:45
  • 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. – Rijul Gupta Sep 06 '18 at 04:06
  • The VirtualBox documentation linked no longer seems to mention symlinks. – UpTheCreek Jan 07 '19 at 08:06
  • 1
    The correct link is now https://www.virtualbox.org/manual/ch04.html#sharedfolders – Evgeny A. May 12 '19 at 17:17
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

Marco de Jongh
  • 5,270
  • 3
  • 17
  • 29
  • 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 ? – TJR May 30 '14 at 15:59
  • Adding a script that restarts meteor when it crashes only fixes a sympton not the problem – Marco de Jongh May 30 '14 at 16:24
  • Thats right and this is what i have said: Do oyu have a real solution, or just a workaround like me ? – TJR May 30 '14 at 16:36