70-740, Teil 5.3.3. Ein verteiltes „Direkte Speicherplätze“-Szenario in einem Cluster implementieren

70-740, Teil 5.3.3.

Ein verteiltes „Direkte Speicherplätze“-Szenario in einem Cluster implementieren

Ideen für die Recherche im Web:

disaggregated Storage Spaces Direct vs hyperconverged

Zum Nachschlagen:

https://blogs.technet.microsoft.com/larryexchange/2015/11/02/performance-consideration-for-disaggregated-and-hyper-converged-configurations/

Übungen:

#Beispiel 1

###

$User_Name_Local_Admin=‘.\Administrator‘

$User_Name_Dom_Admin=’multi\Administrator‘

$Secure=Read-Host -AsSecureString

$Credential_Local_Admin = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $User_Name_Local_Admin,$Secure

$Credential_Dom_Admin = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $User_Name_Dom_Admin,$Secure

$var_SwitchName=(Get-VMSwitch | Where-Object SwitchType -eq „External“).Name

$var_SwitchName

1..2 | % {

New-VHD –Path c:\ISOs\wd-f$_.vhdx –SizeBytes 100GB -LogicalSectorSizeBytes 4096 -PhysicalSectorSizeBytes 4096
New-VHD –Path c:\ISOs\wd-fA$_.vhdx –SizeBytes 200GB -LogicalSectorSizeBytes 4096 -PhysicalSectorSizeBytes 4096
New-VHD –Path c:\ISOs\wd-fB$_.vhdx –SizeBytes 200GB -LogicalSectorSizeBytes 4096 -PhysicalSectorSizeBytes 4096
New-VHD –Path c:\ISOs\wd-fC$_.vhdx –SizeBytes 200GB -LogicalSectorSizeBytes 4096 -PhysicalSectorSizeBytes 4096
New-VHD –Path c:\ISOs\wd-fD$_.vhdx –SizeBytes 200GB -LogicalSectorSizeBytes 4096 -PhysicalSectorSizeBytes 4096
New-VHD –Path c:\ISOs\wd-fE$_.vhdx –SizeBytes 200GB -LogicalSectorSizeBytes 4096 -PhysicalSectorSizeBytes 4096
New-VHD –Path c:\ISOs\wd-fF$_.vhdx –SizeBytes 200GB -LogicalSectorSizeBytes 4096 -PhysicalSectorSizeBytes 4096
New-VHD –Path c:\ISOs\wd-fG$_.vhdx –SizeBytes 200GB -LogicalSectorSizeBytes 4096 -PhysicalSectorSizeBytes 4096
New-VHD –Path c:\ISOs\wd-fH$_.vhdx –SizeBytes 200GB -LogicalSectorSizeBytes 4096 -PhysicalSectorSizeBytes 4096
New-VHD –Path c:\ISOs\wd-fI$_.vhdx –SizeBytes 200GB -LogicalSectorSizeBytes 4096 -PhysicalSectorSizeBytes 4096
New-VHD –Path c:\ISOs\wd-fJ$_.vhdx –SizeBytes 200GB -LogicalSectorSizeBytes 4096 -PhysicalSectorSizeBytes 4096
#https://docs.microsoft.com/en-us/powershell/module/hyper-v/new-vhd?view=win10-ps

New-VM -VHDPath c:\ISOs\wd-f$_.vhdx -ComputerName . -Generation 2 -MemoryStartupBytes 1GB -Name wd-f$_ -SwitchName $var_SwitchName
#https://docs.microsoft.com/de-de/previous-versions/windows/powershell-scripting/hh848537(v=wps.640)

Add-VMHardDiskDrive -VMName wd-f$_ -Path c:\ISOs\wd-fA$_.vhdx
Add-VMHardDiskDrive -VMName wd-f$_ -Path c:\ISOs\wd-fB$_.vhdx
Add-VMHardDiskDrive -VMName wd-f$_ -Path c:\ISOs\wd-fC$_.vhdx
Add-VMHardDiskDrive -VMName wd-f$_ -Path c:\ISOs\wd-fD$_.vhdx
Add-VMHardDiskDrive -VMName wd-f$_ -Path c:\ISOs\wd-fE$_.vhdx
Add-VMHardDiskDrive -VMName wd-f$_ -Path c:\ISOs\wd-fF$_.vhdx
Add-VMHardDiskDrive -VMName wd-f$_ -Path c:\ISOs\wd-fG$_.vhdx
Add-VMHardDiskDrive -VMName wd-f$_ -Path c:\ISOs\wd-fH$_.vhdx
Add-VMHardDiskDrive -VMName wd-f$_ -Path c:\ISOs\wd-fI$_.vhdx
Add-VMHardDiskDrive -VMName wd-f$_ -Path c:\ISOs\wd-fJ$_.vhdx
#https://docs.microsoft.com/en-us/powershell/module/hyper-v/add-vmharddiskdrive?view=win10-ps

Add-VMDvdDrive -VMName wd-f$_ -Path „C:\ISOs\17763.253.190108-0006.rs5_release_svc_refresh_SERVER_EVAL_x64FRE_de-de.iso“

Get-VMDvdDrive -VMName wd-f$_

(Get-VMFirmware wd-f$_).BootOrder

$var_DVDDrive=Get-VMDvdDrive -VMName wd-f$_

Set-VMFirmware -VMName wd-f$_ -FirstBootDevice $var_DVDDrive

(Get-VMFirmware wd-f$_).BootOrder

Set-VM -VMName wd-f$_ –AutomaticStartAction Nothing

}

###

#Virtuelle Maschine starten und installieren (Server Core in der Datacenter-Edition)

