# vCenter 管理

##### 忘記 root 密碼

首先，連線到 ESXi 主機的 VMware Host Client，並選擇以網頁瀏覽器或 VMware Remote Console 方式，開啟 vCenter Server Appliance 的 Console 介面。來到「PHOTON」啟動頁面後，按下〔e〕鍵以開啟開機選項。

在「GNU GRUB」命令視窗中，添加 `rw init=/bin/bash` 命令參數，然後按下〔F10〕鍵繼續啟動系統。

接著，會來到 root 根路徑命令提示字元下，執行 `mount -o remount,rw /` 命令參數，以完成檔案系統根路徑的掛載。

最後執行 `passwd` 命令，即可完成 root 密碼的修改。

完成密碼修改後，記得執行 `umount /` 命令來停止檔案系統的掛載，最後執行 `reboot -f` 命令參數以便重新啟動 vCenter Server Appliance。

##### root 密碼到期設定  


[變更根使用者的密碼及密碼到期設定](https://docs.vmware.com/tw/VMware-vSphere/6.7/com.vmware.vsphere.vcsa.doc/GUID-C63C82F1-D430-4710-8B92-177A79D3DE65.html)

##### vCenter Backup &amp; Restore

這裡的備份不是指 VM snapshot，而是異地備份或者稱為冷備份。

備份工具需使用 VMware Appliance Management Interface (`https://<FQDN-of-VCSA>:5480/`)。

備份目的支援以下傳輸協定：

- FTP(s)
- NFS
- SFTP
- SMB
- HTTPS

系統還原注意事項：

1. 需要使用相同版本 VCSA ISO 安裝檔。
2. 還原步驟與初始安裝程序類似，需要有一個 Windows 工作站 (VM 或實體機)，而且網路必須與 vCenter 主機 (VCSA) 同一個子網路。
3. Windows 工作站先掛載 VCSA ISO 檔，執行 `vcsa-ui-install/win32/installer.exe` 開啟安裝/復原程序。

教學連結：

- [vCenter Server Appliance 6.7 File-Based Backup and Restore Walkthroughs - VMware vSphere Blog](https://blogs.vmware.com/vsphere/2018/05/vcenter-server-appliance-6-7-file-based-backup-and-restore-walkthroughs.html)
- [New vCenter Server Appliance File-Based Backup / Restore Walkthroughs - VMware vSphere Blog](https://blogs.vmware.com/vsphere/2017/01/vcenter-server-appliance-file-based-backup-restore-walkthroughs.html)

##### Syslog Server

將 vCenter 系統日誌導出至遠端的日誌伺服主機。

教學連結：

- [Configure desired level of vCenter logs sent to Remote Syslog Server](https://knowledge.broadcom.com/external/article/345261/configure-desired-level-of-vcenter-logs.html)
- [Streaming Events to a Remote Syslog Server](https://techdocs.broadcom.com/us/en/vmware-cis/vsphere/vsphere/8-0/configuring-vcenter-server-8-0/configuring-vcenter-server-using-the-management-interface/remote-streaming-of-events.html#GUID-F92A08A1-646A-4DCD-8DB0-47E6D2B49C5D-en)