前置作業一:環境設定

# 安裝perl
cd /usr/ports/lang/perl5.18
make install clean

# 安裝compat6x
cd /usr/ports/misc/compat6x/
make install clean

 

取得安裝檔,如果你手邊有準備好的檔案請跳過這步驟。

# 在vSphere上掛載iso後mount進去,並把安裝檔拉出來(拉完後記得卸載)
mount -t cd9660 /dev/cd0 /media
cp /media/vmware-freebsd-tools.tar.gz /tmp
umount /media
cd /tmp

# 解壓縮
tar -zxvf vmware-freebsd-tools.tar.gz

 

下載ogris提供的patch進行修正,請放到/tmp

cd /tmp
fetch http://ogris.de/vmware/vmware-tools-distrib.diff
fetch http://ogris.de/vmware/vmblock-only.diff

# 如果你是ESXI5.5,請fetch vmmemctl-only55.diff
fetch http://ogris.de/vmware/vmmemctl-only.diff
fetch http://ogris.de/vmware/vmmemctl-only55.diff

 

開始進行修正(可以寫成shell script來跑,注意路徑問題)

cd /tmp/vmware-tools-distrib
patch -p1 < /tmp/vmware-tools-distrib.diff
cd lib/modules/source/
tar xf vmblock.tar
tar xf vmmemctl.tar
cd vmblock-only
patch -p1 < /tmp/vmblock-only.diff
make
make install
cd ../vmmemctl-only

# ESXI版本注意,請自行修改
patch -p1 < /tmp/vmmemctl-only.diff # ESXi5: /tmp/vmmemctl-only55.diff
make
make install
cd ../../../../

 

前置作業準備就緒,執行安裝

/tmp/vmware-tools-distrib/vmware-install.pl

Reference:Ogris: VMware Tools on FreeBSD 10.0

留言