Dressurausbildung Daniel Köck

Dresssurausbildung Koeck

Bewertung: 5 / 5

Stern aktivStern aktivStern aktivStern aktivStern aktiv
 

 

Damit die Replikation zwischen standalone Hyper-V Servern funktioniert, müssen zwingend Zertifikate verwendet werden.

Das Erstellen von selbst signierten Zertiikaten funktioniert mit den neuen Powershell cmdlets recht einfach. Für das Erstellen solcher Zertifikate wird Powershell 5.0 vorausgesetzt (Windows 10 , Server 2016)

In meinem Beispiel verwende ich zwei Hyper-V Hosts mit Windows Server 2016 (HyperV-19, HyperV-20) und einen Windows 10 Verwaltungs-PC.

 

Zusammenfassung:

Auf dem Windows 10 Rechner wird eine administrative Powershell gestartet.

Root Zertifikat erzeugen:

New-SelfSignedCertificate -Type "Custom" -NotAfter (Get-Date).AddMonths(24) -KeyExportPolicy "Exportable" -Subject "CN=lab.intern" -CertStoreLocation "Cert:\LocalMachine\My" -KeySpec "Signature" -KeyUsage "CertSign" -HashAlgorithm "SHA256"

Für das Erzeugen der beiden Hyper-V Zertifikate brauchen wir den Thumbprint des Root Zertifikats.

Zertifikate 06

HyperV-19

New-SelfSignedCertificate -type "Custom" -KeyExportPolicy "Exportable" -NotAfter (Get-Date).AddMonths(24) -Subject "CN=HyperV-19" -CertStoreLocation "Cert:\LocalMachine\My" -KeySpec "KeyExchange" -HashAlgorithm "SHA256" -TextExtension @("2.5.29.37={text}1.3.6.1.5.5.7.3.1,1.3.6.1.5.5.7.3.2") -Signer "Cert:LocalMachine\My\6AB7AA37A5CD97AFADEB159FCA7635939D0E9F75" -Provider "Microsoft Enhanced RSA and AES Cryptographic Provider" 

HyperV-20

New-SelfSignedCertificate -type "Custom" -KeyExportPolicy "Exportable" -NotAfter (Get-Date).AddMonths(24) -Subject "CN=HyperV-20" -CertStoreLocation "Cert:\LocalMachine\My" -KeySpec "KeyExchange" -HashAlgorithm "SHA256" -TextExtension @("2.5.29.37={text}1.3.6.1.5.5.7.3.1,1.3.6.1.5.5.7.3.2") -Signer "Cert:LocalMachine\My\6AB7AA37A5CD97AFADEB159FCA7635939D0E9F75" -Provider "Microsoft Enhanced RSA and AES Cryptographic Provider"

 

Die erzeugten Zertifikate findet man nun im lokalen Zertifikatsspeicher

Zertifikate 08

Die beiden Computerzertifikate werden nun inklusive privatem Schlüssel exportiert und abgespeichert.

Das Root Zertifikat wird ebenfalls exportiert, aber ohne privatem Schlüssel und abgespeichert.

Zertifikate 02

Zertifikate 03

Zertifikate 04

Zertifikate 05

Die so erhaltenen drei Zertifikate werden nun auf den Hyper-V Hosts importiert.

Zusätzlich muss man auf den beiden Hyper-V Host noch folgende Registrierungseinträge setzten:

reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\Replication" /v DisableCertRevocationCheck /d 1 /t REG_DWORD /f

reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\FailoverReplication" /v DisableCertRevocationCheck /d 1 /t REG_DWORD /f

 

Nun kann auf den Hyper-V Hosts die Replikation aktiviert werden.

Hyper-V-Manager -->Host wählen --> Hyper-V-einstellungen

Zertifikate 09

 

Copyright © winxperts4all.com. All Rights Reserved.