前几天想登录VMware vsphere vcenter 6.7管理平台时,突然出现400错误,里面有正在运行的虚拟机不能管理了,顿时心头一紧,于是各种百度,bing,360搜索,折腾了3天终于解决了。 
400 向vcenter single sign-on 服务器发送身份验证请求时出错-在vcenter single sign-on设置过程中处理数据时出错-文件提前结束.
下面说说我都试过哪些方法。 - 证书问题,尝试了重新生成证书,结果不行。
- 平台覆盖安装下就好了,结果提示已经安装了相同版本,又找了个新版本升级安装下,结果安装过程中出错,放弃。
- 备份数据文件,然后在另一台机器上新安装平台,然后把数据文件替换了,结果不行。
- 还尝试安装VMware-VCSA-all-6.7.0,结果发现我安装的是VMware-VIM-all-6.7.0,放弃。
- ... ...更多的方法都不记得了。
最后在VMware官网上查到了这个解决办法,通过曲线救国的方法解决了我的问题,就是将数据库备份,重新安装VMware vsphere vcenter 6.7平台,再恢复数据库。 Back up and restore vCenter Server Appliance/vCenter Server 6.x vPostgres database (2091961) https://kb.vmware.com/s/article/2091961?lang=en_us 为了以防万一,先将系统备份了,完了可以随便折腾。 备份完系统后,我们先来备份数据库,这个平台用的是vPostgres。需要先停掉服务。 WindowsOpen a command prompt, navigate to C:\"Program Files"\VMware\"vCenter Server"\bin and run the following commands: 6.7 and 6.5:service-control --stop vpxdservice-control --stop content-library  注意,要在这个文件中找下数据库的密码, %VMWARE_CFG_DIR%\vmware-vpxc\db.properties。 Log in as an administrator to the Windows host machine on which vCenter Server is installed.Open vcdb.properties in the %VMWARE_CFG_DIR%\vmware-vpx\ folder.In the vcdb.properties file, record the password for the vCenter Server database user.Download the attached Windows back up and restore package windows_backup_restore.zip attached to this KB article and extract is on the vCenter Server.From the command prompt run the command using the password from step 3: python.exe c:\path_to_script\backup_win.py -p "password" -f c:\path_to_backup_folder\backup_VCDB.bak For example:python.exe c:\backup_win.py -p "s_PJmbGzC83QRYlp" -f c:\backup_VCDB.bakOnce the backup completes, you see a message that the backup completed successfully.  备份完数据,开始安装平台,没有太多需要介绍。 请自行度娘:vCenter 6.7部署(Windows环境) 
安装完,我们开始用之前的备份恢复数据,恢复完数据再把服务启动了。 Log in as an administrator to the Windows host machine.Stop the vCenter Server and VMware Content Library services.From a windows command prompt navigate to C:\"Program Files"\VMware\"vCenter Server"\bin and run the following commands depending on vCenter Server version: 6.7 and 6.5:.\service-control --stop vpxd.\service-control --stop content-library Open vcdb.properties in the %VMWARE_CFG_DIR%\vmware-vpx\folder.In the vcdb.properties file, record the password for the vCenter Server database user.If not previously downloaded, download the Windows back up and restore package windows_backup_restore.zip attached to this KB article.From the command prompt, run this command using the password from step 3: python.exe c:\path_to_script/restore_win.py -p "password" -f c:\path_to_backup\backup_VCDB.bak For example:python.exe c:\restore_win.py -p "s_PJmbGzC83QRYlp" -f c:\backup_VCDB.bakOnce the restore completes, you see a message that the restore completed successfully. 
 恢复完数据,我们要再把服务开启。 From windows command prompt navigate to C:\"Program Files"\VMware\"vCenter Server"\bin and then run the following commands: 6.7 and 6.5:.\service-control --start vpxd.\service-control --start content-library 提醒你注意:重新启动服务需要多等一会儿,否则会有这样的提示。 
这是正常的页面,我们输入账号发现可以登录了。 
虽然登录进来了,但是会发现所有的主机都是断开的,我们需要重新连接,输入正确的主机账号、密码,就可以连接了,所有之前建的虚拟机,网络都回来了。 
不安的心终于可以放下了。
|