esxi命令行操作

解决VMware vSphere Client无法连接ESXi虚拟主机方法
http://hi.baidu.com/iwriting/blog/item/743e4f0aa15c5ddb3bc7631c.html

1 一般情况下重启services.sh就可以解决(或图形界面下restart management agent)
services.sh restart
2 若重启services.sh报错且仍然无法连接
watchdog-hostd:PID file /var/run/vmware/watchdog-hostd.PID not found
watchdog-hostd:Unable to terminate watchdog:Can't find process
/etc/init.d/hostd:kill:48:(84046924)-No such process
这个报错是由于启动/关闭hostd服务器引起的。说明hostd进程没kill到。(原因运行一下/etc/init.d/hostd start or stop就知道)
ps | grep hostd 你会看到
123456233  789789789  hostd
456123358  789789789  hostd
123            789789789  hostd
123458985  789789789  hostd
........
说明有hostd进程
那运行/etc/init.d/hostd  stop
再运行
ps | grep hostd
123456233  789789789  hostd
456123358  789789789  hostd
123            789789789  hostd
123458985  789789789  hostd
........
说明hostd根本没有kill到
于是手动kill,选择任意一个子进程ID kill就可以
如:kill -9 123458985
然后再运行ps | grep hostd ,发现已经没有输入,说明hostd已经kill掉。
于是再运行/etc/init.d/hostd start 就可以。


求解——ESXi上的虚拟机锁死,无法操作,求解决方法~!
http://bbs.vmsky.com/thread-27194-1-1.html
关闭虚拟机时提示“正在处理另一个任务”,无法关闭,
在不重启ESXi Server的情况下,有什么方法可以关掉这台吗?


在ESXi上重启服务,/etc/init.d/hostd restart
运行命令行,ps -aux |grep 虚拟机名字,找到那个虚拟机,然后用kill -9 PID 干掉那个进程试试。

(虚拟机不会重启,只是VMware服务重启,
一般碰到提示“正在处理另一个任务”,可以重启下服务把所有相关任务给停掉,
再进行虚拟机的操作就OK了。esxcli的命令也未必能有效,kill VM进程也是直接的方法。)

ESXi的Console是隐藏的,按照下面的方法可以访问console和开启SSH登陆,就可以看到log了。

By default this isn’t possible. But there’s a way to get this working, just do the following:

1.Go to the ESXi console and press alt+F1
2.Type: unsupported
3.Enter the root password(No prompt, typing is blindly)
4.At the prompt type “vi /etc/inetd.conf”
5.Look for the line that starts with “#ssh” (you can search with pressing “/”)
6.Remove the “#” (press the “x” if the cursor is on the character)
7.Save “/etc/inetd.conf” by typing “:wq!”
8.Restart the management service “/sbin/services.sh restart”
Done!

介绍的是4.0下的开console的方法,4.1简化了许多,在主机管理界面下就可以操作启用或禁用TSM和SSH了。
另问下,日志文件都在主机的什么位置?

日志的话看我的这篇文章:http://bbs.vmsky.com/thread-27278-1-1.html

猜你喜欢

转载自icarusli.iteye.com/blog/1022388