wiki:TipAndDoc/VM/VMware/Workstation

VMware Workstation for Linux without X

  • X11Forwardingを用いることで、Xが入っていないホストでも動作可能
  • インストーラをX11forward経由で起動する場合、root権限が必要となる関係からroot login via sshが必要となる
  • CygwinのX Serverでも十分実用に耐える
  • 以下のようなエラーが出て、ゲストを起動できないことがある
    Could not open /dev/vmmon: No such file or directory.
    
    • lsmod | grep vm で何も出ない場合は、sudo service vmware start

VMware workstaion 9 on Ubuntu 12.10 (beta)

  • kernel 3.5.0-17-generic

how to patch

  • mitty@quantal:~$ wget http://communities.vmware.com/servlet/JiveServlet/download/2103172-94260/vmware9_kernel35_patch.tar.bz2
  • mitty@quantal:~$ tar xjf vmware9_kernel35_patch.tar.bz2
  • mitty@quantal:~/vmware9_kernel3.5_patch$ sudo ./patch-modules_3.5.0.sh
    patching file vmmon-only/linux/hostif.c
    Stopping VMware services:
       VMware Authentication Daemon                                        done
    At least one instance of VMware VMX is still running.
    Please stop all running instances of VMware VMX first.
    
       VMware Authentication Daemon                                        done
    Unable to stop services
    
    
    All done, you can now run VMWare WorkStation.
    Modules sources backup can be found in the '/usr/lib/vmware/modules/source-workstation9.0.0-2012-10-10-12:10:29-backup' directory
    
  • mitty@quantal:~$ sudo rm /lib/modules/$(uname -r)/misc/vm*
    removed `/lib/modules/3.5.0-17-generic/misc/vmblock.ko'
    removed `/lib/modules/3.5.0-17-generic/misc/vmci.ko'
    removed `/lib/modules/3.5.0-17-generic/misc/vmmon.ko'
    removed `/lib/modules/3.5.0-17-generic/misc/vmnet.ko'
    

VMware workstaion 9 on Ubuntu 12.04

  • Linux hostname 3.2.0-30-generic #48-Ubuntu SMP Fri Aug 24 16:52:48 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
  • VMware Workstation 9.0.0 build-812388
  • 必要パッケージ
    • $ sudo aptitude install -R build-essential x11-utils gconf2 libasound2 libgksu2-0
  • gconf2, libasound2
    • /tmp/vmware-mitty/vmware-ui-6658.log
      2012-09-09T00:11:43.055+09:00| vmui| W110: gconftool-2 failed: Failed to execute child process "gconftool-2" (No such file or directory)
      
      2012-09-09T00:11:30.218+09:00| vmui| I120: HostDeviceInfoFindHostAlsaSoundDevices: Failed loading Alsa library to detect sound devices.
      
  • libgksu2-0
    • ActivationでEnter License Key... ボタンを押しても何も起きない
    • /tmp/vmware-mitty/vmware-apploader-7817.log
      2012-09-09T00:22:18.442+09:00| appLoader| I120: Unable to dlopen libgtk-x11-2.0.so.0 on the system.  libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory
      
      2012-09-09T00:22:18.474+09:00| appLoader| W110: Unable to load libgksu2.so.0 from /usr/lib/vmware/lib/libgksu2.so.0/libgksu2.so.0: libstartup-notification-1.so.0: cannot open shared object file: No such file or directory
      2012-09-09T00:22:18.474+09:00| appLoader| W110: Unable to load dependencies for /usr/lib/vmware/lib/libvmware-gksu.so/libvmware-gksu.so
      2012-09-09T00:22:18.474+09:00| appLoader| W110: Unable to execute /usr/lib/vmware/bin/vmware-gksu.
      
    • 依存関係から、libxrandr2も導入される

