0

I have a VirtualBox installed on Ubuntu 18.04 and within VirtualBox Ubuntu 18.04 is also installed i.e. both host and guest machine are the same OS. Now I need to transfer some files from host machine to guest machine, I followed instructions mentioned here.

But while issuing the following command in guest machine

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

I am getting an error

mount: /home/atinesh/host: mount point does not exist

How can I transfer files from host machine to guest machine

Update: I have created home directory in Guest OS, Now while Issuing the same command as mentioned above getting this error

mount: /home/atinesh/host: wrong fs type, bad option, bad super block on share, missing codepage or helper program, or other error.

  • You didn't create ~/host. – Pilot6 Feb 27 at 13:06
  • 1
    If it is about simple transferring files and not keeping the shared volume - what about the scp? – h__ Feb 27 at 13:27
  • @Pilot6 I have updated the post please have a look – Atinesh Feb 27 at 13:37
  • In guest OS try to run sudo chmod 777 /home/atinesh/host - Did you try the troubleshooting section of the document you referring to ? – cmak.fr Feb 27 at 15:18
  • The shared folder did not mount properly even after installing guest additions. After several hours of searching, I realized that I can simply drag/drop folders from Windows to Ubuntu - so the need for the shared folder is gone. – Nazar Aug 21 at 15:36
2

Easiest to use VirtualBox Shared Folders.

Make sure that Guest Additions is installed in your VM.

In the Shared Folder setting for your VM... ie: using my Desktop folder...

enter image description here

In your VM...

In terminal...

sudo adduser $USER vboxsf # add user to vboxsf group

Log out, log in so that vboxsf is available.

Open a Files window and open the shared Desktop (in my example) folder. You may also see a sf_Desktop folder icon on the desktop.

  • Getting error while issuing command you mentioned addUser: The group 'vboxsf' does not exist – Atinesh Feb 28 at 5:17
  • @Atinesh Make sure you're in the VM, and do the sudo adduser $USER vboxsf, and if that still fails, then try sudo addgroup vboxsf first, to add the missing group. – heynnema Feb 28 at 14:32
1

I solved my issue by first adding my username to vboxsf

sudo adduser $USER vboxsf

And then I still had to install this package to see the shared folder

sudo apt install virtualbox-guest-utils
0

I also faced problem in sharing folders on ubuntu 18.04. I degraded the version and installed ubuntu 16.04. Problem got solved. No need to separately mount the folder. Just adding name to group vboxsf and then restart VM worked.

  • This is not a solution for Ubuntu 18.04 that you mentioned in here, you just started using a totally different version of Ubuntu... – Kamiel Ahmadpour Sep 11 at 7:20
0

I solved my issue by first adding my username to vboxsf

sudo adduser USER_NAME vboxsf And then I still had to install this package to see the shared folder sudo apt install virtualbox-guest-utils

almost worked, BUT although I wanted to be mounted at /mnt/mydir, as configured in virtualbox I ended up getting it mounted on /media/sf_mydir

  • If you disable automount (for the share via the Virtualbox Manager), you can mount the share wherever you want. On that note, automounting works great so I usually leave it alone. – ajgringo619 Sep 18 at 23:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.