How to Install VMware Tools on Ubuntu Hardy 8.04 under VMware Fusion (vmware+ubuntu8.04+vmwaretools)

Ubuntu Hardy under VMware Fusion

The latest version of Ubuntu (8.04 a.k.a. Ubuntu Hardy - the world’s most popular Linux distribution) came out yesterday on April 24th. I downloaded it right away to play with on VMware Fusion, my Mac virtualization tool of choice (though I’ve now been told this works in VMware Workstation and VMware Player on the PC too!). It worked pretty well out of the box, with even seamless mouse support working right away, but I needed, of course, to install VMware Tools too, as any good VMware user would do. From there, things turned sour, and I was bombarded with error messages similar to:

In file included from /tmp/vmware-config8/vmblock-only/linux/os.h:35,
from /tmp/vmware-config8/vmblock-only/linux/block.c:26:
/tmp/vmware-config8/vmblock-only/./include/compat_wait.h:78: error: conflicting types for ‘poll_initwait’
include/linux/poll.h:65: error: previous declaration of ‘poll_initwait’ was here
In file included from /tmp/vmware-config8/vmblock-only/linux/vmblockInt.h:40,
from /tmp/vmware-config8/vmblock-only/linux/block.c:29:
/tmp/vmware-config8/vmblock-only/./include/vm_basic_types.h:184: error: conflicting types for ‘uintptr_t’
include/linux/types.h:40: error: previous declaration of ‘uintptr_t’ was here
make[2]: *** [/tmp/vmware-config8/vmblock-only/linux/block.o] Error 1
make[1]: *** [_module_/tmp/vmware-config8/vmblock-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-16-generic’
make: *** [vmblock.ko] Error 2
make: Leaving directory `/tmp/vmware-config8/vmblock-only’
Unable to build the vmblock module.

After banging my head against the wall for a while, trying a “vmware-any-any” patch that didn’t quite do the trick, and scouring the VMWare Fusion and Ubuntu Forums, I eventually came across a link to a page that described how to solve the problem. The credit for this solution rests entirely on the guy who wrote that page and a guy called Mufassa who posted a shorter explanation to the VMware Fusion forums.

I wanted to write this up into a proper blog post though for two reasons. Firstly, I wanted to show how to fix the problem in a more, direct line by line way (just in case you’re a novice or would rather follow some command line instructions). Secondly, I know posts on this blog appear in Google very quickly, so I want people Googling for “vmware fusion” and “ubuntu hardy” (like I was earlier) to find this page and have their problem solved! So, credit to those other guys, but..

Steps To Getting VMware Tools installed on Ubuntu Hardy under VMware Fusion:

Use the “Install VMware Tools” option in VMWare Fusion, and drag the .tar file (not the RPM!) to the Ubuntu desktop.

Open a Terminal (Applications menu -> Accessories -> Terminal). We’ll do all the work from the Terminal. First, we need to install some dependencies:

sudo apt-get install build-essential libgtk2.0-dev
sudo apt-get install libproc-dev libdumbnet-dev xorg-dev
cd Desktop/

wget http://mesh.dl.sourceforge.net/sourceforge/open-vm-tools/open-vm-tools-2008.04.14-87182.tar.gz

Next, we need to unpack the tar files we have at hand:

tar xzvf VMware*.gz
tar xzvf open-vm-tools*.gz

Next, we’ll build the open-vm-tools:

cd open-vm-tools-2008.04.14-87182/
./configure && make
cd modules/linux/

In the modules/linux folder we have the vmblock, vmhgfs, vmmemctl, vmsync and vmxnet modules that we need to tar up and place into the official VMware tools tarball:

for i in *; do mv ${i} ${i}-only; tar -cf ${i}.tar ${i}-only; done
cd ../../..

mv -f open-vm-tools-2008.04.14-87182/modules/linux/*.tar vmware-tools-distrib/lib/modules/source/

Now we can run the regular VMware tools installer:

cd vmware-tools-distrib/
sudo ./vmware-install.pl

Once this is done, the best tactic is to restart Ubuntu entirely. Once you boot back up, things should seem a bit smoother. The resolution of the VM will stick to the size of the VM, etc, and you can now drag files directly into Ubuntu Hardy from your Mac desktop!

Note: A few of the lines of code you need to use above are single lines of code but spread over multiple lines on your screen when viewing this blog. Either make your browser wider, or copy and paste them into a text editor before continuing.


posted on 2008-07-08 22:01 聂文龙 阅读(280) 评论(0)   编辑  收藏 引用 所属分类: Linux
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值