Question

I've just got my guest box running CentOS working perfectly, except for one problem. I'm trying to mount a shared folder. I've followed the instructions for getting the shared folder "Mountable" by using this code:

VBoxManage sharedfolder add "TEST - 250" --name "github" --hostpath "C:\filepath\github"

Where "TEST - 250" is the name of the VM, "github" is the name of the folder as I'd like to call it in my VM, and "C:\filepath\github" is the directory path on the Windows host where I can find the contents I would like to share.

All seems well, and as instructed by Oracle, I am to use this command in the VM:

sudo mount -t vboxsf shared ~/host

I've made a directory off of the root called "host". The problem here is that I'm getting the following message:

mount: unknown filesystem type 'vobxsf'

Looking at this further, I'm told that in the /sbin/ folder, there should be a file called mount.vboxsf, where there is not.

I then read chapter 4 here: http://www.virtualbox.org/manual/ch04.html ... more specifically section 4.2.2.1.6 for Oracle Linux, Red Hat Enterprise Linux and CentOS. I follow ALL commands they ask for:

yum install dkms
yum update
yum install gcc
yum install kernel-devel

And just in case...

yum install kernel-uek-devel

All seem to work fine. I reboot the system to activate the updates. Once I login to the rebooted system, I type:

ls /sbin/mount*

... and I do NOT see the mount.vboxsf file. What am I doing wrong?

Also, is there a way to just get this file, and place it there? If I had that, I could perform my drive mounting, and be done with what I need to do. Any suggestions?

Was it helpful?

Solution

You need to install guest editions.

"The VirtualBox Guest Additions for all supported guest operating systems are provided as a single CD-ROM image file which is called VBoxGuestAdditions.iso. This image file is located in the installation directory of VirtualBox."

create mount directory

sudo mkdir -p /media/VirtualBoxGuestAdditions

mount guest additions iso

sudo mount -t iso9660 -o loop /installation/directory/of/VirtualBox/VBoxGuestAdditions.iso /media/VirtualBoxGuestAdditions/

Install guest additions

sudo /media/VirtualBoxGuestAdditions/VBoxLinuxAdditions.run

Then mount.vboxsf file should be in sbin and you can mount with

sudo mount -t vboxsf shared ~/host 

See https://www.virtualbox.org/manual/ch04.html

OTHER TIPS

After following the steps described by the given answer and experiencing a kernel header issue i came across this link which has a command that does simplify things.

/etc/init.d/vboxadd  setup

Hope it helps future explorers on this question. :)

I got the same error. When I tried to install VBoxGuestAdditions (Devices -> Insert Guest Additions CD Image) on Ubuntu 16.04 x86, it throws error message "Unable to insert the virtual optical disk ..."

SOLUTION: 1. Open a terminal and enter: sudo apt-get install virtualbox-guest-utils

  1. Reboot and enjoy.

sudo ./whateverTheArchitectureTypeYouHaveIs.sh worked for me. By default, VBOXAddition folder is in /media/..

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top