Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install virtualbox under centos5.6

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces you how to install virtualbox under centos5.6, the content is very detailed, interested friends can refer to, hope to be helpful to you.

Recently, servers have been heavily loaned out, so I want to take this opportunity to promote virtualization technology. The virtual machine software especially chooses the relatively simple Virtualbox. But I was told that the software could not be installed, so I had no choice but to do it myself. I did encounter a small problem in the middle, so I wrote it down as a memo.

1. Install the software environment

Yum install gcc yum install kernel-devel yum install kernel-headers

It is important to note that the current version of kernel used by the system corresponds to the installation of the corresponding kernel-headers and kernel-devel. If you can't find the appropriate package, use yum install kernel to upgrade the server to the same version, and then select the new kernel to restart. (remote installation can switch the specified kernel by editing / boot/grub/grub.conf below)

two。 Install virtualbox softwar

Rpm-ivh VirtualBox-4.1-4.1.6_74727_rhel5-1.x86_64.rpm

However, if you casually call vboxmanage list vms, you will find that the driver has not been compiled. If you execute the compilation command according to the prompt, you will see the following error:

[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 [failed] (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 was caused by the failure to install dkms.

3. Install dkms

This is relatively simple, go here to http://linux.dell.com/dkms/ to download an installation on it.

Then execute the driver compilation command and find that there is still an error:

[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 [OK] Starting VirtualBox kernel modules [failed] (Running VirtualBox in a Xen environment is not supported)

4. Dealing with Xen environmental issues

After taking a closer look at the error report this time, I found that * a prompt is that the system is running in Xen environment. I looked for the Virtualbox startup script and found that it was a very simple judgment:

Begin_msg "Starting VirtualBox kernel modules" if [- d / proc/xen]; then failure "Running VirtualBox in a Xen environment is not supported" fi

Using xm list to take a look is sure to run in this environment, virtualbox can not be installed in xen. Obviously I didn't install the Xen virtual machine on the server myself, but it was just the Xen kernel mode I chose when the kernel started. You can see the current kernel with uname-ar.

[root@localhost ~] # uname-ar Linux localhost.localdomain 2.6.18-238.el5xen # 1 SMP Thu Jan 13 16:41:45 EST 2011 x86 "64 GNU/Linux

This is easy to do, modify the kernel you choose to boot:

[root@localhost] # vim / boot/grub/grub.conf default=0 timeout=5 splashimage= (hd0,0) / boot/grub/splash.xpm.gz hiddenmenu title CentOS (2.6.18-238.el5xen) root (hd0,0) kernel / boot/xen.gz-2.6.18-238.el5 module / boot/vmlinuz-2.6.18-238.el5xen ro root=LABEL=/ rhgb quiet module / boot/initrd-2.6.18-238.el5xen.img Title CentOS-base (2.6.18-238.el5) root (hd0,0) kernel / boot/vmlinuz-2.6.18-238.el5 ro root=LABEL=/ rhgb quiet initrd / boot/initrd-2.6.18-238.el5.img

Each kernel is sorted from 0, and you can see that if you change default to 1, you can choose a normal kernel. Then reboot restarts.

5. Execute sudo / etc/init.d/vboxdrv setup, and you can see that the compilation passed smoothly.

6. I thought everything would be all right, but I found that I couldn't install it when I installed the virtual machine operating system. See the following error report:

Virtualbox vt-x is not available

At first glance, it feels that server virtualization is not turned on, restart the server and open the virtualization option in bios, but the problem is still found.

After looking up a circle of information on the Internet, some people said it was related to the kvm conflict, so I tried it. Step 1) first use lsmod | grep kvm to see if the server is kvm_intel or kvm_amd,2) and then use modprobe-r kvm_intel to clear the conflict.

On how to install virtualbox under centos5.6 to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report