Correct way to setup Virtualbox 4.3 to use symlink

2019-02-04 13:33发布

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 ?

2条回答
老娘就宠你
2楼-- · 2019-02-04 13:44

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.

查看更多
Viruses.
3楼-- · 2019-02-04 13:55

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

查看更多
登录 后发表回答