vcsa或photon-machine无root密码 vcenter无法打开 问题记录
由于未设置 FQDN,导致无root密码
3. Re: What is photon-machine login?
you have installed the VCSA with IP address it seems. Please check the VC pnid.
run this command on VC.
/usr/lib/vmware-vmafd/bin/vmafd-cli get-pnid --server-name localhost
you need to provide root password to login. If you forgot the password, login to grub mode and reset the password.
重启vcsa,在引导界面(photon的图形界面)里按e编辑启动项
在consoleblank=0 后面添加rw init=/bin/bash,F10启动
进入命令行后,执行passwd -x 700 root,将密码有效期延长(chage -l root可查看到期时间,可把700写出2000等更长)
最好顺便执行passwd修改root密码!
运行umount / 和reboot -f
esxi主机异常重启造成vcsa网页无法打开,可进入vcsa控制台手动开启vcsa服务:
VCSA服务重启命令
Sphere Web Client界面的服务分别是:
vmware-mbcs
vmware-netdumper
vmware-rbd-watchdog
分别执行命令确认,首先执行命令:
service-control --status vmware-mbcs
service-control --status vmware-netdumper
service-control --status vmware-rbd-watchdog
可以看到服务处于Stopped状态。
看到上述几个服务都处于停止状态,那么,接下来尝试手动启动它们,命令如下:
service-control --start vmware-rbd-watchdog vmware-netdumper vmware-mbcs
VMware vCenter Server Appliance 6.5.0.14000
Type: vCenter Server with an embedded Platform Services Controller
Connected to service
* List APIs: "help api list"
* List Plugins: "help pi list"
* Launch BASH: "shell"
// 使用shell进行连接
Command> shell
Shell access is granted to root
// 查看VMware services帮助
root@photon-machine [ ~ ]# service-control --help
// 列出所有可控VMware服务
root@photon-machine [ ~ ]# service-control --list-services
// 查看VMware services运行状态
root@photon-machine [ ~ ]# service-control --status vsphere-client
Stopped:
vsphere-client
root@photon-machine [ ~ ]# service-control --stop vsphere-client
// 启动
vsphere-client
root@photon-machine [ ~ ]# service-control --start vsphere-client
Perform start operation. vmon_profile=None, svc_names=['vsphere-client'],
include_coreossvcs=False, include_leafossvcs=False
2018-03-17T16:19:28.015Z
Service vsphere-client state STOPPED
Successfully started service
vsphere-client
root@photon-machine [ ~ ]# service-control --status vsphere-client
Running:
vsphere-client