文档章节

VirtualBox Guest Additions on Fedora 21/20, CentOS

skynothing
 skynothing
发布于 2015/04/10 11:23
字数 900
阅读 29
收藏 0

This is guide, howto install Oracle VirtualBox Guest Additions on Fedora, CentOS and Red Hat (RHEL). This guide should work with Fedora 21/20/19/18/17/16/15/14/13/12, CentOS 7/6.6/5.11, Red Hat (RHEL) 7/6.6/5.11.

VirtualBox Guest Additions is special software that can be installed inside Linux virtual machines to improve performance and make integration much more seamless. Among the features provided by these VirtualBox Guest Additions are mouse pointer integration and arbitrary screen solutions (e.g. by resizing the guest window).

Install VirtualBox Guest Additions on Fedora, CentOS and Red Hat (RHEL)

1. Change root user

Shell

su - ## OR ## sudo -i

0

1

2

3

4

 

su -

## OR ##

sudo -i

 

2. Mount VirtualBox Guest Additions

Click Devices > Install Guest Additions… on VirtualBox
VirtualBox Install Guest Additions

Mount VirtualBox Guest Additions device

Shell

mkdir /media/VirtualBoxGuestAdditions mount -r /dev/cdrom /media/VirtualBoxGuestAdditions

0

1

2

3

 

mkdir /media/VirtualBoxGuestAdditions

mount -r /dev/cdrom /media/VirtualBoxGuestAdditions

 

3. Make sure that you are running latest kernel

Update virtual machine kernel and reboot

Shell

yum update kernel* reboot

0

1

2

3

 

yum update kernel*

reboot

 

4. Install following packages

On CentOS/Red Hat (RHEL) 7/6/5, EPEL repo is needed

Shell

## CentOS 7 and Red Hat (RHEL) 7 ## rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm ## CentOS 6 and Red Hat (RHEL) 6 ## rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm ## CentOS 5 and Red Hat (RHEL) 5 ## rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

0

1

2

3

4

5

6

7

8

9

 

## CentOS 7 and Red Hat (RHEL) 7 ##

rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm

 

## CentOS 6 and Red Hat (RHEL) 6 ##

rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

## CentOS 5 and Red Hat (RHEL) 5 ##

rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

 

Install following packages

Shell

yum install gcc kernel-devel kernel-headers dkms make bzip2 perl

0

1

2

 

yum install gcc kernel-devel kernel-headers dkms make bzip2 perl

 

5. Add KERN_DIR environment variable

Shell

## Current running kernel on Fedora, CentOS 7/6 and Red Hat (RHEL) 7/6 ## KERN_DIR=/usr/src/kernels/`uname -r` ## Current running kernel on CentOS 5 and Red Hat (RHEL) 5 ## KERN_DIR=/usr/src/kernels/`uname -r`-`uname -m` ## Fedora example ## KERN_DIR=/usr/src/kernels/2.6.33.5-124.fc13.i686 ## CentOS and Red Hat (RHEL) example ## KERN_DIR=/usr/src/kernels/2.6.18-194.11.1.el5-x86_64 ## Export KERN_DIR ## export KERN_DIR

0

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

 

## Current running kernel on Fedora, CentOS 7/6 and Red Hat (RHEL) 7/6 ##

KERN_DIR=/usr/src/kernels/`uname -r`

 

## Current running kernel on CentOS 5 and Red Hat (RHEL) 5 ##

KERN_DIR=/usr/src/kernels/`uname -r`-`uname -m`

 

## Fedora example ##

KERN_DIR=/usr/src/kernels/2.6.33.5-124.fc13.i686

 

## CentOS and Red Hat (RHEL) example ##

KERN_DIR=/usr/src/kernels/2.6.18-194.11.1.el5-x86_64

 

## Export KERN_DIR ##

export KERN_DIR

 

6. Install Guest Additions

Shell

cd /media/VirtualBoxGuestAdditions # 32-bit and 64-bit systems run following ./VBoxLinuxAdditions.run

0

1

2

3

4

5

 

cd /media/VirtualBoxGuestAdditions

 

# 32-bit and 64-bit systems run following

./VBoxLinuxAdditions.run

 

Output looks like following:

[root@fedora VBoxGuestAdditions]# ./VBoxLinuxAdditions.run Verifying archive integrity... All good. Uncompressing VirtualBox 4.1.6 Guest Additions for Linux......... VirtualBox Guest Additions installer Removing installed version 4.1.6 of VirtualBox Guest Additions... Removing existing VirtualBox DKMS kernel modules           [  OK  ] Removing existing VirtualBox non-DKMS kernel modules       [  OK  ] Building the VirtualBox Guest Additions kernel modules Building the main Guest Additions module                   [  OK  ] Building the shared folder support module                  [  OK  ] Building the OpenGL support module                         [  OK  ] Doing non-kernel setup of the Guest Additions              [  OK  ] You should restart your guest to make sure the new modules are actually used Installing the Window System drivers Installing X.Org Server 1.11 modules                       [  OK  ] Setting up the Window System to use the Guest Additions    [  OK  ] You may need to restart the hal service and the Window System (or just restart the guest system) to enable the Guest Additions. Installing graphics libraries and desktop services componen[  OK  ]

