Ubuntu中Vmware Tools的安裝與卸載

   Vmware Tools是VMware提供的一套非常人性化的程序,可以用來解決虛擬機的分辨率問題,鼠標的性能,以及Ubuntu和宿主機文件的交換問題。必須在虛擬機已經開啓且已安裝操作系統的前提下才能安裝VmMware Tools。它是通過光盤鏡像的方式加載到相對應操作系統下來運行安裝的。

 

Vmware Tools的安裝

 

       首先進入Ubuntu系統,點擊VMware菜單的——虛擬機——安裝VMware Tools。這時,在Ubuntu下會自動加載Linux版的VMware Tools的安裝光盤鏡像。你會看到虛擬機的桌面上出現了一個名爲VMware Tools的光盤圖標,並且被自動打開。其中包括VMwareTools-5.3.3-34685-i386.rpm和VMwareTools- 5.3.3-34685.tar.gz兩個文件。(.rpm文件是給Red Hat準備的,我們只需要.tar.gz的那個)。

 

       首先打開終端設置root權限:

 

       Ubuntu默認是禁用root權限,所以安裝的第一步先要打開root權限。具體方法是:

 

  先打開終端:進入Ubuntu系統後,在桌面的左上角有個標籤:Application—附件—終端。然後輸入

  sudo su

 

  回車後,輸入當前用戶密碼,就進入root權限。

 

  Ubuntu下得到root權限

 

       然後在終端輸入下面的命令

 

       切換到VMware Tools目錄

  cd /cdrom/VMware Tools

 

  拷貝VMwareTools-6.0.0-55017.tar.gz文件到根目錄

  cp VMwareTools-6.0.0-55017.tar.gz /

  注:不同的VMware版本文件名可能不同。

 

  切換到根目錄

  cd /

 

  執行解壓命令,解壓縮tar包

  tar vzxf VMwareTools-6.0.0-55017.tar.gz

 

  切換到vmware-tools-distrib目錄

  cd vmware-tools-distrib/

 

  安裝VMware Tools 

  ./vmware-install.pl

 

  一路回車,直到最後出現“Enjoy——the VMware team”的字樣,VMwareTools安裝完成。

 


VMware tools的卸載

 

      /vmware-tools-distrib/bin/vmware-uninstall-tools.pl

 

       但是當再次安裝Vmware Tools時,會出現錯誤。解決的辦法是在安裝前把 /usr/lib/vmware-tools刪除:

       rm -rvf /usr/lib/vmware-tools

 

       然後再重新安裝Vmware tools,就可以安裝成功。

 

操作過程如下:

[root@localhost ~]# cd /
[root@localhost /]# ls
bin   dev home lost+found misc net proc sbin     srv tftpboot usr
boot etc lib   media       mnt   opt root selinux sys tmp       var
[root@localhost /]# cd /media
[root@localhost media]# ls
VMware Tools
[root@localhost media]# cd VMware\ Tools/
[root@localhost VMware Tools]# ls
manifest.txt VMwareTools-8.1.3-203739.tar.gz
[root@localhost VMware Tools]# cp VMwareTools-8.1.3-203739.tar.gz    /tmp
[root@localhost VMware Tools]# cd /tmp
[root@localhost tmp]# ls
gconfd-root                                 scim-helper-manager-socket-root
keyring-lbbFvv                              scim-panel-socket:0-root
mapping-root                                scim-socket-frontend-root
orbit-root                                  ssh-FmnVlj2751
scim-bridge-0.3.0.lockfile-0@localhost:0.0 virtual-root.ZxmHUV
scim-bridge-0.3.0.socket-0@localhost:0.0    VMwareTools-8.1.3-203739.tar.gz
[root@localhost tmp]# tar -zxf VMwareTools-8.1.3-203739.tar.gz 
[root@localhost tmp]# ls
gconfd-root                                 scim-panel-socket:0-root
keyring-lbbFvv                              scim-socket-frontend-root
mapping-root                                ssh-FmnVlj2751
orbit-root                                  virtual-root.ZxmHUV
scim-bridge-0.3.0.lockfile-0@localhost:0.0 VMwareTools-8.1.3-203739.tar.gz
scim-bridge-0.3.0.socket-0@localhost:0.0    vmware-tools-distrib
scim-helper-manager-socket-root
[root@localhost tmp]# cd vmware-tools-distrib/
[root@localhost vmware-tools-distrib]# ls
bin doc etc FILES INSTALL installer lib vmware-install.pl
[root@localhost vmware-tools-distrib]# ./vmware-install.pl 
Creating a new VMware Tools installer database using the tar4 format.

