Skip to content

Commit 0226f7b

Browse files
authored
Revert "[MacOS] Unpin Virtualbox" (#8731)
* Revert "[MacOS] Unpin Virtualbox (#8653)" This reverts commit f3d011e. * Add more info
1 parent b4c9250 commit 0226f7b

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

images/macos/provision/core/commonutils.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,18 @@ done
1313
cask_packages=$(get_toolset_value '.brew.cask_packages[]')
1414
for package in $cask_packages; do
1515
echo "Installing $package..."
16-
brew install --cask $package
16+
if [[ $package == "virtualbox" ]]; then
17+
if ! is_Ventura || ! is_VenturaArm64; then
18+
# Do not update VirtualBox on macOS 12 due to the issue with VMs in gurumediation state which blocks Vagrant on macOS: https://github.com/actions/runner-images/issues/8730
19+
# macOS host: Dropped all kernel extensions. VirtualBox relies fully on the hypervisor and vmnet frameworks provided by Apple now.
20+
vbcask_url="https://raw.githubusercontent.com/Homebrew/homebrew-cask/aa3c55951fc9d687acce43e5c0338f42c1ddff7b/Casks/virtualbox.rb"
21+
download_with_retries $vbcask_url
22+
brew install ./virtualbox.rb
23+
rm ./virtualbox.rb
24+
fi
25+
else
26+
brew install --cask $package
27+
fi
1728
done
1829

1930
# Load "Parallels International GmbH"

images/macos/tests/Common.Tests.ps1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,12 @@ Describe "Go" -Skip:($os.IsVentura -or $os.IsVenturaArm64) {
123123
}
124124
}
125125

126+
Describe "VirtualBox" -Skip:($os.IsBigSur -or $os.IsVentura -or $os.IsVenturaArm64) {
127+
It "Check kext kernel modules" {
128+
kextstat | Out-String | Should -Match "org.virtualbox.kext"
129+
}
130+
}
131+
126132
Describe "CodeQL Bundle" {
127133
It "Is installed" {
128134
$CodeQLVersionWildcard = Join-Path $Env:AGENT_TOOLSDIRECTORY -ChildPath "CodeQL" | Join-Path -ChildPath "*"

0 commit comments

Comments
 (0)