[分享]vmware 6 build-44426 +Ubuntu+vmare tools

Kvm、VMware、Virtualbox、Xen、Qemu 等
回复
头像
RealTwo
帖子: 18
注册时间: 2007-05-14 3:51
来自: 湖南
联系:

[分享]vmware 6 build-44426 +Ubuntu+vmare tools

#1

帖子 RealTwo » 2007-05-20 0:16

我总共有三次使用Linux(Unix)的经历。

第一次仿佛是很遥远的事情了,大三下期学校开设了unix操作系统原理课程,课是没怎么上好,但看到有同学装了redhat linux,就也想自己玩玩。那次真是教训惨痛,没作为什么准备,就直接从光驱开始安装了,心想它应该不会覆盖我的XP吧。也没怎么注意看提示,就这样装完了。那次对LINUX的印象不是太好,比起XP来,LINUX好像就比DOS好一点点。当然这是我当时浅薄的看法,大家千万别拿砖砸我,呵呵。发现用惯XP的我还是很不习惯用LIUNX,那时就只有一点点图形界面,主要操作还是靠打命令,加上我命令懂得少,又不能看电影听歌,又不能上网聊天,那个郁闷啊:)更惨的是,当我想回到原来的XP时,骤然发现已经没了。那个心痛啊,挖凉挖凉的,几百M的个人文档、程序、照片都掉了(其他如电影、MP3也就算了)。那一刻真是欲哭无泪。

第二次使用是大四的时候了,SUN的Solaris操作系统开源,由于我买了一本CSDN的<<程序员>>杂志,它附了一张Solaris的CD。我想不用白不用,就试试吧。这次小心多了,装了VMWARE后再装。于是,忙着下载VMWARE,看VMWARE的教程,鼓捣Solaris安装,我一向知道SUN的用户体验做得不好,果不其然,SOLARIS还没RED HAT“好用”(呵呵,又是很当时很浅薄的看法),唉,我说这LIUNX为什么尽管免费还这么难普及呢,看来不是没有原因的。于是LINUX对我来说就一直是个迷。

第三次就是这几天了。其实仅管我颇受挫折,但还是对LINUX不死心。大四上期开学一个多星期后临时决定考研,于是忙着找方向、学校,这个时候“嵌入式”跳入我的眼中。我隐隐约约听说过所谓一般的研究生,就比本科生自由一点而已,还是呆学校上课什么的,理论性比较强。我早讨厌这种学习了,于是不想报考工学或理学硕士,结果偶然之间发现了“工程硕士”这种类型。所谓工程硕士,跟工学硕士等“名门正派”来说,就是培养实践型人才的硕士,其学历跟工学硕士是一样的,但国内分单、双证,然后好像了解的人不多,对此有歧视心理,这是中国人正统的观念太强啊:)我看了很多文章后发现,嵌入式的发展方向主要分为偏硬和偏软方向,偏硬我就不多说了,偏软主要分三个小方向:ARM+LINUX,ARM+WINCE,ARM+VxWorks。我想挑战一下自己,就选嵌入式的工程硕士吧,而且想主修ARM+LINUX方向,呵呵,由此我又跟LINUX结上了缘。最近看笔记本品牌时,发现一些PC大厂如DELL等居然声称要预装LINUX操作系统,这很反常啊,呵呵。于是想一探究竟,就下载了这款3.97G的Ubuntu。下面我详细讲讲我安装它的经验,希望对后来人有点帮助。

