正在加载...
 

董永乐的盲窗

完美、专注、自信、审慎、理念

    Linux上虚拟机不能启动问题的解决  

    昨天在我们的监测系统中发现客户的一台服务器不能连接。

    那台服务器其实是个虚拟机,运行在Redhat Linux上的vmware server 1.04上。

    之前都好好的。

    登上宿主机一看,虚拟机没起来。看日志宿主机重启过,原因不明。机器是托管在机房的,也不好查了。然而,之前的几次重启也没有影响到虚拟机自动开机。

    手工起一下,也不行。执行vmrun start "/opt/vmware/virtual-machines/webmail/Other Linux 2.6.x kernel.vmx"一直不返回。

    看vmware-serverd.log,有报错:

    ...

    //略过一大段正常的信息

    //下面是错误信息

    Sep 05 18:09:22: app| vmserverd: Could not connect to virtual machine /opt/vmware/virtual-machines/webmail/Other Linux 2.6.x kernel.vmx: Unexpected response from vmware-authd: Error connecting to /usr/lib/vmware/bin/vmware-vmx process.
    Sep 05 18:09:22: app| Failed to connect to vm: /opt/vmware/virtual-machines/webmail/Other Linux 2.6.x kernel.vmx
    Sep 05 18:09:22: app| vmdbPipe_Streams Couldn't read: OVL_STATUS_EOF
    Sep 05 18:09:22: app| Operation failed to change the VM to the expected power state.
    Sep 05 18:09:22: app| VM suddenly changed state: poweredOff.
    Sep 05 18:09:22: app| VM suddenly changed state: poweredOff.
    Sep 05 18:09:22: app| VM suddenly changed state: poweredOff.
    ...

    //再略过一段正常的信息

    //下面是错误信息

    Sep 05 18:10:51: app| VMServerdConnect: connecting to /opt/vmware/virtual-machines/webmail/Other Linux 2.6.x kernel.vmx
    Sep 05 18:10:51: app| vmserverd: Could not connect to virtual machine /opt/vmware/virtual-machines/webmail/Other Linux 2.6.x kernel.vmx: Unexpected response from vmware-authd: Error connecting to /usr/lib/vmware/bin/vmware-vmx process.
    Sep 05 18:10:51: app| Failed to connect to vm: /opt/vmware/virtual-machines/webmail/Other Linux 2.6.x kernel.vmx
    Sep 05 18:10:51: app| vmdbPipe_Streams Couldn't read: OVL_STATUS_EOF
    Sep 05 18:10:51: app| Operation failed to change the VM to the expected power state.
    Sep 05 18:10:51: app| VM suddenly changed state: poweredOff.
    Sep 05 18:10:51: app| VM suddenly changed state: poweredOff.
    Sep 05 18:10:51: app| VM suddenly changed state: poweredOff.
    Sep 05 18:12:22: app| /opt/vmware/virtual-machines/webmail/Other Linux 2.6.x kernel.vmx could not be Auto Powered On. May be it takes longer to determine the state. Please check the log of the VM.
    Sep 05 18:12:23: app| vmware-serverd entering main loop.
    Sep 05 18:20:56: app| vmdbPipe_Streams Couldn't read: OVL_STATUS_EOF
    Sep 05 18:20:56: app| SP: Deleting user session: 0 username: root
    Sep 05 18:23:56: app| Signal 15 caught.  Requesting shutdown.
    Sep 05 18:23:56: app| Shutting down vmserverd (0).
    Sep 05 18:24:01: app| IPC_exit: disconnecting all threads

    根据报错信息在google上搜索,也没有找到解决方法。

    后来检查虚拟机的配置文件如下:

    #!/usr/bin/vmware
    config.version = "8"
    virtualHW.version = "4"
    scsi0.present = "TRUE"
    scsi0.virtualDev = "lsilogic"
    memsize = "256"
    scsi0:0.present = "TRUE"
    scsi0:0.fileName = "Other Linux 2.6.x kernel.vmdk"
    ide1:0.present = "FALSE"
    ide1:0.fileName = "C:\TDDOWNLOAD\CentOS-4.6-i386-bin1of4.iso"
    ide1:0.deviceType = "cdrom-image"
    floppy0.present = "FALSE"
    Ethernet0.present = "TRUE"
    Ethernet0.connectionType = "nat"
    displayName = "webmail"
    guestOS = "other26xlinux"
    priority.grabbed = "normal"
    priority.ungrabbed = "normal"

    scsi0:0.redo = ""
    ethernet0.addressType = "generated"
    uuid.location = "56 4d 6e 9e 74 05 38 29-a2 d7 0c bc d1 29 1d 42"
    uuid.bios = "56 4d 71 a5 d9 6b 1a 03-aa 58 f3 49 8f 3a 5c f4"
    ethernet0.generatedAddress = "00:0c:29:3a:5c:f4"
    ethernet0.generatedAddressOffset = "0"

    ide1:0.autodetect = "TRUE"

    ide1:0.startConnected = "TRUE"

    autostart = "poweron"
    autostop = "softpoweroff"
    workingDir = "."
    显然,这个虚拟机是从Windows上移过来的。从ide1:0.fileName = "C:\TDDOWNLOAD\CentOS-4.6-i386-bin1of4.iso"就可以知道了。

    抱着姑且一试的心理,把配置文件改成下面这样:

    #!/usr/bin/vmware
    config.version = "8"
    virtualHW.version = "4"
    scsi0.present = "TRUE"
    scsi0.virtualDev = "lsilogic"
    memsize = "256"
    scsi0:0.present = "TRUE"
    scsi0:0.fileName = "Other Linux 2.6.x kernel.vmdk"
    ide1:0.present = "FALSE"
    ide1:0.fileName = "/tmp/CentOS-4.6-i386-bin1of4.iso"
    ide1:0.deviceType = "cdrom-image"
    floppy0.present = "FALSE"
    Ethernet0.present = "TRUE"
    Ethernet0.connectionType = "nat"
    displayName = "webmail"
    guestOS = "other26xlinux"
    priority.grabbed = "normal"
    priority.ungrabbed = "normal"

    scsi0:0.redo = ""
    ethernet0.addressType = "generated"
    uuid.location = "56 4d 6e 9e 74 05 38 29-a2 d7 0c bc d1 29 1d 42"
    uuid.bios = "56 4d 71 a5 d9 6b 1a 03-aa 58 f3 49 8f 3a 5c f4"
    ethernet0.generatedAddress = "00:0c:29:3a:5c:f4"
    ethernet0.generatedAddressOffset = "0"

    autostart = "poweron"
    autostop = "softpoweroff"
    workingDir = "."
    去掉了两行:

    ide1:0.autodetect = "TRUE"

    ide1:0.startConnected = "TRUE"

    修改了一行:

    ide1:0.fileName = "C:\TDDOWNLOAD\CentOS-4.6-i386-bin1of4.iso"  -->   ide1:0.fileName = "/tmp/CentOS-4.6-i386-bin1of4.iso"
    再创建一个文件瞒混过关:

    touch "/tmp/CentOS-4.6-i386-bin1of4.iso"
    再试,起来了。:)

    问题解决了,问题产生的原因却没彻底搞清楚。我想到做这个修改是因为看到日志中的这条错误信息:

    May be it takes longer to determine the state.

    在vmware console中启动虚拟机时,如果不能启动CD-ROM设备,会弹出一个消息框,等待你按确定来关闭。但即时不关,虚拟机也会继续启动。所以,还不能确定这是否就是问题所在。今天周末,下次再琢磨吧。

     

    标签:vmware | 浏览数(205) | 评论数(0) | 09-06 10:36
    windows xp sp3 环境下 vmware server 1.0.4 虚拟网卡不能正常使用的问题与解决  

    最近需要重现在客户那里出现的几个问题, 用vmware来搭建实验环境是比较方便的.

     

    由于vmware server可以作为service启动, 不需要登录, 所以我已经有一段时间不用vmware workstation了. (而且vmware workstation 6创建的虚拟机不能用之前的版本打开, 这是我所不喜欢的特性.)

     

    问题发生在应用Windows XP SP3之后,

     

    vmware的虚拟网卡不能启动了.

     

    一开始我没在意, 以为是偶然现象. 然后想也没想就重装了vmware server 1.0.4, 而且还神差鬼使地选择了修复.

     

    这一修复不打紧, 我的Windows XP也崩溃了.

     

    我以为是RPWT, 于是在另一台机器上再试. 同样的问题发生了.

     

    也许正版会好一点? 我的X60上带有正版的XP, 也打了SP3. 还是不行. 这次我可没敢再让vmware自己"修复".

     

    想起来vmware已经提示我很多次有update可用, 于是去vmware的网站上一看, 已经1.0.6了. 赶紧下载了, 安装, 重启, 一切顺利.

     

    想起来Connet Help team给我的建议: Always upgrade to the latest version and apply the most recently update.  软件是可以修好的, 所以, 出问题时试试最新的版本总是一条需要尝试的路.

     

    随便说一下: vmware server 1.0.6可以用之前1.0.4的license. 最新的版本是2.0 RC1, 我还没来得及尝试.

     

    标签:点滴,Windows XP,vmware | 浏览数(196) | 评论数(0) | 08-06 12:02
    让VMware支持宽屏显示器  

    今天在台式机上安装了vmware. 一切都好, 除了分辨率和我的宽屏不对付.

    在网上一搜, 就找到答案了. 强大的互联网啊!

    http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1003

    记在这里, 以后要用好找.

    标签:点滴,vmware | 浏览数(255) | 评论数(0) | 07-16 10:18

      Powered by Haiwit