4

I've set up an VirtualBox with CentOS 7 but i can not add a shared folder.

Enviroment:

Host - Windows 10
VirtBox - Centos 7 
VirtBox Version - 5.1.10
Development Tools are installed
gcc version - gcc-Version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC)
perl version - v5.16.3

I was following this post but it does not work.

If I try to mount I get the following result

[root@localhost /]# mount -t vboxsf php5 /mnt/share/php5/ /sbin/mount.vboxsf: mounting failed with the error: No such device

If I run sudo ./vboxadd setup , descripted in the post, the log-file get the following message:

[root@localhost /]# cat /var/log/vboxadd-install.log
/tmp/vbox.0/Makefile.include.header:97: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again.  Schluss.
Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module.

Here is an image of the added folder enter image description here

If I try it by the common was Device--> Guest Addition the following error occure:

enter image description here

Is there an other way to the success??

1

Most guest addition related problems in virtualbox is solved by creating a group at the host named vboxusers (if not created already)

groupadd vboxusers

and add your user to that group:

sudo usermod -aG vboxusers $your_username
  • I try it out, but it does not work. If i run [root@localhost ~]# mount -t vboxsf php5 /mnt/share/ i get the error /sbin/mount.vboxsf: mounting failed with the error: No such device – michael-mammut Dec 29 '16 at 10:28
  • Did you try this: stackoverflow.com/questions/28328775/… cd /opt/VBoxGuestAdditions-*/init sudo ./vboxadd setup – Serhat Cevikel Dec 29 '16 at 10:36
  • yes, I did. In case of this i get this message sudo ./vboxadd setup vboxadd.sh: Building Guest Additions kernel modules. vboxadd.sh: failed: Look at /var/log/vboxadd-install.log to find out what went wrong. vboxadd.sh: failed: Please check that you have gcc, make, the header files for your Linux kernel and possibly perl installed.. – michael-mammut Dec 29 '16 at 10:40
  • In Vbox guest additions image, there is a run file, did you execute that script to install Vbox additions? Do you have the dependencies in strerr (gcc, make, etc) at the guest? And did you try these as a non-root user? – Serhat Cevikel Dec 29 '16 at 10:44
  • 1
    Ok great, I am happy that you solved. – Serhat Cevikel Dec 29 '16 at 11:47
0

I have created a small tutorial to fix it.

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.