Install-WindowsFeature -Name Hyper-V, Failover-Clustering, Data-Center-Bridging, BitLocker, FS-FileServer, RSAT-Clustering-PowerShell, FS-Data-Deduplication -IncludeAllSubFeature -IncludeManagementTools -verboseRécupérez la liste des versions de pilote :
Get-PnpDevice | Select-Object Name, @{l='DriverVersion';e={(Get-PnpDeviceProperty -InstanceId $_.InstanceId -KeyName 'DEVPKEY_Device_DriverVersion').Data}} -Unique | Where-Object {($_.Name -like "*HBA*") -or ($_.Name -like "*mellanox*") -or ($_.Name -like "*Qlogic*") -or ($_.Name -like "*X710*") -or ($_.Name -like "*intel*") -or ($_.Name -like "*Broadcom*") -or ($_.Name -like "*marvell*") }Attribuez le nom du nœud de cluster :
Rename-Computer -NewName CN01 -RestartCluster Test
Test-Cluster -Node CN01, CN02 –Include 'Storage Spaces Direct', 'Inventory', 'Network', 'System Configuration'Rechercher l’état des disques du pool de stockage
Get-PhysicalDiskCréation d’un cluster S2D
New-Cluster -Name S2DSystem -Node CN01, CN02 -StaticAddress 192.168.10.33 -NoStorage -IgnoreNetwork 172.16.103.0/24, 172.16.104.0/24 -VerboseActivation de Storage Spaces Direct :
Enable-ClusterS2D -VerboseCapture des résultats des commandes précédentes
Get-ClusterS2D Get-StoragePool Get-StorageSubSystem -FriendlyName *Cluster* | Get-StorageHealthReportConfigurez le réseau de gestion des hôtes à une priorité inférieure pour la migration dynamique :
$clusterResourceType = Get-ClusterResourceType -Name 'Virtual Machine' $hostNetworkID = Get-ClusterNetwork | Where-Object { $_.Address -eq ‘192.168.10.0’ } | Select-Object -ExpandProperty ID $otherNetworkID = (Get-ClusterNetwork).Where({$_.ID -ne $hostnetworkID}).ID $newMigrationOrder = ($otherNetworkID + $hostNetworkID) -join ';' Set-ClusterParameter -InputObject $clusterResourceType -Name MigrationNetworkOrder -Value $newMigrationOrder Set-VmHost -VirtualMachine MigrationPerformanceOption SMBParamètres des fichiers d’échange pour garantir la capture du vidage mémoire :
$blockCacheMB = (Get-Cluster).BlockCacheSize $blockCacheMB = (Get-Cluster).BlockCacheSize $pageFilePath = "C:\pagefile.sys" $initialSize = [Math]::Round(51200 + $blockCacheMB) $maximumSize = [Math]::Round(51200 + $blockCacheMB) $system = Get-WmiObject -Class Win32_ComputerSystem -EnableAllPrivileges if ($system.AutomaticManagedPagefile) { $system.AutomaticManagedPagefile = $false $system.Put() } $currentPageFile = Get-WmiObject -Class Win32_PageFileSetting if ($currentPageFile.Name -eq $pageFilePath) { $currentPageFile.InitialSize = $InitialSize $currentPageFile.MaximumSize = $MaximumSize $currentPageFile.Put() }else{ $currentPageFile.Delete() Set-WmiInstance -Class Win32_PageFileSetting -Arguments @{Name=$pageFilePath; InitialSize = $initialSize; MaximumSize = $maximumSize} } #Configure cluster witness. Active Directory Cluster Name Object must be given write access on file #share before running this step: Set-ClusterQuorum -NodeAndFileShareMajority \\VDC01\ClusterQuorum
Désactiver la signature SMB (Server Message Block) ; désactivé par défaut avec l’installation normale de Windows Server.
Set-SmbServerConfiguration -RequireSecuritySignature $FALSE -forceModification de la configuration du délai d’expiration du port d’espaces :
Set-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\spaceport \Parameters -Name HwTimeout -Value 0x00002710 -Verbose Restart-Computer -Force