Recently, a large number of servers have been borrowed, so I want to promote virtualization technology. Virtual Machine Software selects Virtualbox, which is relatively simple. However, I was told that the software could not be installed, but I had to do it myself. I encountered a small problem in the middle and recorded it for my memo.
1. install the software environment
- yum install gcc
- yum install kernel-devel
- yum install kernel-headers
Note that the current system uses the kernel version corresponding to installing the corresponding kernel-headers and kernel-devel. If the corresponding package cannot be found, use yum install kernel to upgrade the server to the same version, and then restart the new kernel. For Remote Installation, You can edit/boot/grub. conf to switch the specified inner core)
2. Install virtualbox Software
Rpm-ivh VirtualBox-4.1-4.1.6_74727_rhel5-1.x86_64.rpm
However, if you call vboxmanage list vms, you will find that the driver has not been compiled. Run the compilation command as prompted. the following error is returned:
- [Root @ localhost home] # sudo/etc/init. d/vboxdrv setup
-
- Stopping VirtualBox kernel modules [OK]
-
- Uninstalling old VirtualBox DKMS kernel modules [OK]
-
- Removing old VirtualBox pci kernel module [OK]
-
- Removing old VirtualBox netadp kernel module [OK]
-
- Removing old VirtualBox netflt kernel module [OK]
-
- Removing old VirtualBox kernel module [OK]
-
- Trying to register the VirtualBox kernel modules using DKMS [failure]
-
- (Failed, trying without DKMS)
-
- Recompiling VirtualBox kernel modules [OK]
-
- Starting VirtualBox kernel modules [failed]
-
- (Running VirtualBox in a Xen environment is not supported)
After a brief look, it is caused by dkms not being installed.
3. Install dkms
This is relatively simple. You can download an installation at http://linux.dell.com/dkms.
Then execute the driver compilation command and find the error: