Creating group 'vboxusers'. VM users must be member of that group!
No precompiled module for this kernel found -- trying to build one. Messages
emitted during module compilation will be logged to /var/log/vbox-install.log.
Success!
把打算使用的用户添加安装vboxusers用户组里
[root@xingke disk1]#sudo usermod -a -G vboxusers username
经过上述几个步骤,VirtualBox在centos5上以成功安装
添加网卡桥接功能 先安装桥接使用工具
[root@xingke ~]# yum -y install bridge-utils
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
* base: 192.168.3.13
* updates: 192.168.3.13
* addons: 192.168.3.13
* extras: 192.168.3.13
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package bridge-utils.i386 0:1.1-2 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
bridge-utils i386 1.1-2 base 27 k
vi /etc/sysconfig/network-scripts/ifcfg-eth0
.
//此处省略
.
BRIDGE=br0
然后重启网络
sudo /sbin/service network restart
增加桥接的主机网卡
[root@xingke ~]# VBoxAddIF vbox0 root br0 <--此处的root是网卡用户帐号,谁可以使用此网卡,这里我用了root
VirtualBox host networking interface creation utility, version 2.0.2
(C) 2005-2007 Sun Microsystems, Inc.
All rights reserved.
Creating the permanent host networking interface "vbox0" for user root.
Failed to add the interface "vbox0" to the bridge "br0".
Make sure that the bridge exists and that you currently have sufficient
permissions to do this.
[root@xingke ~]#
Attached to选择host interface
interface name填写上面新建的vbox0
才可以使用到桥接功能
安装鼠标增强组件 安装后需要安装格外的一个增强组件,可以在主机和客户机鼠标方便移动
lihaixin@lihaixin-desktop:~$ sudo /media/cdrom/VBoxLinuxAdditions-x86.run
[sudo] password for lihaixin:
Verifying archive integrity... All good.
Uncompressing VirtualBox 2.0.2 Guest Additions for Linux installation.........................................................................................................................................................................................
VirtualBox 2.0.2 Guest Additions installation
Building the VirtualBox Guest Additions kernel module...
Building the shared folder support kernel module...
Installing the VirtualBox Guest Additions...
Successfully installed the VirtualBox Guest Additions.
You must restart your guest system in order to complete the installation.
lihaixin@lihaixin-desktop:~$