VMware Server和Linux 5安VMware Tools

jst143發表於2011-12-25

  按照Readme中的安裝方法,一步步按照預設的設定下來,出現如下錯誤:

  What is the location of the directory of C header files that match your running kernel? [/usr/src/linux/include]The directory of kernel headers (version 2.6.18-8.el5xen) does not match.

  可以使用

  [root@localhost ~]# uname -r // 檢視核心版本號

  檢視目錄/usr/src/ 根本沒有linux這個目錄

  在網上收到資料:沒有安裝 kernel-xen-devel rpm包,在安裝盤中找到這個rpm包:kernel-xen-devel-2.6.18-8.el5.i686.rpm

  安裝:

  [root@localhost ~]# rpm -ivh kernel-xen-devel-2.6.18-8.el5.i686.rpm

  再使用vmware-install.pl安裝,即可自動找到配套的the directory of C header files

  注意,網上還有人說需要安裝的rpm包是kernel-devel,經過測試,安裝kernel-devel-2.6.18-8.el5.i686.rpm包後依然無法自動找到the directory of C header files,如果手動改目錄為:/usr/src/kernels/2.6.18-8.e15-i686/include,會出現錯誤:
  The directory of kernel headers (version 2.6.18-8.el5) does not match your running kernel (version 2.6.18-8.el5xen). Even if  the module were tocompile successfully, it would not load into the running kernel.

  這就是安裝的rpm不正確導致的。

  安裝好kernel-xen-devel-2.6.18-8.el5.i686.rpm包後,這樣就一直enter,裝完VMware Tools

  在安裝的最後階段,會出現:

  Do you want to change your guest X resolution? (yes/no) [no] y

  Please choose one of the following display sizes (1 - 13):
  [1] "640x480"
  [2]< "800x600"
  [3] "1024x768"
  [4] "1152x864"
  [5] "1280x800"
  [6] "1152x900"
  [7] "1280x1024"
  [8] "1376x1032"
  [9] "1400x1050"
  [10] "1680x1050"
  [11] "1600x1200"
  [12] "1920x1200"
  [13] "2364x1773"
  Please enter a number between 1 and 13:

  [3]

  到了這步,千萬別重啟看效果,還要修改xorg config設定,不然重啟後會報X-WINDOWS出錯。

  進入/etc/X11/,用文字開啟xorg.conf,加上以下幾段:

  Section "Monitor"
    Identifier "vmware"
  EndSection

  Section "InputDevice"
     Identifier "Mouse0"
     Driver "vmmouse"
    Option "Protocol" "Auto"
    Option "Device" "/dev/input/mouse0"
  EndSection

  然後找到 含有"ServerLayout" 的section, 在Section跟EndSection之間加上以下一行。

  InputDevice "Mouse0" "CorePointer"

  終於大功告成,重啟看看效果了

  重啟之後,resolution不知道為何並沒有變化,有待進一步研究,但是Mouse移進移出VMware可以不用再使用Ctrl+Alt鍵了

 

10、修改/boot/grub/grub.conf檔案
# cp /boot/grub/grub.conf /boot/grub/grub.conf.bak
# gedit /boot/grub/grub.conf
將kernel /vmlinuz-2.6.18-92.1.10.el15 ro root=/dev/VolGroup00/LogVol00 rhgb quiet 
修改成 kernel /vmlinuz-2.6.18-92.1.10.el15 ro root=/dev/VolGroup00/LogVol00 rhgb quiet clock=pit nosmp noapic nolapic 

11、修改檔案:C:\Documents and Settings\All Users\Application Data\VMware\VMware Server\config.ini
新增如下三行:
host.cpukHz = "2800000"
host.noTSC = "TRUE"
ptsc.noTSC = "TRUE"
其中:host.cpukHz要根據你的cpu的實際主頻修改,例子中表示CPU主頻是2.8G。

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/23577591/viewspace-713922/,如需轉載,請註明出處,否則將追究法律責任。

相關文章