1.SQL Server服務改為延遲啟動
2.修改登錄檔,延長超時失敗的時間
進入
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control
右鍵新增
ServicesPipeTimeout
的DWORD值
內容改為10進位輸入
60000
(60秒)來延長超時失敗的時間
makecert -pe -n "CN=PrimaryTestRootCA" -ss root -sr LocalMachine -sky signature -r "PrimaryTestRootCA.cer"
產生EKU憑證makecert -pe -n "CN=hv01" -ss my -sr LocalMachine -sky exchange -eku 1.3.6.1.5.5.7.3.1,1.3.6.1.5.5.7.3.2 -in "PrimaryTestRootCA" -is root -ir LocalMachine -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12 PrimaryTestCert.cer
makecert -pe -n "CN=ReplicaTestRootCA" -ss root -sr LocalMachine -sky signature -r "ReplicaTestRootCA.cer"
產生EKU憑證makecert -pe -n "CN=hv02" -ss my -sr LocalMachine -sky exchange -eku 1.3.6.1.5.5.7.3.1,1.3.6.1.5.5.7.3.2 -in "ReplicaTestRootCA" -is root -ir LocalMachine -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12 ReplicaTestCert.cer
get-item Cert:\LocalMachine\root\*
remove-item Cert:\LocalMachine\root\1234567890ABCDEFG(憑證)
刪除時看後面 CN=PrimaryTestRootCA 或 CN=ReplicaTestRootCA 就對了certutil -addstore -f Root "ReplicaTestRootCA.cer"
4.在複本伺服器(HV02),匯入PrimaryTestRootCA.cercertutil -addstore -f Root "PrimaryTestRootCA.cer"
這邊參考文章中寫錯了reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\Replication" /v DisableCertRevocationCheck /d 1 /t REG_DWORD /f




Set-NetFirewallRule -DisplayGroup “Hyper-V 複本 HTTPS” –Enabled True
檢查是否啟用Get-NetFirewallPortFilter | ?{$_.LocalPort -eq 443} | Get-NetFirewallRule
Enable為True就有開啟netsh advfirewall firewall add rule name="Hyper-V Replica HTTPS" dir=in protocol=TCP localport=443 action=allow









