VMware虚拟机Fefora和主操作系统硬盘之间实现文件共享方法

 VMware ToolsVMware虚拟机中自带的一种增强工具,相当于VirtualBox中的增强功能(Sun VirtualBox Guest Additions),是VMware提供的增强虚拟显卡和硬盘性能、以及同步虚拟机主机时钟的驱动程序

只有在VMware虚拟机中安装好了VMware Tools,才能实现主机与虚拟机之间的文件共享,同时可支持自由拖拽的功能,鼠标也可在虚拟机与主机之前自由移动(不用再按ctrl+alt),且虚拟机屏幕也可实现全屏化。

接下来我将讲解vmware tools的安装方法:

1.VM——>Vmware tools install 

完成上面一步操作后会在桌面出现VMware tools的光盘映像,点击进去会看到两个文件,将VMware tools-7.8.4-126130.tar.gz复制到/opt目录下,

tar xzvf VMware tools-7.8.4-126130.tar.gz 
cd vmware-tools-distrib 

运行./vmware-install.pl 

VMware-tools已安装成功了 
cd /mnt 
是不是看到了一个hgfs目录,这就表明安装成功了,下面就要讲一下怎么来设置共享了,这一部分更简单。 
记得上面在VM菜单里进行操作了吗?对!下面接着要在VM菜单里进行,选择setting子项,再选择Options。在窗体的左半部分是不是看到了Shared Folders这么一项,如果你以前没有设置过,应该是Disabled。 
选择always enable,选择Add,选择要和客户Linux进行共享的目录。 

目前已完成了所有的工作了,在/mnt/hgfs下你会看到添加的目录。在windows下向指定的share folders写文件,在Linux客户机里面就能够看到,同样在Linux上写文件在视窗系统下也能够看到,并且能修改。

事情总是没有想象的顺利,在执行./vmware-install.pl的过程中,遇到了 What is the location of the directory of C header files that match your running的问题。

问题描述:运行./vmware-install.pl后,一直按enter键就ok了,当出现下面这个提示后,你就要小心了.

Before running VMware Tools for the first time, you need to configure it by invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want 

this program to invoke the command for you now? [yes] 

..............................................

What is the location of the directory of C header files that match your running kernel? 

提示我要输入内核头文件的路径

出现这种问题有两种情况:

一种是你没有安装内核头文件,那就要先安装kervel-deve,

另外一种情况是vmware的问题,其实kernel header已经安装了,只是没有正确的被识别到,版本号不对应。

解决办法如下:

1.使用uname -r看kernel版本号:2.6.27.41-17.2.117.fc10.i686

2.Yum install kernel-devel 2.6.27.41-17.2.117.fc10.i686     

//使用yum命令 安装kernel-devel 只要连接网络就能安装
3.当再次配置VMware的时候
What is the location of the directory of C header files that match your running kernel? [/usr/src/linux/include]
路径设置:
[root@localhost ~]# cd /usr/src/kernels/
[root@localhost ~]# ls                       //查看kernel的版本号
[root@localhost ~]# 2.6.27.41-17.2.117.fc10.i686  //版本号
路径为:
/usr/src/kernels/2.6.27.41-17.2.117.fc10.i686 /include

最后,如下提示,则表示vmware-tools安装成功了!

Creating a new initrd boot image for the kernel.

update-initramfs: Generating /boot/initrd.img-2.6.35-24-generic

   Checking acpi hot plug                                              done

Starting VMware Tools services in the virtual machine:

   Switching to guest configuration:                                   done

   Paravirtual SCSI module:                                            done

   Guest filesystem driver:                                            done

   Mounting HGFS shares:                                               done

   Guest memory manager:                                               done

   VM communication interface:                                         done

   Blocking file system:                                               done

   File system sync driver:                                            done

   Guest operating system daemon:                                      done

   Virtual Printing daemon:                                            done

The configuration of VMware Tools 8.1.3 build-203739 for Linux for this running

kernel completed successfully.

 You must restart your X session before any mouse or graphics changes take 

effect.

You can now run VMware Tools by invoking the following command: 

"/usr/bin/vmware-toolbox" during an X server session.

To enable advanced X features (e.g., guest resolution fit, drag and drop, and 

file and text copy/paste), you will need to do one (or more) of the following:

1. Manually start /usr/bin/vmware-user

2. Log out and log back into your desktop session; and,

3. Restart your X session. 

Enjoy,

--the VMware team

成功解决问题!Fedora跟主机之间可以实现文件共享了 


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值