VMWare Server 使用技巧

1 無 X-Win 的 linux 安裝 vmware-tools 後, 使用命令列設定方式

  • 使用命令 : /usr/sbin/vmware-guestd
  • 參數語法 : <daemon> –cmd “vmx.set_option synctime <old_val> <new_val>”
  • Exp : 設定 vm 的時間與 host 同步
    vmware-guestd --cmd "vmx.set_option synctime 0 1"

  • 當設定完成後, 到 host 內看 vm 定義檔 *.vmx 可以發現多出一行:

    tools.syncTime = "TRUE"

  • 參考線上手冊 : Using the VMware Tools Command-Line Interface

2 VMWare-Server 2.0 背景啟動與關閉 VM 方式

  • 使用命令 : /usr/bin/vmrun
  • 參數語法 : -T server -h 'https://localhost:8333/sdk' -u root -p 'secret' <cmd>
  • Exp :
    vmrun -T server -h 'https://localhost:8333/sdk' -u root -p 'secret' list
    vmrun -T server -h 'https://localhost:8333/sdk' -u root -p 'secret' start "[] /vmfs/server_centos5/CentOS5.vmx"
    vmrun -T server -h 'https://localhost:8333/sdk' -u root -p 'secret' stop "[] /vmfs/server_centos5/CentOS5.vmx"

3 在 CentOS 上 mount VMWare 的 vmdk 方式

  • 使用命令 : /usr/bin/vmware-mount
  • 參數語法 : vmware-mount [pathfile.vmdk] 1 [mount_point]
  • Exp :
    vmware-mount -p maildata.vmdk 1 /tmp/t
執行如果出現以下的錯誤訊息

vmware-mount: error while loading shared libraries: libfuse.so.2: cannot open shared object file: No such file or directory

表示需要額外安裝 FUSE, 安裝程序如下:

wget http://superb-west.dl.sourceforge.net/sourceforge/fuse/fuse-2.6.5.tar.gz
tar -zxvf fuse-2.6.5.tar.gz
cd fuse-2.6.5
./configure
make
make install
vi /etc/ld.so.conf.d/fuse.conf
----
/usr/local/lib
----
ldconfig

 
回到頁頂
tech/vmware_tips.txt · 上一次變更: 2009-10-26 14:45 來自 jonathan
 
 
CC Attribution-Noncommercial-Share Alike 3.0 Unported
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0