Installing VMware Tools.

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


The path "yes" is a relative path. Please enter an absolute path.

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/rc.d] 

What is the directory that contains the init scripts? 
[/etc/rc.d/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] 

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

yes   

In which directory do you want to install the documentation files? 
[/usr/share/doc/vmware-tools] 
The path "yes" is a relative path. Please enter an absolute path.

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 8.1.3 build-203739 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:                          [確定]
Virtual Printing daemon:                                [確定]
Unmounting HGFS shares:                                 [確定]
Guest filesystem driver:                                [確定]

Found a compatible pre-built module for vmmemctl. Installing it...

Found a compatible pre-built module for vmhgfs. Installing it...

Found a compatible pre-built module for vmxnet. Installing it...

Found a compatible pre-built module for vmblock. Installing it...

[EXPERIMENTAL] The VMware FileSystem Sync Driver (vmsync) is a new feature that
creates backups of virtual machines. Please refer to the VMware Knowledge Base 
for more details on this capability. Do you wish to enable this feature? 
[no] 

Found a compatible pre-built module for vmci. Installing it...

Found a compatible pre-built module for vsock. Installing it...

Found a compatible pre-built module for vmxnet3. Installing it...

Found a compatible pre-built module for pvscsi. Installing it...

Detected X.org version 7.1.

Host resolution detected as "1440 x 900".

Please choose one of the following display sizes that X will start with:

[1] "320x200"
[2] "320x240"
[3] "400x300"
[4] "512x384"
[5] "640x400"
[6] "640x480"
[7] "720x480"
[8] "800x480"
[9] "854x480"
[10] "720x576"
[11] "800x600"
[12] "1024x768"
[13] "1280x720"
[14] "1280x768"
[15] "1152x864"
[16] "1280x800"
[17]< "1366x768"
Please enter a number between 1 and 17:

[17] 12   


X Window System Version 7.1.1
Release Date: 12 May 2006
X Protocol Version 11, Revision 0, Release 7.1.1
Build Operating System: Linux 2.6.18-128.1.16.el5 i686 Red Hat, Inc.
Current Operating System: Linux localhost.localdomain 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:54 EDT 2009 i686
Build Date: 22 July 2009
Build ID: xorg-x11-server 1.1.1-48.67.el5 
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.16172", Time: Thu Apr 1 02:40:28 2010
(++) Using config file: "/tmp/vmware-config0/XF86Config.16172"
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Multiple symbols for level 1/group 1 on key <I5F>
>                   Using XF86Sleep, ignoring XF86Standby
> Warning:          Symbol map for key <I5F> redefined
>                   Using last definition for conflicting fields
Errors from xkbcomp are not fatal to the X server

X is running fine with the new config file.

FreeFontPath: FPE "unix/:7100" refcount is 2, should be 1; fixing.
Creating a new initrd boot image for the kernel.
Starting VMware Tools services in the virtual machine:
Switching to guest configuration:                       [確定]
Paravirtual SCSI module:                                [確定]
Guest filesystem driver:                                [確定]
Mounting HGFS shares:                                   [失敗]
Guest memory manager:                                   [確定]
Guest vmxnet fast network device:                       [確定]
VM communication interface:                             [確定]
VM communication interface socket family:               [確定]
Blocking file system:                                   [確定]
File system sync driver:                                [確定]
Guest operating system daemon:                          [確定]
Virtual Printing daemon:                                [確定]

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.

To use the vmxnet driver, restart networking using the following commands: 
/etc/init.d/network stop
rmmod pcnet32
rmmod vmxnet
modprobe vmxnet
/etc/init.d/network start

Enjoy,

--the VMware team

Found VMware Tools CDROM mounted at /media/VMware Tools. Ejecting device 
/dev/hdc ...
[root@localhost vmware-tools-distrib]# 




參考自:http://blog.sina.com.cn/s/blog_5aef3d000100f5so.html

            http://apps.hi.baidu.com/share/detail/17429552

            http://ideasforjava.iteye.com/blog/656674

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章