VMware Workstation 11 中 Ubuntu 14.04 的 VMware Tools 问题 : 共享文件夹

症状:主要表现在Win7中用VM11安装的Ubuntu14.04中,安装完自带的VMware Tools之后,/mnt/hgfs 中没有前面已经设置好的共享文件夹。

仔细查看了安装过程,发现在编译vmhgfs/module.o的时候出现了错误。国内网站上也很少有关于这类问题的说明,查到一篇文章[链接]有说明在win8下使用vmware11和ubuntu14.10的,也没能解决我的问题。

具体的解决方法是参考一篇英语网文[链接],步骤记录如下:

安装 open-vm-tools 
这可能是在客户机里实现VMware Tools功能的最简单的办法。

<code class="hljs lasso has-numbering" style="display: block; padding: 0px; background-color: transparent; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; word-wrap: normal; background-position: initial initial; background-repeat: initial initial;">apt<span class="hljs-attribute" style="box-sizing: border-box;">-get</span> install open<span class="hljs-attribute" style="box-sizing: border-box;">-vm</span><span class="hljs-attribute" style="box-sizing: border-box;">-toolbox</span></code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; background-color: rgb(238, 238, 238); top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right;"><li style="box-sizing: border-box; padding: 0px 5px;">1</li></ul><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; background-color: rgb(238, 238, 238); top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right;"><li style="box-sizing: border-box; padding: 0px 5px;">1</li></ul>

下面的是另外一种解决方法,经验证有效,且疗效较好。

安装VMware Tools 
通过uname -r发现我当前的内核版本是3.13.0-52,使用的vmware tool是版本是9.9.2-2496486。在编译vmware tools过程中会出现一些警告和错误,下面需要对 vmware tools做一些打补丁的操作以完成安装。

<code class="hljs lasso has-numbering" style="display: block; padding: 0px; background-color: transparent; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; word-wrap: normal; background-position: initial initial; background-repeat: initial initial;">cd ~
apt<span class="hljs-attribute" style="box-sizing: border-box;">-get</span> install git gcc make linux<span class="hljs-attribute" style="box-sizing: border-box;">-headers</span><span class="hljs-subst" style="color: rgb(0, 0, 0); box-sizing: border-box;">-</span>$(uname <span class="hljs-attribute" style="box-sizing: border-box;">-r</span>)
git clone https:<span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">//github.com/rasa/vmware-tools-patches.git</span>
cd vmware<span class="hljs-attribute" style="box-sizing: border-box;">-tools</span><span class="hljs-attribute" style="box-sizing: border-box;">-patches</span></code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; background-color: rgb(238, 238, 238); top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right;"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li><li style="box-sizing: border-box; padding: 0px 5px;">3</li><li style="box-sizing: border-box; padding: 0px 5px;">4</li></ul><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; background-color: rgb(238, 238, 238); top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right;"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li><li style="box-sizing: border-box; padding: 0px 5px;">3</li><li style="box-sizing: border-box; padding: 0px 5px;">4</li></ul>

接下来,通过VMware的“虚拟机”菜单中的安装VMware Tools子菜单挂载VMware Tools镜像,挂载完成后把VMware Tools光盘镜像中的VMwareTools-9.9.2-2496486.tar.gz拷贝到之前的下载路径中,然后运行脚本:

<code class="hljs lasso has-numbering" style="display: block; padding: 0px; background-color: transparent; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; word-wrap: normal; background-position: initial initial; background-repeat: initial initial;">cd ~/vmware<span class="hljs-attribute" style="box-sizing: border-box;">-tools</span><span class="hljs-attribute" style="box-sizing: border-box;">-patches</span>
cp /media/cdrom/VMwareTools<span class="hljs-subst" style="color: rgb(0, 0, 0); box-sizing: border-box;">-</span><span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">9.9</span><span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">.0</span><span class="hljs-subst" style="color: rgb(0, 0, 0); box-sizing: border-box;">-</span><span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">2304977.</span>tar<span class="hljs-built_in" style="color: rgb(102, 0, 102); box-sizing: border-box;">.</span>gz downloads<span class="hljs-subst" style="color: rgb(0, 0, 0); box-sizing: border-box;">/</span>
<span class="hljs-built_in" style="color: rgb(102, 0, 102); box-sizing: border-box;">.</span>/untar<span class="hljs-attribute" style="box-sizing: border-box;">-and</span><span class="hljs-attribute" style="box-sizing: border-box;">-patch</span><span class="hljs-attribute" style="box-sizing: border-box;">-and</span><span class="hljs-attribute" style="box-sizing: border-box;">-compile</span><span class="hljs-built_in" style="color: rgb(102, 0, 102); box-sizing: border-box;">.</span>sh</code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; background-color: rgb(238, 238, 238); top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right;"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li><li style="box-sizing: border-box; padding: 0px 5px;">3</li></ul><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; background-color: rgb(238, 238, 238); top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right;"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li><li style="box-sizing: border-box; padding: 0px 5px;">3</li></ul>

然后……没然后了,/mnt/hgfs/中已经出现了我希望看到的共享文件夹。

还剩一个工作,就是3D加速问题,VM11能指定显存大小了,不过按照上面方法安装的VMware Tools显然还不能让VM11正确识别、操作显存部分的设备。

猜你喜欢

转载自blog.csdn.net/liufei191010/article/details/51219150