Skip to content

Commit

Permalink
Merge pull request #91 from ElstonLewis/Windows_2019_network
Browse files Browse the repository at this point in the history
Updated scripts to handle mtu update on interface name change and lat…
  • Loading branch information
ElstonLewis authored Oct 31, 2024
2 parents 95fde8c + 85214c5 commit 2a2f832
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
14 changes: 8 additions & 6 deletions files/windows/scripts/start.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
.NOTES
Name of file : start.ps1
Author : Outscale
Date : November 16th, 2023
Version : 1.7
Date : November 1st, 2024
Version : 1.8
#>

<# Functions #>
Expand Down Expand Up @@ -292,13 +292,15 @@ try {
WriteLog("*******************************************************************************")
WriteLog("Updating MTU Ethernet Configuration")

# Get Ethernet Interface name
$ethernetAdapter = Get-NetAdapter | Where-Object { $_.Status -eq "Up" -and $_.InterfaceDescription -like "*Ethernet*" } | Select-Object -ExpandProperty Name

# Network Interface
Disable-NetAdapterBinding -InterfaceAlias "Ethernet" -ComponentID ms_tcpip6
Disable-NetAdapterBinding -InterfaceAlias Ethernet -ComponentID ms_tcpip6
Disable-NetAdapterBinding -InterfaceAlias $ethernetAdapter -ComponentID ms_tcpip6

$mtu = (Get-NetIPInterface -InterfaceAlias "Ethernet").NlMtu
$mtu = (Get-NetIPInterface -InterfaceAlias $ethernetAdapter).NlMtu
if ($mtu -ne 8950) {
Set-NetAdapterAdvancedProperty -Name "Ethernet" -DisplayName "Jumbo Packet" -DisplayValue "8964"
Set-NetAdapterAdvancedProperty -Name $ethernetAdapter -DisplayName "Jumbo Packet" -DisplayValue "8964"
WriteLog("Set-NetIPInterface Ethernet NlMtuBytes 8950")
} else {
WriteLog("Set-NetIPInterface Ethernet NlMtuBytes 8950 already set")
Expand Down
6 changes: 3 additions & 3 deletions scripts/windows/virtio.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
.NOTES
Name of file : virtio.ps1
Author : Outscale
Date : February 3rd, 2022
Version : 1.0
Date : November 1st, 2024
Version : 1.1
#>

#VirtIO msi file URL
$MsiURL = "https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.229-1/virtio-win-gt-x64.msi"
$MsiURL = "https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.262-2/virtio-win-gt-x64.msi"

#Downloaded msi file name
$MsiName = "virtio-win.msi"
Expand Down

0 comments on commit 2a2f832

Please sign in to comment.