Ubuntu – I cannot mount the shared folder between host windows machine and virtualbox guest linux

mountshared-foldersvirtualbox

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?

Best Answer

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:

  1. On guest Ubuntu: sudo apt-get install virtualbox-guest-utils
  2. Add shared folder in GUI of VirtualBox.
  3. Restart guest OS

Folder on mount point specified in GUI was created automatically and ls showed files located on host Windows PC.

Related Question