virtualBox 安装CentOS 全屏

在VirtualBox里安装CentOS系统,会遇到“增强工具”无法正常安装,主要的原因是出在Kernel 库找不到。

错误提示如下:

  

 通过查看日志文件:

cat /var/log/vboxadd-install.log

  

从日志显示,我们就可以找到问题的所在了。

第1步:安装 gcc-c++ 编译器

(注意:如果你的CentOS是全部安装的话,那么默认已经安装好了)

yum  -y   install    gcc-c++

  

注意:安装前确保你的网络是通畅的,因为yum是网络安装。

总计大概40M左右,我下载大约花了4分钟左右。

第2步:安装内核Kernal库

yum   -y   install   kernel   kernel-devel

     

第3步:重启系统 

init 6

第4步:再次安装增强工具,稍微等个几分钟就成功了

 以上引用自:http://www.php-note.com/article/detail/401

 安装成功后

一般Virtualbox安装CentOS安装完成后默认是800x600的分辨率。

安装Guest additions。安装完成后,分辨率可以修改为1024x768,还有一些更高的分辨率,但是没有1366x768。

修改/etc/X11/xorg.config

安装完Guest additions后,文件默认内容为(或者类似)

# VirtualBox generated configuration file  
# based on /etc/X11/xorg.conf.  
  
Section "Monitor"  
  Identifier  "Monitor[0]"  
  ModelName    "VirtualBox Virtual Output"  
  VendorName  "Oracle Corporation"  
EndSection  
  
Section "Device"  
  BoardName    "VirtualBox Graphics"  
  Driver      "vboxvideo"  
  Identifier  "Device[0]"  
  VendorName  "Oracle Corporation"  
EndSection  
  
Section "Screen"  
  SubSection "Display"  
    Depth      24  
  EndSubSection  
  Device      "Device[0]"  
  Identifier  "Screen[0]" 

EndSection

修改Section "Screen",添加字段Modes "800x600" "1366x768"

Section "Screen"  
  SubSection "Display"  
    Depth      24  
    Modes      "1366x768"  "800x600"  #在前面的分辨率是默认分辨率
  EndSubSection  
  Device      "Device[0]"  
  Identifier  "Screen[0]" 

EndSection

注意:Modes要添加在SubSection之间,而且不能只添加1366x768,要同时添加800x600。

以上引用自:http://www.linuxidc.com/Linux/2012-12/75447.htm

原文地址:https://www.cnblogs.com/jishugao/p/5183306.html