[讨论]64位ubuntu server 8.04 安装 VMware 1.06 重启不能用的解决办法

Kvm、VMware、Virtualbox、Xen、Qemu 等
回复
luoguan
帖子: 2
注册时间: 2007-06-17 12:14

[讨论]64位ubuntu server 8.04 安装 VMware 1.06 重启不能用的解决办法

#1

帖子 luoguan » 2008-07-30 18:15

64位ubuntu server 8.04 安装 VMware 1.06 重启不能用的解决办法
根据网上文章在Ubuntu server 8.04 上面 安装VMware Server 1.0.6 ,但是我的 Ubuntu 8.04 是64位的,所以略有不同,在建立“软链接”时,64位ubuntu server 8.04 系统的软链接应该如下:
ln -s /usr/lib/libpng12.so.0.15.0 /usr/lib/vmware/lib/libpng12.so.0/libpng12.so.0
ln -s /lib/libgcc_s.so.1 /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1

其它与原文相同。建立软链接好后,要重新运行 /usr/bin/vmware-config.pl 配置一次。

安装后立即可用,但是重启机器后,无法再起动 VMware 服务.
运行 /etcinit.d//vmware start ,出现以下提示:
VMware Server is installed, but it has not been (correctly) configured
for the running kernel. To (re-)configure it, invoke the
following command: /usr/bin/vmware-config.pl.

重新配置后再次立即可用,但是再次重启机器后,仍然不能用。
日志文件/var/log/vmware/vmware-serverd.log 提示如下:

Jul 28 14:32:41: app| VmsdNetworkPopulate: There is nothing in netmap
Jul 28 14:32:41: app| impersonate Impersonate_Undo called when refCount == 0
Jul 28 14:32:41: app| Serverd hostname: lscmlinux
Jul 28 14:32:41: app| Setting up serverd discovery channel for vmxes
Jul 28 14:32:41: app| Successfully set up serverd discovery channel for vmxes
Jul 28 14:32:41: app| vmware-serverd entering main loop.
Jul 28 14:33:41: app| Msg_Post: Error
Jul 28 14:33:41: app| [msg.vmmonPosix.openFailed] Could not open /dev/vmmon: No such file or directory.
Jul 28 14:33:41: app| Please make sure that the kernel module `vmmon' is loaded.
Jul 28 14:33:41: app| Could not open /dev/vmmon: No such file or directory.
Jul 28 14:33:41: app| Please make sure that the kernel module `vmmon' is loaded.
Jul 28 14:33:41: app| ----------------------------------------
Jul 28 14:33:41: app| Msg_Post: Could not open /dev/vmmon: No such file or directory.
Jul 28 14:33:41: app| Please make sure that the kernel module `vmmon' is loaded.
Jul 28 14:33:41: app|
Jul 28 14:33:41: app| Msg_Post: Error
Jul 28 14:33:41: app| [msg.vmmonPosix.initFailed] Failed to initialize monitor device.
Jul 28 14:33:41: app| Failed to initialize monitor device.
Jul 28 14:33:41: app| ----------------------------------------
Jul 28 14:33:41: app| Msg_Post: Failed to initialize monitor device.
Jul 28 14:33:41: app|
Jul 28 14:33:45: app| CnxAcceptConnection: Could not send the magic marker on 30: Broken pipe
Jul 28 14:33:45: app| Failed to get IPC connection
Jul 28 14:34:18: app| Signal 15 caught. Requesting shutdown.
Jul 28 14:34:18: app| Shutting down vmserverd (0).
Jul 28 14:34:23: app| IPC_exit: disconnecting all threads
Jul 28 14:34:23: app| SP: Unregistered from the poll loop

查找原因花了很长时间(n的n次方小时)后,仍然没有找到原因,但是 lsmod 中确实没有加载 vmmon 和 vmnet 的模块。在内核模块目录中找到这两个 .ko 文件后,将它们添加到“模块注册表” /lib/modules/2.6.24-19-server/modules.dep 中保存,例如:
/lib/modules/2.6.24-19-server/misc/vmmon.ko:
/lib/modules/2.6.24-19-server/misc/vmnet.ko:

然后在 /etc/modules 中添加两行,让它们在机器启动时自动加载
vmmon
vmnet

然后修改 /etc/init.d/vmware 文件的权限
chmod u+rw /etc/init.d/vmware

编辑/etc/init.d/vmware文件,找到并修改下面这段(红字部分是本人修改的)

case "$1" in
start)
if [ -e "$vmware_etc_dir"/not_configured ]; then
rm -f "$vmware_etc_dir"/not_configured #--这是新增加的一行
modprobe vmmon
modprobe vmnet

echo "`vmware_product_name`"' is installed, but it has not been (correctly) configured'
echo 'for the running kernel. To (re-)configure it, invoke the'
echo 'following command: '"$vmdb_answer_BINDIR"'/vmware-config.pl.'
echo
# exit 1 # --这个#号 是新增加在前面的
fi
找到下面这段:
if [ "$exitcode" -gt 0 ]; then
# Set the 'not configured' flag
touch "$vmware_etc_dir"'/not_configured'
chmod 644 "$vmware_etc_dir"'/not_configured'
db_add_file "$vmware_db" "$vmware_etc_dir"'/not_configured' \
"$vmware_etc_dir"'/not_configured'
exit 1
fi
在这段的每一行前面都加 # 号注释掉。保存后重启动机器, VMware server 1.06 启动了,用客户端连接也可以了,新建虚拟机也可以启动和使用了。

为什么会出这个问题呢?还望高手指点。
其实,本人用得这种办法是“欺骗系统”的方法,并不是最佳解决方法。
回复