首先,下载UBUNTU是很方便的,上官方网站下载即可。我选的是最全的3.97G的版本,下载了八个小时左右。
其次,下载并安装VMWARE,最新版要为VMWARE6,但很难找到序列号,我用的就是这个版本,也没法注册,提示说只能用六天。如果谁有序列号或注册机欢迎共享。其实开始我提到过,我安装过VMWARE,那是版本5.5的,但跟很多人一样我安装不成功VMware tools这个巨爽的工具,本论坛里就有人提到了(VMware5 + VMware Tools 6也算创新了,呵呵)。我还是受到了它的一点点启发。那些能在VMWARE5.5下安装成功VMware tools(不是版本6)的,对我来说,肯定是超牛的人,希望有人做到(具体来说,就是在VMware5上安装Ubuntu7.04后再成功安装VMware Tools)并共享经验。
再次,就是在VMWARE中安装Ubuntu。具体过程也是比较简单的,网上超多教程,这里只简单提几句:
1、新建一个虚拟机;
2、设置虚拟机的光驱不是连接物理光驱,而是来自文件,并选好下载的Ubuntu7.04的ISO文件(下载后解压缩即得);
3、启动虚拟机,自动开始安装UBUNTU,选择从文本方式下安装,我试过从图形模式下安装,像我这种配置几乎是不可能的了,竒慢无比。(虚拟机分配256MB内存)安装会很快,可以跳过网络设置;
4、安装好UBUNTU并启动后,点击VMWARE的VM菜单下的安装VMWARE TOOLS(必须启动UBUNTU的情况下才能安装,VMWARE会有提示的),然后就能在桌面发现一个光驱图标,打开,把那个带.gz的文件拖到桌面(其实就是复制到),然后然后解压缩到桌面,得到一个VMware-tools-distrib文件夹,从“应用程序/附件”打开一个终端,切换成ROOT用户,命令为:
sudo passwd root
会要求你输入切换之前用户的密码,并再次输入,提示修改ROOT密码成功。然后使用如下命令切换成ROOT:
su root
要求输入刚才设置的ROOT用户,这样就可以安装VMWARE TOOLS了。终于激动人心的一刻到了,用cd命令进入刚才解压缩的目录VMware-tools-distrib,如下是COPY我的整个安装过程,包括命令和显示结果:
vmware 6 tools installing information

root@RealTwo:/home/realtwo/Desktop/vmware-tools-distrib# ./vmware-install.pl
Creating a new VMware Tools installer database using the tar4 format.

Installing VMware Tools. This may take from several minutes to over an hour
depending upon its size.

In which directory do you want to install the binary files?
[/usr/bin]

What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc]

What is the directory that contains the init scripts?
[/etc/init.d]

In which directory do you want to install the daemon files?
[/usr/sbin]

In which directory do you want to install the library files?
[/usr/lib/vmware-tools]

In which directory do you want to install the documentation files?
[/usr/share/doc/vmware-tools]

The path "/usr/share/doc/vmware-tools" does not exist currently. This program
is going to create it, including needed parent directories. Is this what you
want? [yes]

The installation of VMware Tools 6.0.0 build-44426 for Linux completed
successfully. You can decide to remove this software from your system at any
time by invoking the following command: "/usr/bin/vmware-uninstall-tools.pl".

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]


Stopping VMware Tools services in the virtual machine:
Guest operating system daemon: done
Trying to find a suitable vmmemctl module for your running kernel.

None of the pre-built vmmemctl modules for VMware Tools is suitable for your
running kernel. Do you want this program to try to build the vmmemctl module
for your system (you need to have a C compiler installed on your system)?
[yes]

Using compiler "/usr/bin/gcc". Use environment variable CC to override.

What is the location of the directory of C header files that match your running
kernel? [/lib/modules/2.6.20-15-generic/build/include]

Extracting the sources of the vmmemctl module.

