免费注册 查看新帖 |

Chinaunix

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

[原]XP下VMware模拟Ubuntu共享文件夹问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-05-01 17:25 |只看该作者 |倒序浏览
在Ubuntu 下安装 VMwareTools

1.安装编译环境:
sudo apt-get install build-essential linux-headers-`uname -r`

2.在VMware的菜单中,点击VM->Install VMware Tools,你将看到有光盘被加载。
解压缩VMwareTools*.tar.gz文件。执行命令:
进入解压后的文件夹
sudo ./vmware-install.pl
#####################################################################
解决/mnt/hgfs为空的问题

目前XP下使用VMware workstation 6.0.2虚拟ubuntu后,即使安装了VMware Tools并设置了共享文件夹后,虽然可以看到/mnt/hgfs/但仍旧不能访问共享目录的解决方案。
问题:主要问题是在安装vmware tools时编译vmhgfs模块出错:

代码:
/tmp/vmware-config0/vmhgfs-only/filesystem.c: In function ‘HgfsInitFileSystem’:
/tmp/vmware-config0/vmhgfs-only/filesystem.c:582: error: too few arguments to function ‘kmem_cache_create’
/tmp/vmware-config0/vmhgfs-only/filesystem.c:593: error: too few arguments to function ‘kmem_cache_create’
make[2]: *** [/tmp/vmware-config0/vmhgfs-only/filesystem.o] Error 1
make[1]: *** [_module_/tmp/vmware-config0/vmhgfs-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.22-14-generic'
make: *** [vmhgfs.ko] Error 2
make: Leaving directory `/tmp/vmware-config0/vmhgfs-only'
Unable to build the vmhgfs module.

解决:请将vmware tools的安装文件解压到用户目录下(~/vmware-tools-distrib)。
首先进入此目录:

代码:
$ cd ~/vmware-tools-distrib
把将要更改的文件分离出来备份:
代码:
$ mv lib/modules/source/vmhgfs.tar vmhgfs.tar.orig
解压缩此文件:
代码:
$ tar -xvf vmhgfs.tar.orig
编辑文件解压后生成的vmhgfs-only目录中的compat_slab.h:
代码:
$ vim vmhgfs-only/compat_slab.h
找到此行:
代码:
if LINUX_VERSION_CODE
更改为:
代码:
if LINUX_VERSION_CODE
就是把小于(
代码:
tar -cvf lib/modules/source/vmhgfs.tar vmhgfs-only
将此vmhgfs.tar文件复制到ubuntu系统的vmware-tools中(/usr/lib/vmware-tools/modules/source/):
代码:
$ sudo cp lib/modules/source/vmhgfs.tar /usr/lib/vmware-tools/modules/source/vmhgfs.tar
重新设置vmware tools:
代码:
$ sudo vmware-config-tools.pl
一路按回车键。

###############################################################################

使用共享文件夹
点击Vmware->Edit->Virtual Machine Settigns->Option->SharedFolders->Add,选定要共享的文件夹(这个文件夹的属性要设置为"共享")并给这个文件夹命名,下一步。选定“Enable
thisshare”, 确定以后,vmware会把这个文件夹自动mount到/mnt/hgfs目录下。


进入ubuntu

#cd /mnt/hgfs

就可以看到widows下的共享文件夹



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

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP