免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1710 | 回复: 0
打印 上一主题 下一主题

virtualbox中对centos硬盘共享的设置 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-07-22 00:08 |只看该作者 |倒序浏览

                我今天在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时,还是会提示需要安装内核开发包。只有给当前内核创建个链接后才能正常安装
VirtualBox
的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"就可以挂载我需要的本地硬盘分区了,现在的问题是屏幕分辨率,明天继续吧,休息,休息~~~
               
               
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/91250/showart_2002978.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP