Chinaunix首页 | 论坛 | 博客
  • 博客访问: 172405
  • 博文数量: 51
  • 博客积分: 2302
  • 博客等级: 大尉
  • 技术积分: 420
  • 用 户 组: 普通用户
  • 注册时间: 2009-01-12 17:47
文章分类

全部博文(51)

文章存档

2010年(6)

2009年(45)

分类: LINUX

2009-07-22 00:08:23

我今天在virtualbox上安装了centos5.3系统,现在有个需求是要共享本地的硬盘数据(本地是ubuntu9.04),本地设置很简单,在虚拟机中选择centos标签后点击“设置”,在“数据空间”标签页新建一个本地共享空间(名称暂时为temp),关键的问题出现了,怎么在虚拟机的centos里通过mount -t vboxfs "temp" "/home/reasonpun/backup/sheare" 挂载本地硬盘:
   1、需要安装virtualbox的增强扩展,如果虚拟的是windows的系统,我们通过点击系统页面的“设备”-->“安装增强功能”,就可以根据提示进行安装,但是在linux的系统里,我点击该按钮没有作用,呵呵~~挑战开始....
   2、解决方法:首先挂载光驱,因为之前我虚拟了windows XP,所以我已经下载好了virtualbox的增强安装包,在这个包里(iso文件)有这么个文件“VBoxLinuxAdditions-x86.run”,我们直接拷贝到家目录后执行
    sh ./VBoxLinuxAdditions-x86.run
    结果系统提示:
    [root@localhost VBOXADDITIONS_2.2.4_47978]# sh VBoxLinuxAdditions-x86.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 2.2.4 Guest Additions for Linux installation..............................................................................................................................................................................................................................
VirtualBox 2.2.4 Guest Additions installation
Please install the build and header files for your current Linux kernel.
The current kernel version is 2.6.18-128.el5
Please install the GNU compiler.
This system does not seem to have support for OpenGL direct rendering.
VirtualBox requires Linux 2.6.27 or later for this.  Please see the log
file /var/log/vboxadd-install.log if your guest uses Linux 2.6.27 and you still see this message.
Problems were found which would prevent the Guest Additions from installing.
Please correct these problems and try again.

   这个问题就是缺少kenerl开发包和gcc吧,呵呵,这个还得在研究下,我执行这些命令后就可以了:
    因为是centos,所以:
    yum install kernel-devel
    yum install gcc
   系统提示重启机器,一切OK~~~可能还会有其他问题,但是我这里没有遇到。

   网上还有提示如下:已安装好内核开发包。但当再次安装Guest Additions时,还是会提示需要安装内核开发包。只有给当前内核创建个链接后才能正常安装的Guest Additions。
   ln -s /usr/src/kernels/2.6.18-92.1.18.el5-i686 /usr/src/linux
   sh VBoxLinuxAdditions-x86.run
  
   现在我再执行mount -t vboxfs "temp" "/home/reasonpun/backup/sheare"就可以挂载我需要的本地硬盘分区了,现在的问题是屏幕分辨率,明天继续吧,休息,休息~~~
阅读(1329) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2011-05-13 22:02:12

mount命名有误 应该是 mount -t vboxsf 共享目录名称 挂载路径