3D graphics

  • opengl
  • 以下のようなエラーメッセージが出る
  • 試したが効果がない模様
    • sudo aptitude install -R libgl1-mesa-dev
    • sudo aptitude install -R libglu-dev
  • sudo aptitude install -R nvidia-current
    • VMware Communities: Workstation 9 - No 3D Acceleration to...
    • $ glxinfo | grep -i opengl
      OpenGL vendor string: ATI Technologies Inc.
      OpenGL renderer string: ATI Mobility Radeon HD 540v
      OpenGL version string: 1.4 (2.1.9115 FireGL)
      OpenGL extensions:
      
    • $ sudo nvidia-smi
      Sun Sep  9 01:04:37 2012
      +------------------------------------------------------+
      | NVIDIA-SMI 3.295.40   Driver Version: 295.40         |
      |-------------------------------+----------------------+----------------------+
      | Nb.  Name                     | Bus Id        Disp.  | Volatile ECC SB / DB |
      | Fan   Temp   Power Usage /Cap | Memory Usage         | GPU Util. Compute M. |
      |===============================+======================+======================|
      | 0.  Quadro NVS 140M           | 0000:01:00.0  N/A    |       N/A        N/A |
      |  N/A   59 C  N/A   N/A /  N/A |   3%    3MB /  127MB |  N/A      Default    |
      |-------------------------------+----------------------+----------------------|
      | Compute processes:                                               GPU Memory |
      |  GPU  PID     Process name                                       Usage      |
      |=============================================================================|
      |  0.           Not Supported                                                 |
      +-----------------------------------------------------------------------------+
      
  • Display -> Accelerate 3D graphics のチェックを外せば、エラーメッセージはとりあえず出なくなる

