0

I tried sshfs, but the local directory where I want to mount a folder from the VM does not open after running the command.

nbro
  • 15,395
  • 32
  • 113
  • 196
Kumar Deepak
  • 473
  • 4
  • 18
  • I am using virtualbox and the performance is quite good. I am running hortonworks hadoop vm. I have used sshfs before for mounting from servers, just that the same is somehow not working for VM. – Kumar Deepak Jun 23 '15 at 08:15

2 Answers2

0
  1. Install the Guest Additions on the virtual machine. These can be dowloaded from within the virtual machine from the Devices > Install Guest Additions menu.
  2. Add the folder you wish to share to the Shared Folders, this option can also be found in the Devices menu.
  3. The folder can now be mounted with

    sudo mount -t vboxsf -o uid=$UID,gid=$(id -g) folder ~/host

For more info, or troubleshooting, check out this Ubuntu Help article.

Melvin
  • 344
  • 1
  • 8
-1

OS: Ubuntu
Install the VBoxGuestAdditions. You don't have to reboot the system.
See https://download.virtualbox.org/virtualbox/ for newest available version...

$ wget https://download.virtualbox.org/virtualbox/7.0.10/VBoxGuestAdditions_7.0.10.iso -P /tmp
$ sudo mount -o loop /tmp/VBoxGuestAdditions_7.0.10.iso /mnt
$ sudo apt-get install bzip2 tar
$ sudo sh /mnt/VBoxLinuxAdditions.run

After that you can use the GUI for mounting folders. You must close the modal window with the listed folders, to actualy add your newly added folder. The folder doesn't have to exist on the guest, it will be create.

You also have to add your user to the group 'vboxsf' in the guest os, to get access rights for the shared folders:

$ sudo usermod -aG vboxsf $USER
$ newgrp vboxsf
BenJ1337
  • 109
  • 1
  • 3