試験運用中なLinux備忘録・旧記事

はてなダイアリーで公開していた2007年5月-2015年3月の記事を保存しています。

Linux 2.6.26上のVMware製品のパッチ済みモジュールに関する読み込み処理が怪しい件について

(2008/10/1)この記事の不具合については、VMware Playerのバージョン2.0.5(build 109488)の時点では解消されている。

VMware製品のカーネルモジュールがLinux 2.6.26上でビルドできない件とその対処」で扱ったパッチを当てたモジュールをビルド・インストールした後、動作を確認しようと思ったのだが、OS起動時にVMware関係のスクリプトが失敗していて、手動で開始しようとしても

$ sudo /etc/init.d/vmware start                        
 * Loading vmblock for drag and drop support ...                          [ ok ]
 * VMware Player is installed, but it has not been (correctly) configured
 * for the running kernel.
 * Please ensure that the modules have been compiled for this kernel:
 * emerge --oneshot vmware-modules
 * Also ensure VMware Player has been configured:
 * /opt/vmware/player/bin/vmware-config.pl
 * VMware is not properly configured! See above.                          [ !! ]
 * ERROR: vmware failed to start

うまくいかなかったため、vmware-config.plを実行したのだが

$ yes | sudo /opt/vmware/player/bin/vmware-config.pl
Making sure services for VMware Player are stopped.

 * WARNING: vmware is already stopped

Configuring fallback GTK+ 2.4 libraries.

This program previously created the file /dev/vmnet0, and was about to remove 
it.  Somebody else apparently did it already.

You have already setup networking.

Would you like to skip networking setup and keep your old settings as they are?
(yes/no) [yes] 
 * Loading vmblock for drag and drop support ...                          [ ok ]
 * Starting VMware services:                                              [ ok ]
 *   Virtual machine monitor                                              [ !! ]
 *   Virtual ethernet                                                     [ !! ]
 *   Module vmnet is not loaded. Please verify that it is loaded before   [ !! ]
 *   running this script.                                                 [ !! ]

The configuration of VMware Player 2.0.4 build-93057 for Linux for this running
kernel completed successfully.

You can now run VMware Player by invoking the following command: 
"/opt/vmware/player/bin/vmplayer".

Enjoy,

--the VMware team

どう見ても正常終了していない。嘘つき。*1

$ vmplayer
vmware is installed, but it has not been (correctly) configured
for this system. To (re-)configure it, invoke the following command:
/opt/vmware/player/bin/vmware-config.pl.

この状態では、もちろん起動はできない。この後vmware-config.plを再び実行してもダメで、先に進まない。
色々試行錯誤した末、

$ sudo /etc/init.d/vmware stop
$ sudo rm /etc/vmware/not_configured -f
$ for m in vmblock vmmon vmnet; do sudo modprobe ${m}; done
$ sudo /etc/init.d/vmware start

という流れで作業をする*2ことで起動できるようになることが分かったのだが、すっきりはしない。
手動でmodprobeをしないと

$ sudo /etc/init.d/vmware start
 * Loading vmblock for drag and drop support ...                          [ ok ]
 * Starting VMware services:                                              [ ok ]
 *   Virtual machine monitor                                              [ !! ]
 *   Virtual ethernet                                                     [ !! ]
 *   Module vmnet is not loaded. Please verify that it is loaded before   [ !! ]
 *   running this script.                                                 [ !! ]

となるのが嫌なので、とりあえず/etc/init.d/vmwarestart()関数の先頭に

modprobe vmmon
modprobe vmnet

を足してから

$ sudo /etc/init.d/vmware stop
$ sudo rm /etc/vmware/not_configured -f
$ sudo /etc/init.d/vmware start

とすることで、何とか普通に開始処理ができるようにはなった。
なお、dmesgでは

proc_dir_entry 'fs' already registered
Pid: 5237, comm: modprobe Tainted: P          2.6.26-tuxonice #2

Call Trace:
 [<ffffffff803bfe13>] ? idr_get_new+0x13/0x40
 [<ffffffff802e2c09>] proc_register+0x129/0x1e0
 [<ffffffff802e2dd9>] create_proc_entry+0x59/0xa0
 [<ffffffffa08e76bb>] :vmblock:VMBlockInitControlOps+0x2b/0x140
 [<ffffffffa08e826e>] :vmblock:init_module+0xe/0x50
 [<ffffffff80253cef>] sys_init_module+0x13f/0x19b0
 [<ffffffff80296520>] ? kmem_cache_destroy+0x0/0xf0
 [<ffffffff8020b77b>] system_call_after_swapgs+0x7b/0x80

というメッセージが出ているが、関係があるかどうかは不明。

使用したバージョン:

  • Linux 2.6.26(tuxonice-sources 2.6.26)
  • VMware Player 2.0.4 Build 93057 / vmware-modules 1.0.0.20 + パッチ

*1:設定のみに限定すれば、確かに正常に終了しているのかもしれないが...

*2:設定済みと見せかけつつ、モジュールを手動で読み込む