Building the vmmemctl module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vmmemctl-only'
make -C /lib/modules/2.6.20-15-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.20-15-generic'
CC [M] /tmp/vmware-config0/vmmemctl-only/os.o
SHIPPED /tmp/vmware-config0/vmmemctl-only/vmmemctl1.o
LD [M] /tmp/vmware-config0/vmmemctl-only/vmmemctl.o
Building modules, stage 2.
MODPOST 1 modules
WARNING: could not find /tmp/vmware-config0/vmmemctl-only/.vmmemctl1.o.cmd for /tmp/vmware-config0/vmmemctl-only/vmmemctl1.o
CC /tmp/vmware-config0/vmmemctl-only/vmmemctl.mod.o
LD [M] /tmp/vmware-config0/vmmemctl-only/vmmemctl.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.20-15-generic'
cp -f vmmemctl.ko ./../vmmemctl.o
make: Leaving directory `/tmp/vmware-config0/vmmemctl-only'
The module loads perfectly in the running kernel.

Extracting the sources of the vmhgfs module.

Building the vmhgfs module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vmhgfs-only'
make -C /lib/modules/2.6.20-15-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.20-15-generic'
CC [M] /tmp/vmware-config0/vmhgfs-only/backdoor.o
CC [M] /tmp/vmware-config0/vmhgfs-only/backdoorGcc32.o
CC [M] /tmp/vmware-config0/vmhgfs-only/bdhandler.o
CC [M] /tmp/vmware-config0/vmhgfs-only/cpName.o
CC [M] /tmp/vmware-config0/vmhgfs-only/cpNameLinux.o
CC [M] /tmp/vmware-config0/vmhgfs-only/cpNameLite.o
CC [M] /tmp/vmware-config0/vmhgfs-only/dbllnklst.o
CC [M] /tmp/vmware-config0/vmhgfs-only/dentry.o
CC [M] /tmp/vmware-config0/vmhgfs-only/dir.o
CC [M] /tmp/vmware-config0/vmhgfs-only/eventManager.o
CC [M] /tmp/vmware-config0/vmhgfs-only/file.o
CC [M] /tmp/vmware-config0/vmhgfs-only/filesystem.o
CC [M] /tmp/vmware-config0/vmhgfs-only/fsutil.o
CC [M] /tmp/vmware-config0/vmhgfs-only/hgfsBd.o
CC [M] /tmp/vmware-config0/vmhgfs-only/hgfsUtil.o
CC [M] /tmp/vmware-config0/vmhgfs-only/inode.o
CC [M] /tmp/vmware-config0/vmhgfs-only/kernelStubsLinux.o
CC [M] /tmp/vmware-config0/vmhgfs-only/link.o
CC [M] /tmp/vmware-config0/vmhgfs-only/message.o
CC [M] /tmp/vmware-config0/vmhgfs-only/module.o
CC [M] /tmp/vmware-config0/vmhgfs-only/page.o
CC [M] /tmp/vmware-config0/vmhgfs-only/request.o
CC [M] /tmp/vmware-config0/vmhgfs-only/rpcin.o
CC [M] /tmp/vmware-config0/vmhgfs-only/rpcout.o
CC [M] /tmp/vmware-config0/vmhgfs-only/staticEscape.o
CC [M] /tmp/vmware-config0/vmhgfs-only/stubs.o
CC [M] /tmp/vmware-config0/vmhgfs-only/super.o
LD [M] /tmp/vmware-config0/vmhgfs-only/vmhgfs.o
Building modules, stage 2.
MODPOST 1 modules
CC /tmp/vmware-config0/vmhgfs-only/vmhgfs.mod.o
LD [M] /tmp/vmware-config0/vmhgfs-only/vmhgfs.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.20-15-generic'
cp -f vmhgfs.ko ./../vmhgfs.o
make: Leaving directory `/tmp/vmware-config0/vmhgfs-only'
The module loads perfectly in the running kernel.

pcnet32 34052 0
Unloading pcnet32 module

Extracting the sources of the vmxnet module.

Building the vmxnet module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vmxnet-only'
make -C /lib/modules/2.6.20-15-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.20-15-generic'
CC [M] /tmp/vmware-config0/vmxnet-only/vmxnet.o
Building modules, stage 2.
MODPOST 1 modules
CC /tmp/vmware-config0/vmxnet-only/vmxnet.mod.o
LD [M] /tmp/vmware-config0/vmxnet-only/vmxnet.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.20-15-generic'
cp -f vmxnet.ko ./../vmxnet.o
make: Leaving directory `/tmp/vmware-config0/vmxnet-only'
The module loads perfectly in the running kernel.

Extracting the sources of the vmblock module.

Building the vmblock module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vmblock-only'
make -C /lib/modules/2.6.20-15-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.20-15-generic'
CC [M] /tmp/vmware-config0/vmblock-only/linux/block.o
CC [M] /tmp/vmware-config0/vmblock-only/linux/control.o
CC [M] /tmp/vmware-config0/vmblock-only/linux/dbllnklst.o
CC [M] /tmp/vmware-config0/vmblock-only/linux/dentry.o
CC [M] /tmp/vmware-config0/vmblock-only/linux/file.o
CC [M] /tmp/vmware-config0/vmblock-only/linux/filesystem.o
CC [M] /tmp/vmware-config0/vmblock-only/linux/inode.o
CC [M] /tmp/vmware-config0/vmblock-only/linux/module.o
CC [M] /tmp/vmware-config0/vmblock-only/linux/stubs.o
CC [M] /tmp/vmware-config0/vmblock-only/linux/super.o
LD [M] /tmp/vmware-config0/vmblock-only/vmblock.o
Building modules, stage 2.
MODPOST 1 modules
CC /tmp/vmware-config0/vmblock-only/vmblock.mod.o
LD [M] /tmp/vmware-config0/vmblock-only/vmblock.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.20-15-generic'
cp -f vmblock.ko ./../vmblock.o
make: Leaving directory `/tmp/vmware-config0/vmblock-only'
The module loads perfectly in the running kernel.

