How can I configure the guest OS (your Linux distribution in specific) so as to have a shared folder between host and guest. From Win 10 I created a shared folder and made it shared to all, and from Linux I run the command:
/usr/sbin/usermod -aG vboxsf oracle
However, I cannot yet pass through any files!
The easiest way is to install the Guest Additions let let virtualbox set up a share for you. check out the virtualbox manual at
3.12. Shared folders and 4.3. Shared folders
Related
I recently installed WSL version 2 according to the instruction. Everything work greatly. But I notice that the folder /mnt/c is not available any more.
I understand the new WSL using vhdx as file system which gives us better FS performance, but I could not find a way to access files in Windows.
I also tried to check the wsl --help but I could not find anything helpful.
Any suggestions?
After read more, I notice that WSL 2 is actually an optimized VM on Windows 10, which means the running WSL 2 has no idea about where it self. Seems there should be a way to pass some Windows folders while launch it. Haven't figured out how.....
By default, the command prompt in WSL is located at C:\Users\username. WSL considers this /home/user but you can can reference any directory on your Windows machine by starting at the root directory with /../../.
Here is an example command: find "/../../mnt/c/anyFolder/subfolder" -name "test" -type d
I'm trying to run an application using vagrant. I have a directory where the codebase of app is placed and the .vagrant dir that is created there after its initializing. It looks so:
[app_codebase_root]/.vagrant/machines/default/virtualbox
There is a some very short manual about what to do (https://github.com/numenta/nupic/wiki/Running-Nupic-in-a-Virtual-Machine) and I stopped at the point 9 where is said:
9) Expose [app] codebase to the vagrant instance... If you have the
codebase checkout out, you can copy or move it into the current
directory...
So it's not clear for me what to copy and where? Does it mean some place within vagrant (if yes, then which exactly?) or some another place? Or I should just make a command vagrant ssh now?
From the Vagrant documentation:
By default, Vagrant will share your project directory (the directory with the Vagrantfile) to /vagrant.
So you should find your codebase root should under /vagrant on your guest.
This is always going to be a little confusing, so you need to separate the concepts of the host system and the VM.
Let's say the shared directory (the one with the Vagrantfile) is [something]/vagrant on your host system. Copy your app directory to [something]/vagrant/nupic (or run git clone in that directory) while still in Windows. Check using Windows Explorer that you see all the source files.
In a console window, cd to [something]/vagrant and run vagrant ssh.
You are now in the VM, so everything is now the VM's filesystem. Your code is now in /vagrant/nupic. Edit .bashrc as per the instructions to point to this directory, and run the build commands.
On my local machine, I have textmate installed, and in the terminal, I can do things like mate index.html, and this will launch textmate.
However now I'm using Vagrant and VBox. On a virtual machine, I can't use mate anymore. Is it possible to use an external editor like textmate on virtual machine files?
1.1+ Shared folder has been renamed to Synced Folder. By default the directory where Vagrantfile resides will be mounted as /vagrant via vboxsf. You can add more and change the default behaviour.
Please refer to the v2 docs => http://docs.vagrantup.com/v2/synced-folders/index.html
BTW: If your host is Linux, using sshfs is good alternative.
The easiest way is to mount a share and edit from your host... This is easily done with vagrant share :) You may want your files to live on the host permanently or on the guest depending of your situation.
You can check the documentation for this : http://docs-v1.vagrantup.com/v1/docs/config/vm/share_folder.html
I have a Debian virtualbox set up with vagrant, in it i have the codebase for the project that i'm working on and i've set the folder which holds this codebase to be synced with the Host machine (which is Mac OS 10.8.4). I just learned that in order to change the permissions on any subfolders on my synced folder i must do this from the host machine, however my problem is that the application actually creates folders (and subfolders) and then expects to be able to write to them. Since the vm doesn't have the ability to chmod it's own folders these folders are not created with write access by default. How can this be achieved?
note: i've already tried using umask from both the host and the vm. it works on the host but since those changes are per terminal they don't propagate to the vm, using it on the vm doesn't work because the folders are managed by the host.
umask should be the way to go.
To make it persistent, you just need to add umask 027 (or whatever mask you want) to ~/.bash_profile for interactive login shell or ~/.bashrc for interactive non-login shell for the user who will be running the application, or just make it system wide by placing in /etc/profile.
NOTE: Ubuntu uses ~/.profile and does NOT have ~/.bash_profile.
Alternatively, set umask before running the application would probably help.
I have made an virtual environment with VMware and a Cent-OS 5 distribution, i also made a shared folder from windows into my VMware virtual machine to share my project and run it locally under a Linux environment. The problem is that when i try to change my document root in Apache and restart it. it says that my shared folder that is located in Linux is not a valid directory (Invalid Apache directory ). From what i have read it might be something to do with rights but as far as now i have not been able to change any rights for that shared folder at Cent-OS 5.