linux 安裝VMware Tools 方法 (1)

    虛擬機安裝 VMware Tools for Linux




介紹:


VMware Tools是VMware虛擬機中自帶的一種增強工具,相當於VirtualBox中的增強功能(Sun VirtualBox Guest Additions),是VMware提供的增強虛擬顯卡和硬盤性能、以及同步虛擬機與主機時鐘的驅動程序。

只有在VMware虛擬機中安裝好了VMware Tools,才能實現主機與虛擬機之間的文件共享,同時可支持自由拖拽的功能,鼠標也可在虛擬機與主機之前自由移動(不用再按ctrl+alt),且虛擬機屏幕也可實現全屏化。

VMware Tools專欄提供VMware Tools下載及安裝方法(含VMware Tools在linux系統,如Ubuntu系統下的安裝方法),以及VMware Tools安裝出錯的解決方法。


作用解析:


1. 更新虛擬機中的顯卡驅動, 使虛擬機中的XWindows可以運行在SVGA模式下.

2. 提供一個vmware-toolbox, 這個Xwindows下的工具可以讓你修改一些VMWare的參數和功能.

3. 同步虛擬機和Host的時間.

4. 支持同一個分區的真實啓動和從虛擬機中啓動, 自動修改相應的設置文件.

VMware Workstation 從軟盤和/或 CD-ROM 直接安裝未修改的操作系統。在構造一臺虛擬

機時,這個安裝過程是第一步並且也是唯一必需的一步。

但是,VMware 強烈建議你在每一臺虛擬機中完成操作系統安裝之後立即安裝 VMware Tools 套件。在客戶操作系統中安裝 VMware Tools 非常重要。如果你不安裝 VMware Tools,虛擬機中的圖形環境被限制爲 VGA 模式圖形(640x480,16 色)。

使用 VMware Tools,SVGA 驅動程序被安裝,VMware Workstation 支持最高 32 位顯示和

高顯示分辨率,顯著提升總體的圖形性能。

工具包中的其他工具通過支持下面的增強,讓你更方便地使用你的虛擬機。注意,只有正

在運行 VMware Tools 時,這些增強纔可用。

在主機和客戶機之間時間同步

註釋: 只有當你在客戶操作系統中設置時鐘爲一個比在主機中設置的時間更早的時間時,纔可以在客戶和主機操作系統之間同步時間。

自動捕獲和釋放鼠標光標

在主機和客戶機之間或者從一臺虛擬機到另一臺虛擬機進行復制和粘貼操作

改善的網絡性能


組成部分:


VMware Tools 工具包由兩個組件組成:

一個爲 VMware Workstation 虛擬圖形卡優化的圖形驅動程序。對於 Linux 客戶操作系統,它包含我們自己的 XFree86 X server 版本。圖形驅動程序由嚮導安裝。安裝之後,需要在重啓動之後纔可以使用。

一個小的後臺應用程序,允許你在虛擬機中更改配置設置。VMware Workstation 控制光標設置和可移動設備的連接狀態,例如軟盤和 CD-ROM 驅動器。

光標設置允許你在虛擬機和主機圖形用戶界面之間平滑移動鼠標光標。光標設置也允許你在虛擬機和主機之間以及從一臺虛擬機到另一臺虛擬機複製和粘貼文本緩存。注意,只有當應用程序正在運行時,這些增強纔可用。


Linux VMware tools安裝步驟:


(1) 在CD-ROM虛擬光驅中選擇使用ISO鏡像,找到VMWARE TOOLS 安裝文件,如C:\Program Files (x86)\VMware\VMware Workstation\linux.iso

(2) 以ROOT身份進入LINUX

(3) 進入linux新建一個終端,輸入 /sbin/telinit 3 進入純文本模式,然後在純文本模式下再次用root身份登陸

(4)退出到windows,在虛擬機菜單欄中點擊 虛擬機-> 安裝VMWARE TOOLS子菜單,會彈出對話框,點擊"確認" 安裝

(5 )掛載光驅 mount /dev/cdrom /mnt/cdrom (注意命令中輸入的空格)這時,你的linux.iso裏面的文件就相當於windows光盤裏面的文件了

(6) 使用 cd /mnt/cdrom 進入光驅,輸入ls命令你會查看到有個*.tar.gz格式的文件(如vmware-linux-tools.tar.gz),然後輸入命令CP vmware-linux-tools /tmp/將它複製到/tmp/目錄下

(7)輸入命令 cd /tmp 進入/tmp目錄