0

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

 

[root@fedora VBoxGuestAdditions]# ./VBoxLinuxAdditions.run

Verifying archive integrity... All good.

Uncompressing VirtualBox 4.1.6 Guest Additions for Linux.........

VirtualBox Guest Additions installer

Removing installed version 4.1.6 of VirtualBox Guest Additions...

Removing existing VirtualBox DKMS kernel modules           [  OK  ]

Removing existing VirtualBox non-DKMS kernel modules       [  OK  ]

Building the VirtualBox Guest Additions kernel modules

Building the main Guest Additions module                   [  OK  ]

Building the shared folder support module                  [  OK  ]

Building the OpenGL support module                         [  OK  ]

Doing non-kernel setup of the Guest Additions              [  OK  ]

You should restart your guest to make sure the new modules are actually used

 

Installing the Window System drivers

Installing X.Org Server 1.11 modules                       [  OK  ]

Setting up the Window System to use the Guest Additions    [  OK  ]

You may need to restart the hal service and the Window System (or just restart

the guest system) to enable the Guest Additions.

 

Installing graphics libraries and desktop services componen[  OK  ]

 

7. Reboot guest system

Shell

reboot

0

1

2

 

reboot

 

Then VirtualBox Guest Additions install is ready.

Check also:

Install VirtualBox (with yum) on Fedora, CentOS, Red Hat (RHEL)


本文转载自:http://www.if-not-true-then-false.com/2010/install-virtualbox-guest-additions-on-fedora-centos-re...

skynothing
粉丝 0
博文 24
码字总数 11662
作品 0
武汉
QA/测试工程师
私信 提问
VirtualBox 4.1.6 发布

VirtualBox 4.1.6 是一个维护版本,主要是 bug 的修复,内容包括: VRDP: fixed screen corruption NAT: the interface stopped working after a lot of failed ICMP requests (bug #9371) E......

红薯
2011/11/28
1K
7
Vagrant 入门及基于 Vagrant 的 LAMP 开发环境搭建

[vagrant-homepage]: https://www.vagrantup.com "Vagrant homepage"[vagrant-docs]: https://www.vagrantup.com/docs "Vagrant docs"[vagrant-box]: https://atlas.hashicorp.com/boxes/sea......

whoru
2017/03/06
0
0
Linux VirtualBox安装及使用指南

VirtualBox是一款虚拟机软件。虽然它的功能并不及VMware Workstation Pro,但它对开源精神的坚持使得它在Linux中依然深受欢迎。 唯一难以令人接受的是,VirtualBox的安装步骤较为复杂。不过,...

辽元
2018/08/25
0
0
在 VirtualBox 上运行 Linux 发行版将变得更容易

我们可以在 VirtualBox 上轻松地尝试 Linux 发行版,而无需更换当前的操作系统。但在此之前需要下载安装 VirtualBox Guest Additions 软件包。 现在告诉你一个好消息,很快,您不需要安装 Vi...

达尔文
2018/01/18
5.3K
27
debian安装 Virtualbox 的增强功能问题处理

安装时遇到提示: Building the VirtualBox Guest Additions kernel modules The headers for the current running kernel were not found. If the following module compilation fails then......

acmfly
2014/06/23
0
0

没有更多内容

加载失败,请刷新页面

加载更多

ant 中的fileset include等拷贝

拷贝一个目录到指定目录下 例:<copy todir="${basedir}/new"> <fileset dir="${basedir}/old"> <include name="appgen" /> <include name="appgen/" /> <include name=appgen/**" /> <incl......

shzwork
10分钟前
1
0
react-jianshu项目的创建

创建项目 1、github上创建仓库react-jianshu 2、将项目克隆到本地git clone git@github.com:startjcu/react-jianshu.git 3、在当前目录(项目目录的上级目录)下执行create-react-app react-...

星闪海洋
19分钟前
2
0
OSChina 周二乱弹 —— 小哥哥,你可以教我写代码吗

Osc乱弹歌单(2019)请戳(这里) 【今日歌曲】 @nnnm: 生活大爆炸,结束了,这部陪伴了漫长时间的情景喜剧,最终是以诺贝尔奖和大团圆收尾的。虽然,不算精彩,但也是温馨。而少年谢尔顿的...

小小编辑
今天
235
11
typescript 接口 函数类型 可索引类型

函数类型 可索引类型 数字索引签名 字符串索引签名 数字索引签名返回值 必须是 字符串索引签名返回值的子集 只读索引签名

lilugirl
今天
3
0
Oracle SQL语法实例合集

如需转载请注明出处https://my.oschina.net/feistel/blog/3052024 目的:迅速激活Oracle SQL 参考:《Oracle从入门到精通》 ------------------------------------------------------------......

LoSingSang
今天
2
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部