I cannot mount the shared folder between host windows machine and virtualbox guest linux
Solution 1
As of now (version 6.0.10 of VirtualBox) there are make permanent
and auto-mount
options for shared folder, also mount point
(At
) in GUI of virtualbox. For me the following worked:
- On guest Ubuntu:
sudo apt-get install virtualbox-guest-utils
- Add shared folder in GUI of VirtualBox.
- Restart guest OS
Folder on mount point specified in GUI was created automatically and ls
showed files located on host Windows PC.
Solution 2
It turns out the reason that I could not mount is because I did not install the vboxguestaddition version. So if you follow the steps here:
https://www.howtogeek.com/189974/how-to-share-your-computers-files-with-a-virtual-machine/
Ignore the windows part above, then follows the step here to install the guest additon: https://virtualboxes.org/doc/installing-guest-additions-on-ubuntu/
Then the file will be automatically there, but you might come across permission issue, check this page : https://askubuntu.com/questions/189200/getting-access-to-var-www.
I hope it helps people who might come across the same issue as I did.
Solution 3
cd to the /media folder and create a dir with the same name as the folder you created/shared in the host machine shared folder:
cd /media
sudo mkdir nameOfMySharedFolder
mount the folder with the following command:
sudo mount -t vboxsf nameOfMySharedFolder /media/nameOfMySharedFolder
watch a video for full description of process https://www.youtube.com/watch?v=I5cV0V7vLJw p.s. the sudo may or may not be necessary
Related videos on Youtube
Joy
Updated on September 18, 2022Comments
-
Joy over 1 year
So in the setting of virtualbox shared folder, I already has the click the set-up: auto mount and make permanent. My shared folder is named as VM-share
Then I log into the terminal of guest linux to type in the following commands:
$ sudo mount -t vboxsf VM-share ~/share/
It gives me the following error message:
mount: wrong fs type, bad option, bad superblock on VM-share, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so.
So I googled it and follow the instructions on this page: Why do I get "wrong fs type, bad option, bad superblock" error?
to install both the "
sudo apt install nfs-common
" and "sudo apt install cifs-utils
"However,when I repeat the command "
$ sudo mount -t vboxsf VM-share ~/share/
" It still gives me the same error message as before. I typed in "dmesg | tail
", the following is the message:[ 8.743003] IPv6: ADDRCONF(NETDEV_UP): enp0s3: link is not ready [ 8.745374] e1000: enp0s3 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX [ 8.752152] IPv6: ADDRCONF(NETDEV_CHANGE): enp0s3: link becomes ready [ 9.633147] floppy0: no floppy controllers found [ 9.633209] work still pending [ 3128.376259] vboxsf: Successfully loaded version 5.1.16_Ubuntu (interface 0x00010004) [ 3128.376457] sf_read_super_aux err=-22 [ 5762.008076] sf_read_super_aux err=-22 [ 6052.591669] sf_read_super_aux err=-22 [ 6138.926441] sf_read_super_aux err=-22
So How should I do to mount the shared folder?
-
Emtiaz Zahid over 4 yearssudo apt-get install virtualbox-guest-utils helps me
-
Positive Navid almost 4 yearsI could see the sf_ folder in /media/ right after running
sudo apt-get install virtualbox-guest-utils
-
bloody over 3 years
sudo apt-get install virtualbox-guest-utils
along withsudo mount -t vboxsf ...
did the job