Created a bonded NIC (optional):
[shell] Get-NetAdapter New-NetLbfoTeam “NIC Team” –TeamingMode SwitchIndependent [/shell]
If you need to add a VLAN:
[shell] Add-NetLbfoTeamNic -Team “Lan Team” -vLanID 10 -Name “Management VLAN” [/shell]
Enable ping:
[shell] netsh firewall set icmpsetting 8 enable [/shell]
Enable HyperV to HyperV host communiations:
[shell] Enable-Netfirewallrule -displayname “Hyper-V Replica HTTPS Listener (TCP-In)” [/shell]
Enable file and printer sharing:
[shell] netsh advfirewall firewall set rule group=”File and Printer Sharing” new enable=Yes [/shell]
Pre-requisite: Download and install WinSDK, this can be installed as a GUI. We only need the Tools package under Windows Native Code Development.
To run as admin:
[shell] runas /profile /user:AAA “C:\programs\BBB.exe” and press “Enter” [/shell]
Installed package will be at C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\makecert.exe, we need to CD into that directory.
NOTE: The following commands are all minus, if you use dash the commands will fail!
On the Primary HyperV Host:
[shell] makecert -pe -n “CN=HyperV-PrimaryRoot” -ss root -sr LocalMachine -sky signature -r “HyperV-PrimaryRoot.cer” [/shell]
[shell] makecert -pe -n “CN=HYPERV-PRIMARY.DOMAIN.COM” -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 “HyperV-PrimaryRoot” -is root -ir LocalMachine -sp “Microsoft RSA SChannel Cryptographic Provider” -sy 12 HyperV-Primary.cer [/shell]
On the Replicated HyperV Host:
[shell] makecert -pe -n “CN=HyperV-BackupRoot” -ss root -sr LocalMachine -sky signature -r “HyperV-BackupRoot.cer” [/shell]
[shell] makecert -pe -n “CN=HYPERV-BACKUP.DOMAIN.COM” -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 “HyperV-BackupRoot” -is root -ir LocalMachine -sp “Microsoft RSA SChannel Cryptographic Provider” -sy 12 HyperV-Backup.cer [/shell]
Copy the created Root certificate files to each others hosts folder and we will need to add the cert to the certificate store.
To add a cert run:
[shell]certutil -addstore -f Root “ReplicaTestRootCA.cer”[/shell]
Run the following commands to update the registry:
[shell]reg add “HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\FailoverReplication” /v DisableCertRevocationCheck /d 1 /t REG_DWORD /f[/shell]
[shell]reg add “HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\Replication” /v DisableCertRevocationCheck /d 1 /t REG_DWORD /f[/shell]