備份
備份設定檔
[root@esxi-10:~] vim-cmd hostsvc/firmware/backup_config
Bundle can be downloaded at : http://*/downloads/52bf3157-0e82-fab9-b9e1-e7d5147fc2f2/configBundle-esxi-10.tgz
備份檔會存在 /scratch/downloads/ 下
[root@esxi-10:~] cd /scratch/downloads/52bf3157-0e82-fab9-b9e1-e7d5147fc2f2/
[root@esxi-10:/vmfs/volumes/659d4ed5-6f9c598c-8162-04d4c4b20ae9/downloads/52bf3157-0e82-fab9-b9e1-e7d5147fc2f2] ls -lh
total 13
-rwx------ 1 root root 12.9K Jul 23 17:13 configBundle-esxi-10.tgz
使用scp備份至安全地方
還原
把備份檔複製到 /tmp
[root@esxi-10:/tmp] ls -lh
total 20
-rwx------ 1 root root 12.9K Jul 23 17:13 configBundle-esxi-10.tgz
drwx------ 1 root root 512 Jul 23 17:10 vmware-root
進入維護模式
[root@esxi-10:/tmp] vim-cmd hostsvc/maintenance_mode_enter
還原設定檔
[root@esxi-10:/tmp] vim-cmd hostsvc/firmware/restore_config /tmp/configBundle-esxi-10.tgz
(vim.fault.FileNotFound) {
faultCause = (vmodl.MethodFault) null,
faultMessage = <unset>,
file = "/tmp/configBundle.tgz"
msg = "Received SOAP response fault from [<cs p:000000e51f8d2a00, TCP:localhost:8307>]: restoreConfiguration
File /tmp/configBundle.tgz was not found"
}
出現以上錯誤,請執行以下步驟改名或copy即可 (鬼打牆了很久)
[root@esxi-10:/tmp] cp configBundle-esxi-10.tgz /tmp/configBundle.tgz
重新執行一次 vim-cmd hostsvc/firmware/restore_config
[root@esxi-10:/tmp] vim-cmd hostsvc/firmware/restore_config /tmp/configBundle-esxi.tgz
restore 設定後,系統會自動重啟
留言列表