Ubuntu 10.04

  • X11forwardingでVMware WSを使用する際に必要となるパッケージ
  • Ubuntu 10.04.2 x86_64 (Linux hostname 2.6.32-31-generic #61-Ubuntu SMP Fri Apr 8 18:25:51 UTC 2011 x86_64 GNU/Linux)
  • build-essential
    • kernel moduleをbuildするために必要
  • gconf2
    bash: gconftool-2: command not found
    
  • x11-utils
    LOG NOT INITIALIZED | Unable to spawn xprop to determine whether accessibility is enabled or not.
    
  • libxrandr2
    /usr/lib/vmware/bin/vmware-vmx: error while loading shared libraries: libXrandr.so.2: cannot open shared object file: No such file or directory
    
    • /tmp/vmware-mitty/ui-4506.log
      May 26 02:19:44.284: vmui| VMHSHostConnectVMX: Failed to connect to pipe vmxcf80cfad64a6ae2f: No such file or directory
      
    • Unable to change VM power state

not required

  • 必須ではない(と思われる)パッケージ
    • 無くてもVMの起動そのものには支障がない模様
  • libglu-dev (Provided by: libglu1-mesa-dev)
    • Failed to load OpenGL utility (GLU) library.
    • もっとも、GLUを入れたからといって必ず3D対応になるわけではない模様
  • libasound2
    Failed to load Alsa sound library: libasound.so: cannot open shared object file: No such file or directory.
    Alsa sound will not be used.
    
    • Failed to load Alsa sound library

Debian 6.0

  • 必要なパッケージ
    • build-essential gconf2 x11-utils ia32-libs libxrandr2 libgtkmm-2.4-1c2a libglu-dev libasound2 ttf-vlgothic linux-headers-$(uname -r)
  • VMware Workstation 8 on Debian 6.0 x86_64では、insservまわりでエラーが出る
    • aptitude install ... で次のようなエラー
    • $ sudo aptitude install -R mdadm
      (snip)
      
      insserv: warning: script 'S50vmware-USBArbitrator' missing LSB tags and overrides
      insserv: warning: script 'vmware' missing LSB tags and overrides
      insserv: warning: script 'vmware-workstation-server' missing LSB tags and overrides
      insserv: warning: script 'vmware-USBArbitrator' missing LSB tags and overrides
      insserv: There is a loop at service munin-node if started
      insserv: There is a loop between service vmware-USBArbitrator and checkroot if started
      
      (snip)
      
  • munin-nodeと干渉した
    • /etc/insserv/overrides$ sudo insserv -r vmware-workstation-server
      insserv: warning: script 'vmware-workstation-server' missing LSB tags and overrides
      insserv: There is a loop between service munin-node and vmware-workstation-server if stopped
      insserv:  loop involving service vmware-workstation-server at depth 2
      insserv:  loop involving service munin-node at depth 1
      insserv: Stopping vmware-workstation-server depends on munin-node and therefore on system facility `$all' which can not be true!
      insserv: exiting now without changing boot order!
      
    • いったんmunin-nodeをremoveしてからinsservするか(スマートには回避出来ず…)
    • munin-nodeをインストールする前にVMware WSをインストールしておくことが必要
  • |VMware||Debian| VMwarePlayerの影響がinsservが引っかかる - わんこ日記(2011-11-22)

3.2.0-0.bpo.2-amd64

  • $ wget http://weltall.heliohost.org/wordpress/wp-content/uploads/2012/01/vmware802fixlinux320.tar.gz
  • $ cd /usr/lib/vmware/modules/source/
  • /usr/lib/vmware/modules/source$ sudo tar xf vmnet.tar
  • /usr/lib/vmware/modules/source$ sudo tar xzf /home/mitty/vmware802fixlinux320.tar.gz
  • /usr/lib/vmware/modules/source$ sudo patch -p1 < vmware3.2.0.patch
    patching file vmnet-only/filter.c
    patching file vmnet-only/netif.c
    patching file vmnet-only/userif.c
    
  • /usr/lib/vmware/modules/source$ sudo tar cf vmnet.tar vmnet-only/
  • vmware を再起動 -> 自動でモジュールがビルドされる

input underscore to Guest OS

  • 元々、次のような注意がゲスト起動のたびに表示される

  • アンダースコア以外の入力は正常
    • 半角全角等も問題ない
    • '_' (Shift+\) は '|' になる

.vmware/config

  • mitty@hades:~$ cat > .vmware/config
    xkeymap.language = jp106
    xkeymap.keycode.211 = 0x073
    
  • mitty@hades:~$ sudo service vmware restart

kernel update

  • ホストのカーネルがバージョンアップしバージョンナンバーが変わるとカーネルモジュールのリビルドが必要
  • vmwareコマンドでGUIを起動しようとすると、自動でリビルドが走る
    • rootで実行しないといけない場合がある模様

kernel.sched_compat_yield

  • マルチコア(マルチCPU)構成のゲストを起動しようとすると、以下の質問をされる

    The host's Linux kernel yield() functionality is disabled. Multiprocessor virtual machines exhibit degraded performance without yield(). Choose 'OK' to enable the sysctl 'kernel.sched_compat_yield' or 'Cancel' to continue without yield().

    • ここでOKとすると、一時的に /proc/sys/kernel/sched_compat_yield = 1 となるが、再起動するとこの設定は揮発する
    • /etc/sysctl.d/30-vmware-player
      kernel.sched_compat_yield=1
      
    • ファイル名に.confが付かないと読み込まれないので、ファイル名を変更する
    • $ sudo mv /etc/sysctl.d/30-vmware-player /etc/sysctl.d/30-vmware-player.conf

Promiscuous Mode

  • デフォルトではPromiscuous Modeは仮想NICに対して使用出来ない
  • vmware:287 Using Virtual Ethernet Adapters in Promiscuous Mode on a Linux Host

    VMware software does not allow the virtual Ethernet adapter to go into promiscuous mode unless the user running the VMware software has permission to make that setting. This follows the standard Linux practice that only root can put a network interface into promiscuous mode.

    One way to do this is to create a new group, add the appropriate users to the group, and give that group read/write access to the appropriate device. These changes need to be made on the host operating system as root (su). For example:

    chgrp newgroup /dev/vmnet0
    chmod g+rw /dev/vmnet0
    

    If you want all users to be able to set the virtual network adapter (/dev/vmnet0 in our example) to promiscuous mode, you can simply run the following command on the host operating system as root:

    chmod a+rw /dev/vmnet0
    
    • Hostを再起動すると元に戻るので注意(udevの設定をする必要があると書かれているが未検証)
Last modified 5 years ago Last modified on Oct 10, 2012 1:56:40 PM

Attachments (14)

Download all attachments as: .zip