
标签:vmware | 浏览数(204) | 评论数(0) | 09-06 10:36昨天在我们的监测系统中发现客户的一台服务器不能连接。
那台服务器其实是个虚拟机,运行在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设备,会弹出一个消息框,等待你按确定来关闭。但即时不关,虚拟机也会继续启动。所以,还不能确定这是否就是问题所在。今天周末,下次再琢磨吧。
Powered by Haiwit