(8)輸入命令tar -zxf vmware-linux-tools.tar.gz 將剛剛複製的vmware-linux-tools.tar.gz 解壓,默認解壓到vmware-linux-tools目錄下(與文件名同名)此時就會多出一個命名爲vmware-linux-tools文件夾,這裏和windows 裏面的解壓結果一樣。

(9)輸入命令 cdvmware-linux-tools 進入解壓後的目錄

(10) 輸入命令 ./*.pl 運行安裝VMware tools (*.pl文件在前面有提過)

(11)在運行安裝過程中,它會一步一步的有問題提出要你迴應,此過程中,你只要見到問題後面顯示[yes]、[no]、[yes/no]的都輸入yes,然後回車,其他的問題後面不管[ ]裏面是什麼直接回車就好,不要輸入。

(12)最後它會輸出1——15個分辨率讓你輸入數字選擇,根據你的顯示器來選擇分辨率吧

(13)好了,安裝完成,輸入命令 startx 回到linux圖像界面吧。



安裝步驟如下:

wKiom1O9aczSv53BAALB2g5_u5I377.jpg

wKiom1O9aczj5rgKAAIb9MmR_sQ318.jpg


[root@localhost VMware Tools]# ls 

manifest.txt     VMwareTools-9.6.0-1294478.tar.gz  vmware-tools-upgrader-64

run_upgrader.sh  vmware-tools-upgrader-32

[root@localhost VMware Tools]# cp  VMwareTools-9.6.0-1294478.tar.gz  /root/

[root@localhost VMware Tools]# cd  /root/

[root@localhost ~]# tar xzf  VMwareTools-9.6.0-1294478.tar.gz 

[root@localhost ~]# ls

anaconda-ks.cfg  install.log         VMwareTools-9.6.0-1294478.tar.gz

Desktop          install.log.syslog  vmware-tools-distrib

[root@localhost ~]# 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] 


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] 

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 9.6.0 build-1294478 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] 

Initializing...

Making sure services for VMware Tools are stopped.


Stopping Thinprint services in the virtual machine:

   Stopping Virtual Printing daemon:                                   done

Stopping VMware Tools services in the virtual machine:

   Guest operating system daemon:                          [確定]

   Unmounting HGFS shares:                                 [確定]

   Guest filesystem driver:                                [確定]



The VMware FileSystem Sync Driver (vmsync) allows external third-party backup 

software that is integrated with vSphere to create backups of the virtual 

machine. 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...



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



The VMware Host-Guest Filesystem allows for shared folders between the host OS 

and the guest OS in a Fusion or Workstation virtual environment.  Do you wish 

to enable this feature? [yes] 

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



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



The vmblock enables dragging or copying files between host and guest in a 

Fusion or Workstation virtual environment.  Do you wish to enable this feature?

[yes] 

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



VMware automatic kernel modules enables automatic building and installation of

VMware kernel modules at boot that are not already present. This feature can be


enabled/disabled by re-running vmware-config-tools.pl.


Would you like to enable VMware automatic kernel modules?

[no] 

Thinprint provides driver-free printing. Do you wish to enable this feature? 

[yes] 



Detected X version 7.1



Resolution detected as "800 x 600".



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


[1]  640x480

[2]< 800x600

[3]  1024x768

[4]  1280x800

Please enter a number between 1 and 4:


[2] 



X is running fine with the new config file.


Creating a new initrd boot p_w_picpath for the kernel.

   Starting Virtual Printing daemon:                                   done

   Checking acpi hot plug                                  [確定]

Starting VMware Tools services in the virtual machine:

   Switching to guest configuration:                       [確定]

   Paravirtual SCSI module:                                [確定]

   Guest memory manager:                                   [確定]

   VM communication interface:                             [確定]

   VM communication interface socket family:               [確定]

   Guest filesystem driver:                                [確定]

   Mounting HGFS shares:                                   [失敗]

   Blocking file system:                                   [確定]

   Guest operating system daemon:                          [確定]

The configuration of VMware Tools 9.6.0 build-1294478 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 "/usr/bin/vmware-toolbox-cmd" from the

command line.


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


Found VMware Tools CDROM mounted at /media/VMware Tools. Ejecting device 

/dev/sr0 ...

umount: /media/VMware Tools: device is busy

umount: /media/VMware Tools: device is busy

eject: unmount of `/media/VMware Tools' failed

Eject Failed:  If possible manually eject the Tools installer from the guest 

cdrom mounted at /media/VMware Tools before canceling tools install on the 

host.

[root@localhost vmware-tools-distrib]# init 6  這個命令可以打,也可以不打。不打的話就註銷一下就可以了。





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