#https://social.technet.microsoft.com/wiki/contents/articles/36609.windows-server-2016-unattended-installation.aspx

###

Invoke-Command -VMName wd-f1 -Credential $Credential_Local_Admin -ScriptBlock {Rename-Computer -NewName wd-f1 -Restart}

Invoke-Command -VMName wd-f2 -Credential $Credential_Local_Admin -ScriptBlock {Rename-Computer -NewName wd-f2 -Restart}

get-vm

1..2 | % {

#Enter-PSSession -VMName wd-f$_ -Credential $Credential_Local_Admin
Invoke-Command -VMName wd-f$_ -Credential $Credential_Local_Admin -ScriptBlock {

ipconfig /all;

$var_InterfaceIndex=(Get-NetIPConfiguration).InterfaceIndex;

Set-NetIPInterface -InterfaceIndex $var_InterfaceIndex -Dhcp Disabled;

Remove-NetIPAddress -InterfaceIndex $var_InterfaceIndex;

Remove-NetRoute -DestinationPrefix 0.0.0.0/0;

New-NetIPAddress -InterfaceIndex $var_InterfaceIndex -IPAddress 10.10.3.1$_ -PrefixLength 8 –DefaultGateway 10.0.3.1;

Set-DnsClientServerAddress -InterfaceIndex $var_InterfaceIndex -ServerAddresses (‚10.3.3.1‘);

Get-NetIPAddress -AddressFamily IPv4;

ipconfig /all;

Get-NetIPConfiguration | ft ComputerName, InterfaceIndex, InterfaceAlias, IPv4Address;

Get-DnsClientServerAddress -InterfaceAlias Ethernet -AddressFamily IPv4| ft PSComputerName, InterfaceIndex, InterfaceAlias, ServerAddresses;

Add-Computer -DomainName „multi.media“ -Credential $Credential_Dom_Admin -Restart -Force

}
}

Get-VM wd-f? | ft Name, State

1..2 | % {

#Enter-PSSession -VMName wd-f$_ -Credential $Credential_Dom_Admin
Invoke-Command -VMName wd-f$_ -Credential $Credential_Local_Admin -ScriptBlock {

Get-Disk | Where-Object IsOffline –Eq $True;

Get-Disk | Where-Object IsOffline –Eq $True | Set-Disk -IsOffline $false;

Get-Disk | ft Size,OperationalStatus;

Get-Disk|where {$_.PartitionStyle -eq „RAW“};

Get-Disk|where {$_.PartitionStyle -eq „RAW“}|Initialize-Disk -PartitionStyle GPT;

Get-Disk
}
}

1..2 | % {

#Enter-PSSession -VMName wd-f$_ -Credential $Credential_Dom_Admin

Get-WindowsFeature Failover-Clustering -ComputerName wd-f$_

Install-WindowsFeature Failover-Clustering -ComputerName wd-f$_ -IncludeManagementTools -IncludeAllSubFeature -Restart

}

Get-WindowsFeature *Cluster* | ft -AutoSize

Install-WindowsFeature RSAT-Clustering-Mgmt, RSAT-Clustering-PowerShell

Get-VM wd-f?

#Bei Bedarf
#Stop-VM -Name wd-f? -Confirm -Force
#Get-VM

Get-VMProcessor -VMName wd-f? | ft VMName, ExposeVirtualizationExtensions

Set-VMProcessor -VMName wd-f? -ExposeVirtualizationExtensions $true

Get-VMProcessor -VMName wd-f? | ft VMName, ExposeVirtualizationExtensions

Get-VM wd-f? | Get-VMMemory | ft VMName, DynamicMemoryEnabled

#Bei Bedarf
#Get-VM wd-f? | Set-VMMemory -DynamicMemoryEnabled $false
#Get-VM wd-f? | Get-VMMemory | ft VMName, DynamicMemoryEnabled

Get-VM wd-f? | Get-VMMemory | fl VMName, Startup
#Bei Bedarf
#Mindestens 4GB
#Get-VM wd-f? | Set-VM –MemoryStartupBytes 4GB
#Get-VM wd-f? | Get-VMMemory | fl VMName, Startup

Get-VM wd-f? | Get-VMNetworkAdapter | ft VMName, MacAddressSpoofing
#Bei Bedarf
#Get-VM wd-f? | Get-VMNetworkAdapter | Set-VMNetworkAdapter -MacAddressSpoofing On
#Get-VM wd-f? | Get-VMNetworkAdapter | ft VMName, MacAddressSpoofing

Get-WindowsFeature -Vhd „c:\ISOs\wd-f1.vhdx“ *Hyper-V*
Get-WindowsFeature -Vhd „c:\ISOs\wd-f2.vhdx“ *Hyper-V*

Install-WindowsFeature -Vhd „c:\ISOs\wd-f1.vhdx“ Hyper-V -IncludeAllSubFeature -IncludeManagementTools
Install-WindowsFeature -Vhd „c:\ISOs\wd-f2.vhdx“ Hyper-V -IncludeAllSubFeature -IncludeManagementTools

Get-WindowsFeature -Vhd „c:\ISOs\wd-f1.vhdx“ *Hyper-V*
Get-WindowsFeature -Vhd „c:\ISOs\wd-f2.vhdx“ *Hyper-V*

Start-VM wd-f?

New-Cluster –Name wd-cluster1 –Node wd-f1, wd-f2 –StaticAddress 10.10.3.10 -NoStorage

Invoke-Command -VMName wd-f1 -Credential $Credential_Local_Admin -ScriptBlock {Enable-ClusterStorageSpacesDirect}