Skip to content

Commit

Permalink
Update post_install.ps1 (#2402)
Browse files Browse the repository at this point in the history
Reverting time server address and GVNIC GQ for all due to a bug.
  • Loading branch information
bkatyl authored Nov 12, 2024
1 parent 1731538 commit 2570f69
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions daisy_workflows/image_build/windows/post_install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -302,15 +302,15 @@ function Setup-NTP {
Run-Command $w32tm /register

# Get time from GCE NTP server every 15 minutes.
Run-Command $w32tm /config '/manualpeerlist:169.254.169.254,0x1' /syncfromflags:manual
Run-Command $w32tm /config '/manualpeerlist:metadata.google.internal,0x1' /syncfromflags:manual
Start-Sleep -s 300
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient' `
-Name SpecialPollInterval -Value 900
# Set in Control Panel -- Append to end of list, set default.
$server_key = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers'
$server_item = Get-Item $server_key
$server_num = ($server_item.GetValueNames() | Measure-Object -Maximum).Maximum + 1
Set-ItemProperty -Path $server_key -Name $server_num -Value '169.254.169.254'
Set-ItemProperty -Path $server_key -Name $server_num -Value 'metadata.google.internal'
Set-ItemProperty -Path $server_key -Name '(Default)' -Value $server_num
# Configure to run automatically on every start.
Set-Service W32Time -StartupType Automatic
Expand Down Expand Up @@ -540,12 +540,12 @@ function Install-DriverPackages {
Write-Host 'Installing GCE Driver Packages...'
# Install each individually in order to catch individual errors
# if 2019/2022 install GQ else Install GVNIC DQ (2016/2025)
if (([System.Environment]::OSVersion.Version.Major -ge 10 -and [System.Environment]::OSVersion.Version.Build -gt 14393) -and ([System.Environment]::OSVersion.Version.Major -ge 10 -and [System.Environment]::OSVersion.Version.Build -lt 26100)) {
Run-Command 'C:\ProgramData\GooGet\googet.exe' -root 'C:\ProgramData\GooGet' -noconfirm install -sources https://packages.cloud.google.com/yuck/repos/google-compute-engine-driver-gvnic-gq-stable google-compute-engine-driver-gvnic
}
else {
Run-Command 'C:\ProgramData\GooGet\googet.exe' -root 'C:\ProgramData\GooGet' -noconfirm install google-compute-engine-driver-gvnic
}
# if (([System.Environment]::OSVersion.Version.Major -ge 10 -and [System.Environment]::OSVersion.Version.Build -gt 14393) -and ([System.Environment]::OSVersion.Version.Major -ge 10 -and [System.Environment]::OSVersion.Version.Build -lt 26100)) {
Run-Command 'C:\ProgramData\GooGet\googet.exe' -root 'C:\ProgramData\GooGet' -noconfirm install -sources https://packages.cloud.google.com/yuck/repos/google-compute-engine-driver-gvnic-gq-stable google-compute-engine-driver-gvnic
# }
# else {
# Run-Command 'C:\ProgramData\GooGet\googet.exe' -root 'C:\ProgramData\GooGet' -noconfirm install google-compute-engine-driver-gvnic
# }
Run-Command 'C:\ProgramData\GooGet\googet.exe' -root 'C:\ProgramData\GooGet' -noconfirm install google-compute-engine-driver-vioscsi
Run-Command 'C:\ProgramData\GooGet\googet.exe' -root 'C:\ProgramData\GooGet' -noconfirm install google-compute-engine-driver-netkvm
Run-Command 'C:\ProgramData\GooGet\googet.exe' -root 'C:\ProgramData\GooGet' -noconfirm install google-compute-engine-driver-pvpanic
Expand Down

0 comments on commit 2570f69

Please sign in to comment.