Add check for Virtual Machine Platform to prepare script

This commit is contained in:
Chris Long
2021-02-26 10:56:17 -08:00
parent 94ff451105
commit 9b597c99a5
2 changed files with 9 additions and 0 deletions

View File

@@ -253,6 +253,14 @@ function preflight_checks {
else {
Write-Host ' ['$($checkmark)'] The vagrant-reload plugin is installed' -ForegroundColor green
}
# Warn if Virtual Machine Platform is enabled
Write-Host ''
Write-Host '[+] Checking if Virtual Machine Platform is enabled...'
if ((Get-WindowsOptionalFeature -Online -FeatureName "VirtualMachinePlatform").State -eq "Enabled") {
Write-Host ' [-] The "Virtual Machine Platform" Windows feature is enabled on your computer and is known to cause issues with starting Virtualbox VMs' -ForegroundColor yellow
Write-Host ' [-] If you experience issues with Virtualbox, it is recommended to disable it by running "optionalfeatures" from the run prompt and unchecking "Virtual Machine Platform".' -ForegroundColor yellow
}
}