Zimbra Open Source Edition migration

舊機的Zimbra要必需和新機的Zimbra相同版本, 我的舊機是Ubuntu 14.04, Zimbra 8.8.12, 新機會安裝Ubuntu 18.04, Zimbra 8.8.12, 如果安裝過程中有錯誤就看最低下有沒有解決方法

首先在新機Download相同版本解壓及安裝(只安裝不設定加-s), 然後把新的zimbra改名不用
# wget https://files.zimbra.com/downloads/8.8.12_GA/zcs-8.8.12_GA_3794.UBUNTU18_64.20190329045002.tgz
# tar zxvf zcs-8.8.12_GA_3794.UBUNTU18_64.20190329045002.tgz
# cd zcs-8.8.12_GA_3794.UBUNTU18_64.20190329045002/
# ./install.sh -s
# mv /opt/zimbra /opt/zimbra_backup

在舊機停用zimbra, 然後用root壓縮/opt/zimbra再傳送到新機
# su - zimbra
# zmcontrol stop
# exit
# tar zcvf /root/zimbrabackup_20201008.tar.gz /opt/zimbra
# scp /root/zimbrabackup_20201008.tar.gz newServerLogin@xxx.xxx.xxx.xxx:/home/newServerLogin/

在新Server解壓, 改回原位置, 修復權限
# tar zxvf zimbrabackup_20201008.tar.gz
# mv opt/zimbra /opt/
# /opt/zimbra/libexec/zmfixperms -e -v

應該沒有訊息的
# /opt/zimbra/bin/postfix check

再次正式安裝
# cd zcs-8.8.12_GA_3794.UBUNTU18_64.20190329045002/
# ./install.sh

錯誤1
Validating ldap configuration
/usr/bin/perl: symbol lookup error: /opt/zimbra/common/lib/perl5//x86_64-linux-gnu-thread-multi/auto/Socket/Socket.so: undefined symbol: Perl_xs_apiversion_bootcheck
Unknown Error: It should be impossible to reach this statement.

解決方法
# for pkg in $(dpkg -l | grep zimbra | grep perl | awk '{print $2}'); do sudo apt-get install --reinstall $pkg; done

錯誤2
ERROR: Unable to retrive Zimbra GPG key for package validation
Please fix system to allow normal package installation before proceeding

解決方法
# gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 9BE6ED79
Reference
https://wiki.zimbra.com/wiki/Error_%22Unable_to_retrive_Zimbra_GPG_key_for_package_validation%22

錯誤3
Checking for port conflicts
Port conflict detected: 53 (zimbra-dnscache)
Port conflicts detected! - Press Enter/Return key to continue

不用理會

錯誤4
zmlogswatchctl is not running

解決方法
這個應該是8.8.12的bugs, 升級到8.8.15
# wget https://files.zimbra.com/downloads/8.8.15_GA/zcs-8.8.15_GA_3869.UBUNTU18_64.20190918004220.tgz
# tar zxvf zcs-8.8.15_GA_3869.UBUNTU18_64.20190918004220.tgz
# cd zcs-8.8.15_GA_3869.UBUNTU18_64.20190918004220
# ./install.sh

Reference
https://wiki.zimbra.com/wiki/How_to_move_ZCS_to_another_server

Upgrade vCenter Error

Internal error occurs during vSphere ESX Agent Manager pre-upgrade checks

vi /etc/vmware-eam/eam.properties

#########################################################################
# Copyright 2013-2014 VMware, Inc. All rights reserved. VMware Confidential
#########################################################################
vc.proxy.host=localhost
vc.proxy.port=80
# Hostname or IP of the EAM server
# Fill only if EAM is not running on the same host as VC
eam.host=
# EAM service port used to configure the HTTP connector of the application server.
eam.int.http.port=15005
# Port and scheme configuration which is used by the ESX 6.x hosts to reach EAM Vib
# file server.
eam.ext.port=443
eam.ext.scheme=https
# Port and scheme configuration which is used by the ESX 5.x hosts to reach EAM Vib
# file server.
eam.ext.port.deprecated=80
eam.ext.scheme.deprecated=http
eam.support_linked_clone=true
eam.clear_db_on_startup=false
eam.debug_ref_count=false
eam.recent_event_size=20
# Enable/disable VUM integration
vum.integration=true
# Value is specified in minutes (set to 24h = 1440m)
eam.scan_for_unknown_agent_vms=1440
# The timeout to wait for hostd to restart on a host (set to 5m=300s)
eam.hostd_restart_timeout=300
# The following entries will be added verbatim to the advanced options
# of hosts on which EAM is enabled. All are optional.
Net.DVFilterBindIpAddress=169.254.0.1
Net.TrafficFilterIpAddress=
#The IP for the VSWIF NIC on the dvFilter switch (for ESX classic).
Net.DVFilterVswifIpAddress=169.254.0.2
# Resource bundle configuration
eam.resourcebundle.filename=eam-resourcebundle.jar
# VLSI embedded tcServer configuration
#
tcserver.tmp.dir=/var/tmp/vmware/eam/tomcat
# EAM SSL configuration
#
eam.keystore.type=VKS
eam.key.alias=vpxd-extension
eam.keystore.storename=vpxd-extension
# CM configuration
#
cm.url=http://localhost:18090/cm/sdk/?hostid=0a12dfe2-b3b7-4eb6-9737-1ec5a8e770ec <====== Use the output recorded on step 5
cm.wait.attempts=360
cm.wait.intervalSeconds=5
# SSO configuration
#
sso.wait.attempts=360
sso.wait.intervalSeconds=5
# VC SSL configuration
#
vc.truststore.type=VKS
vc.truststore.storename=TRUSTED_ROOTS
vc.tunnelSdkUri.template=https://##{VC_HOST_NAME}##:8089/sdk/vimService
vc.tunnelSdkUri=:8089/sdk/vimService <====== Change this to your vCenter FQDN/IP
drs.demandCapacityRatio=100

eam.web.root=/usr/lib/vmware-eam/web

Source:
https://kb.vmware.com/s/article/50113982

Nested ESXi 6.7

在ESXi裏再安裝ESXi

Click "Expose hardware assisted virtualization to the guest OS"

在最低層ESXi更改網路

Promiscuous mode要Accept, 裏面的ESXi才可以便用外部Network

MsSQL dbname(Suspect)

EXEC sp_resetstatus dbname;
ALTER DATABASE dbname SET EMERGENCY;

DBCC checkdb('dbname');
ALTER DATABASE dbname SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
DBCC CheckDB ('dbname', REPAIR_ALLOW_DATA_LOSS);
ALTER DATABASE dbname SET MULTI_USER;