1.首先開啟VMware TSM-SSH
2.開啟發Log郵件時所需的SMTP Port.(新增防火牆規則的smtp.xml)
refer https://kb.vmware.com/s/article/2008226
refer https://communities.vmware.com/thread/567963
(一)新增xml
vi /etc/vmware/firewall/smtp.xml
(二)貼上內容
<ConfigRoot>
<service>
<id>smtp</id>
<rule id='0000'>
<direction>outbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>25</port>
</rule>
</service>
</ConfigRoot>
(三)重新整理防火牆設定
/sbin/esxcli network firewall refresh
(四)在UI上開啟SMTP設定
3.修改成可以安裝第三方(社群支援)的VIB
esxcli software acceptance set --level=CommunitySupported
4.因為在ESXI 6.7 U2裡的WGET 限制不可下載https網址,使用此方式直接安裝 (不要問我為什麼,或許是buzybox的原因)
esxcli software vib install -v https://github.com/lamw/ghettoVCB/raw/master/vghetto-ghettoVCB.vib -f
5.備份設定檔 (因為不使用Restoe功能,所以只備份以下設定檔)
cp /opt/ghettovcb/bin/ghettoVCB.sh /opt/ghettovcb/bin/ghettoVCB.sh.bak
cp /etc/ghettovcb/ghettoVCB.conf /etc/ghettovcb/ghettoVCB.conf.bak
6.編輯設定檔 ghettoVCB.conf,以下只列出要改的設定
vi /etc/ghettovcb/ghettoVCB.conf
User Definable Parameters:
VM_BACKUP_VOLUME=/vmfs/volumes/mini-local-datastore-hdd/backups 備份目的儲存區
VM_BACKUP_ROTATION_COUNT=3 備份保留檔案數
EMAIL CONFIGURATIONS:
EMAIL_ALERT=1 Email警告是否開啟
EMAIL_LOG=1 Email Log是否開啟
EMAIL_SERVER=auroa.primp-industries.com SMTP Server
EMAIL_SERVER_PORT=25 SMTP Port
EMAIL_USER_NAME= SMTP User Name
EMAIL_USER_PASSWORD= SMTP User Password
EMAIL_FROM=root@ghettoVCB Email 發信人
EMAIL_TO=auroa@primp-industries.com Email 收件者
7.測試備份 (單一備份)
vim-cmd vmsvc/getallvms 查詢虛擬機名稱
/opt/ghettovcb/bin/ghettoVCB.sh -g /etc/ghettovcb/ghettoVCB.conf -m VM_NAME
8.後記
1.在搜尋電子郵件的認證機制後,確認這是由開發者提供的實驗性功能,並且不提供加密驗證
refer https://communities.vmware.com/thread/280397
..後續補充
留言列表