Admin
本站
點擊:100 次
前幾天想登錄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。需要先停掉服務。
Windows
Open 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 vpxd
service-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.bak
Once 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.bak
Once 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
沈陽眾誠志聯提醒你注意:重新啟動服務需要多等一會兒,否則會有這樣的提示。
這是正常的頁面,我們輸入賬號發現可以登錄了。
雖然登錄進來了,但是會發現所有的主機都是斷開的,我們需要重新連接,輸入正確的主機賬號、密碼,就可以連接了,所有之前建的虛擬機,網絡都回來了。
不安的心終于可以放下了。