Virtualbox is a good virtual machine. We plan to migrate from VMware to virtualbox today. For details about how to install virtualbox and virtual machine, refer to other methods in this blog. Article Here, we will focus on one cause of failure when installing the shared folder. 1 -- shared folder installation failure and error
Step 01 on virtualbox, set the shared folder name: mysharee, which points to the "E:/share" directory of the host.
Step 02 mount a VM: Mount-T vboxsf mysharee/mnt/share. The following error occurs after the statement is executed:
/Sbin/mount. vboxsf: mounting failed with the error: no such device
Step 03 after searching on the internet, I found that the cause of this problem was that the enhancement package was not correctly installed. Run the "lsmod | grep vboxsf" command to check whether the enhancement package is successfully installed.
If the installation has been correctly installed on the VM, the command is displayed as follows:
Linux-rwdx :~ # Lsmod | grep vboxsfvboxsf 37328 1 vboxguest 195176 2 vboxsf
Step04 this virtual machine is not shown above, so we plan to reinstall the enhancement package (guest additions ).
After attaching the enhancement feature package, go to the/mnt/CDROM directory and run:./vboxlinuxadditions. Run. The following error is found (highlighted in red ):
Linux-rwdx:/mnt/CDROM #. /vboxlinuxadditions. run installverifying archive integrity... all good. uncompressing virtualbox 4.2.0 guest additions for Linux .......... virtualbox guest additions installerremoving installed version 4.2.0 of virtualbox guest additions... removing existing virtualbox dkms kernel modules kernel existing virtualbox non-dkms kernel modules donebuilding the virtualbox guest additions kernel modulesbuilding the main guest additions module failed (look at/var/log/vboxadd-install.log To Find Out What went Wrong) doing non-kernel setup of the guest additions doneinstalling The Window System driversinstalling X. org 6.9/7.0 modules donesetting up the window system to use the guest additions doneyou may need to restart the Hal service and the window system (or just restartthe guest system) to enable the guest additions. installing graphics libraries and desktop services components done
Step 05 follow the error prompt to find the cause in the log file "/var/log/vboxadd-install.log. The following error message is displayed in the log:
Linux-rwdx:/mnt/CDROM # Cat/var/log/vboxadd-install.log/tmp/vbox.0/makefile. include. header: 115: *** error: unable to find the include directory for your current Linux kernel. specify kern_incl =
And run make again. Stop. Creating user for the guest additions. Creating udev rule for the guest additions kernel module.
According to the error message, It is inferred that the kernel is not installed.Source codeTherefore, we decided to reinstall the kernel for the virtual machine.
2 -- install the Linux kernel source Code
Step 01 direct the VM's optical drive to the installation disc to enable the system to start from the disc.
Step 02 after starting the disc, select "installation" on the following page ".
Step 03 go to "installation mode" and select the installation type.
Because we installed the linuxkernel on the installed operating system, we chose the "Update" installation mode.
Step 04 click "Next" to go to the "installation setting" interface.
Step 05 on the above page, click "packages" to go to the installation package selection page. Select "installation sources" for filtering, and select "kernel-source" in the selection box on the right ".
Step 06 click "accept" To Go To The following confirmation page and select "Start Update" to start installation.
After the installation is successful in step 07, We will install the enhancement package again. The following prompt indicates that the installation is successful.
Linux-rwdx:/mnt/CDROM #. /vboxlinuxadditions. run verifying archive integrity... all good. uncompressing virtualbox 4.2.0 guest additions for Linux .......... virtualbox guest additions installerremoving installed version 4.2.0 of virtualbox guest additions... removing using virtualbox dkms kernel modules using existing virtualbox non-dkms kernel modules donebuilding the virtualbox guest additions kernel modulesbuilding the main guest additions module donebuilding the shared folder support module using building the virtualbox advanced graphics driver this Linux version istoo old to use it. doing non-kernel setup of the guest additions doneyou shoshould restart your guest to make sure the new modules are actually usedinstalling The Window System driversinstalling X. org 6.9/7.0 modules donesetting up the window system to use the guest additions doneyou may need to restart the Hal service and the window system (or just restartthe guest system) to enable the guest additions. installing graphics libraries and desktop services components done