[EXPERIMENTAL] The Crosstalk service provides a new communication capability
with the Host, primarily for development at the moment. Would you like to
enable this feature? [no]



Detected X.org version 7.2.


Please choose one of the following display sizes that X will start with (1 -
15):

[1] "640x480"
[2]< "800x600"
[3] "1024x768"
[4] "1152x864"
[5] "1280x800"
[6] "1152x900"
[7] "1280x1024"
[8] "1376x1032"
[9] "1400x900"
[10] "1400x1050"
[11] "1440x900"
[12] "1680x1050"
[13] "1600x1200"
[14] "1920x1200"
[15] "2364x1773"
Please enter a number between 1 and 15:

[2] 3


X Window System Version 7.2.0
Release Date: 22 January 2007
X Protocol Version 11, Revision 0, Release 7.2
Build Operating System: Linux Ubuntu
Current Operating System: Linux RealTwo 2.6.20-15-generic #2 SMP Sun Apr 15 07:36:31 UTC 2007 i686
Build Date: 04 April 2007
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(++) Log file: "/tmp/vmware-config0/XF86ConfigLog.5438", Time: Sat May 19 22:26:23 2007
(++) Using config file: "/tmp/vmware-config0/XF86Config.5438"

X is running fine with the new config file.

(EE) AIGLX: Screen 0 is not DRI capable
(EE) xf86OpenSerial: Cannot open device /dev/input/wacom
No such file or directory.
Error opening /dev/input/wacom : Success
(EE) xf86OpenSerial: Cannot open device /dev/input/wacom
No such file or directory.
Error opening /dev/input/wacom : Success
(EE) xf86OpenSerial: Cannot open device /dev/input/wacom
No such file or directory.
Error opening /dev/input/wacom : Success
Could not init font path element /usr/X11R6/lib/X11/fonts/misc, removing from list!
Could not init font path element /usr/share/fonts/X11/cyrillic, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/Type1, removing from list!
FreeFontPath: FPE "/usr/share/fonts/X11/misc" refcount is 2, should be 1; fixing.
Starting VMware Tools services in the virtual machine:
Switching to guest configuration: done
Guest filesystem driver: done
Mounting HGFS shares: failed
Guest memory manager: done
Guest vmxnet fast network device: done
Blocking file system: done
DMA setup: done
Guest operating system daemon: done

The configuration of VMware Tools 6.0.0 build-44426 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 use the vmxnet driver, resvmxnettart networking using the following commands:
/etc/init.d/networking stop
rmmod pcnet32
rmmod vmxnet
modprobe vmxnet
/etc/init.d/networking start

If you wish to configure any experimental features, please run the following
command: "vmware-config-tools.pl --experimental".

Enjoy,

--the VMware team

好了,到这里你就算安装成功了,记得去掉UBUNTU的ROOT密码,命令

sudo passwd -l root
提示成功后,再切换成原来的用户,命令
su 原来的用户名
就可以了。OK,大功告成,现在就尽情享受VMWARE+UBUNTU+VMWARE TOOLS带来的巨大好处吧:)至于好处是什么,我就保个密了,呵呵。也可以去VMWARE的官方站点查看,如果英文够好的话:)

注:我是缺省安装,就是一路回车,这篇文章是我在Ubuntu中通过Firfox提交的。
分享到此结束,希望不是黄道婆的裹脚布,又长又臭,有问题的可以回贴讨论,谢谢大家!
mimihu88
帖子: 552
注册时间: 2006-04-03 11:26

#2

帖子 mimihu88 » 2007-05-20 22:29

vmware5.5 ubuntu 安装vmware-tools 有什么难的,关键记得先安装和你ubuntu版本相对应的gcc 和 linux-header就行啦
回复