Skip to content

Commit

Permalink
Merge pull request #228 from Microsoft/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Jaromir Kaspar committed Oct 6, 2018
2 parents 4bbc1f3 + 4de6558 commit df401db
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 27 deletions.
2 changes: 1 addition & 1 deletion Scenarios/Hyper-V with Shared Storage/Scenario.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ Write-host "Script started at $StartDateTime"
Restart-NetAdapter "vEthernet (SMB_1)" -CimSession $Servers
Restart-NetAdapter "vEthernet (SMB_2)" -CimSession $Servers

#Associate each of the vNICs configured for RDMA to a physical adapter that is up and is not virtual (to be sure that each vRDMA NIC is mapped to separate pRDMA NIC)
#Associate each of the vNICs configured for RDMA to a physical adapter that is up and is not virtual (to be sure that each RDMA enabled ManagementOS vNIC is mapped to separate RDMA pNIC)
Invoke-Command -ComputerName $servers -ScriptBlock {
$physicaladapters=Get-NetAdapter | where status -eq up | where Name -NotLike vEthernet* | Sort-Object
Set-VMNetworkAdapterTeamMapping -VMNetworkAdapterName "SMB_1" -ManagementOS -PhysicalNetAdapterName ($physicaladapters[0]).name
Expand Down
16 changes: 8 additions & 8 deletions Scenarios/S2D Bare Metal with SCVMM/scenario.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,12 @@

#vSwitch vNICs classifications
$Classifications=@()
$Classifications+=@{PortClassificationName="Host Management static" ; NativePortProfileName="Host management static" ; Description="" ; EnableIov=$false ; EnableVrss=$false ;EnableIPsecOffload=$true ;EnableVmq=$true ;EnableRdma=$false}
$Classifications+=@{PortClassificationName="vRDMA" ; NativePortProfileName="vRDMA" ; Description="Classification for vRDMA adapters" ; EnableIov=$false ; EnableVrss=$false ;EnableIPsecOffload=$false ;EnableVmq=$false ;EnableRdma=$true}
$Classifications+=@{PortClassificationName="vNIC VMQ" ; NativePortProfileName="vNIC VMQ" ; Description="" ; EnableIov=$false ; EnableVrss=$false ;EnableIPsecOffload=$true ;EnableVmq=$true ;EnableRdma=$false}
$Classifications+=@{PortClassificationName="vNIC vRSS" ; NativePortProfileName="vNIC vRSS" ; Description="" ; EnableIov=$false ; EnableVrss=$true ;EnableIPsecOffload=$true ;EnableVmq=$true ;EnableRdma=$false}
$Classifications+=@{PortClassificationName="Host Management static" ; NativePortProfileName="Host management static" ; Description="" ; EnableIov=$false ; EnableVrss=$false ;EnableIPsecOffload=$true ;EnableVmq=$true ;EnableRdma=$false}
$Classifications+=@{PortClassificationName="RDMAvNIC" ; NativePortProfileName="RDMAvNIC" ; Description="Classification for RDMA enabed vNICs" ; EnableIov=$false ; EnableVrss=$false ;EnableIPsecOffload=$false ;EnableVmq=$false ;EnableRdma=$true}
$Classifications+=@{PortClassificationName="vNIC VMQ" ; NativePortProfileName="vNIC VMQ" ; Description="" ; EnableIov=$false ; EnableVrss=$false ;EnableIPsecOffload=$true ;EnableVmq=$true ;EnableRdma=$false}
$Classifications+=@{PortClassificationName="vNIC vRSS" ; NativePortProfileName="vNIC vRSS" ; Description="" ; EnableIov=$false ; EnableVrss=$true ;EnableIPsecOffload=$true ;EnableVmq=$true ;EnableRdma=$false}
if ($SRIOV) {
$Classifications+=@{PortClassificationName="SR-IOV" ; NativePortProfileName="SR-IOV Profile" ; Description="" ; EnableIov=$true ; EnableVrss=$false ;EnableIPsecOffload=$false ;EnableVmq=$false ;EnableRdma=$false}
$Classifications+=@{PortClassificationName="SR-IOV" ; NativePortProfileName="SR-IOV Profile" ; Description="" ; EnableIov=$true ; EnableVrss=$false ;EnableIPsecOffload=$false ;EnableVmq=$false ;EnableRdma=$false}
}

#logical networks definition
Expand All @@ -171,8 +171,8 @@
$Networks+=@{LogicalNetworkName="VMs Network" ; HostGroupName=$HostGroupName ; Name="DMZ" ; Description="DMZ VLAN" ; Subnet="192.168.2.0/24" ; VLAN=2 ; IPAddressRangeStart="192.168.2.1" ;IPAddressRangeEnd="192.168.2.254" ;DNSServers=("10.0.0.11","10.0.0.10") ;Gateways="192.168.2.1"}

$vNICDefinitions=@()
$vNICDefinitions+=@{NetAdapterName="SMB_1" ; Management=$false ; InheritSettings=$false ; IPv4AddressType="Static" ; VMNetworkName="Storage" ; VMSubnetName="Storage" ;PortClassificationName="vRDMA" ;IPAddressPoolName="Storage IP Pool"}
$vNICDefinitions+=@{NetAdapterName="SMB_2" ; Management=$false ; InheritSettings=$false ; IPv4AddressType="Static" ; VMNetworkName="Storage" ; VMSubnetName="Storage" ;PortClassificationName="vRDMA" ;IPAddressPoolName="Storage IP Pool"}
$vNICDefinitions+=@{NetAdapterName="SMB_1" ; Management=$false ; InheritSettings=$false ; IPv4AddressType="Static" ; VMNetworkName="Storage" ; VMSubnetName="Storage" ;PortClassificationName="RDMAvNIC" ;IPAddressPoolName="Storage IP Pool"}
$vNICDefinitions+=@{NetAdapterName="SMB_2" ; Management=$false ; InheritSettings=$false ; IPv4AddressType="Static" ; VMNetworkName="Storage" ; VMSubnetName="Storage" ;PortClassificationName="RDMAvNIC" ;IPAddressPoolName="Storage IP Pool"}
$vNICDefinitions+=@{NetAdapterName="Management" ; Management=$true ; InheritSettings=$true ; IPv4AddressType="Dynamic"; VMNetworkName="Management" ; VMSubnetName="Management" ;PortClassificationName="Host management static" ;IPAddressPoolName="Management IP Pool"}

#ask for parent vhdx for Hyper-V Hosts and VMs
Expand Down Expand Up @@ -632,7 +632,7 @@
#Refresh VM Hosts
Get-SCVMHost | Read-SCVMHost

#Associate each of the vNICs configured for RDMA to a physical adapter that is up and is not virtual (to be sure that each vRDMA NIC is mapped to separate pRDMA NIC)
#Associate each of the vNICs configured for RDMA to a physical adapter that is up and is not virtual (to be sure that each RDMA enabled ManagementOS vNIC is mapped to separate RDMA pNIC)
#install features
foreach ($server in $servers) {Install-WindowsFeature -Name "Hyper-V-PowerShell" -ComputerName $server}

Expand Down
2 changes: 1 addition & 1 deletion Scenarios/S2D Converged/Scenario.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ Write-host "Script started at $StartDateTime"
#Enable RDMA on the host vNIC adapters
Enable-NetAdapterRDMA "vEthernet (SMB_1)","vEthernet (SMB_2)" -CimSession $AllServers

#Associate each of the vNICs configured for RDMA to a physical adapter that is up and is not virtual (to be sure that each vRDMA NIC is mapped to separate pRDMA NIC)
#Associate each of the vNICs configured for RDMA to a physical adapter that is up and is not virtual (to be sure that each RDMA enabled ManagementOS vNIC is mapped to separate RDMA pNIC)
Invoke-Command -ComputerName $allservers -ScriptBlock {
$physicaladapters=(get-vmswitch SETSwitch).NetAdapterInterfaceDescriptions | Sort-Object
Set-VMNetworkAdapterTeamMapping -VMNetworkAdapterName "SMB_1" -ManagementOS -PhysicalNetAdapterName (get-netadapter -InterfaceDescription $physicaladapters[0]).name
Expand Down
2 changes: 1 addition & 1 deletion Scenarios/S2D Hyperconverged/Scenario.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ Write-host "Script started at $StartDateTime"
#Enable RDMA on the host vNIC adapters
Enable-NetAdapterRDMA "vEthernet (SMB_1)","vEthernet (SMB_2)" -CimSession $Servers

#Associate each of the vNICs configured for RDMA to a physical adapter that is up and is not virtual (to be sure that each vRDMA NIC is mapped to separate pRDMA NIC)
#Associate each of the vNICs configured for RDMA to a physical adapter that is up and is not virtual (to be sure that each RDMA enabled ManagementOS vNIC is mapped to separate RDMA pNIC)
Invoke-Command -ComputerName $servers -ScriptBlock {
$physicaladapters=(get-vmswitch SETSwitch).NetAdapterInterfaceDescriptions | Sort-Object
Set-VMNetworkAdapterTeamMapping -VMNetworkAdapterName "SMB_1" -ManagementOS -PhysicalNetAdapterName (get-netadapter -InterfaceDescription $physicaladapters[0]).name
Expand Down
2 changes: 1 addition & 1 deletion Scenarios/S2D Networks deep dive/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ $servers="2NICs1","2NICs2"
#enable RDMA
Enable-NetAdapterRDMA "vEthernet (SMB_1)","vEthernet (SMB_2)" -CimSession $servers
#map each of the vNICs configured for RDMA to a physical adapter that is up and is not virtual (to be sure that each vRDMA NIC is mapped to separate pRDMA NIC)
#map each of the vNICs configured for RDMA to a physical adapter that is up and is not virtual (to be sure that each RDMA enabled ManagementOS vNIC is mapped to separate RDMA pNIC)
Invoke-Command -ComputerName $servers -ScriptBlock {
$physicaladapters=(get-vmswitch SETSwitch).NetAdapterInterfaceDescriptions | Sort-Object
Set-VMNetworkAdapterTeamMapping -VMNetworkAdapterName "SMB_1" -ManagementOS -PhysicalNetAdapterName (get-netadapter -InterfaceDescription $physicaladapters[0]).name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ Restart-NetAdapter "vEthernet (SMB_2)" -CimSession $Servers
#Enable RDMA on the host vNIC adapters
Enable-NetAdapterRDMA "vEthernet (SMB_1)", "vEthernet (SMB_2)" -CimSession $Servers

#Associate each of the vNICs configured for RDMA to a physical adapter that is up and is not virtual (to be sure that each vRDMA NIC is mapped to separate pRDMA NIC)
#Associate each of the vNICs configured for RDMA to a physical adapter that is up and is not virtual (to be sure that each RDMA enabled ManagementOS vNIC is mapped to separate RDMA pNIC)
Invoke-Command -ComputerName $servers -ScriptBlock {
$physicaladapters = (get-vmswitch sdnSwitch).NetAdapterInterfaceDescriptions | Sort-Object
Set-VMNetworkAdapterTeamMapping -VMNetworkAdapterName "SMB_1" -ManagementOS -PhysicalNetAdapterName (get-netadapter -InterfaceDescription $physicaladapters[0]).name
Expand Down
2 changes: 1 addition & 1 deletion Scenarios/StorageReplica/S2D_to_S2D_Complex/scenario.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ if ($WindowsInstallationType -eq "Server"){
#Enable RDMA on the host vNIC adapters
Enable-NetAdapterRDMA "vEthernet (SMB_1)","vEthernet (SMB_2)" -CimSession $Servers

#Associate each of the vNICs configured for RDMA to a physical adapter that is up and is not virtual (to be sure that each vRDMA NIC is mapped to separate pRDMA NIC)
#Associate each of the vNICs configured for RDMA to a physical adapter that is up and is not virtual (to be sure that each RDMA enabled ManagementOS vNIC is mapped to separate RDMA pNIC)
Invoke-Command -ComputerName $servers -ScriptBlock {
$physicaladapters=(get-vmswitch SETSwitch).NetAdapterInterfaceDescriptions | Sort-Object
Set-VMNetworkAdapterTeamMapping -VMNetworkAdapterName "SMB_1" -ManagementOS -PhysicalNetAdapterName (get-netadapter -InterfaceDescription $physicaladapters[0]).name
Expand Down
28 changes: 15 additions & 13 deletions Scripts/2_CreateParentDisks.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,8 @@ If (!( $isAdmin )) {
VHDName="Win2019Core_G2.vhdx"
Size=30GB
}
}elseif ($BuldNumber -ge 17744){
#Windows Sevrver Insider
}elseif ($BuildNumber -ge 17744){
#Windows Sever Insider
$ServerVHDs += @{
Edition="4"
VHDName="WinSrvInsider_$BuildNumber.vhdx"
Expand All @@ -339,20 +339,22 @@ If (!( $isAdmin )) {
VHDName="WinSrvInsiderCore_$BuildNumber.vhdx"
Size=30GB
}
}else{
WriteErrorAndExit "Plese provide Windows Server 2016, 2019 or Insider greater or equal to build 17744"
}

#Test if Tools.vhdx already exists
if ($ParentDisksNames -contains "tools.vhdx"){
WriteSuccess "`t Tools.vhdx already exists. Creation will be skipped"
}else{
WriteInfo "`t Tools.vhdx not found, will be created"
}
#Test if Tools.vhdx already exists
if ($ParentDisksNames -contains "tools.vhdx"){
WriteSuccess "`t Tools.vhdx already exists. Creation will be skipped"
}else{
WriteInfo "`t Tools.vhdx not found, will be created"
}

#check if DC exists
if (Get-ChildItem -Path "$PSScriptRoot\LAB\DC\" -Recurse -ErrorAction SilentlyContinue){
$DCFilesExists=$true
WriteInfoHighlighted "Files found in $PSScriptRoot\LAB\DC\. DC Creation will be skipped"
}
#check if DC exists
if (Get-ChildItem -Path "$PSScriptRoot\LAB\DC\" -Recurse -ErrorAction SilentlyContinue){
$DCFilesExists=$true
WriteInfoHighlighted "Files found in $PSScriptRoot\LAB\DC\. DC Creation will be skipped"
}

#endregion

Expand Down
Binary file modified scripts.zip
Binary file not shown.

0 comments on commit df401db

Please sign in to comment.