microsoft / Windows-Sandbox

Disposable, secure and lightweight Windows Desktop Environment
https://docs.microsoft.com/en-us/windows/security/threat-protection/windows-sandbox/windows-sandbox-overview
MIT License
364 stars 49 forks source link

I've already enabled Virtualization capabilities in the BIOS, but it still prompts me to do it. #15

Closed NEPTLIANG closed 4 years ago

NEPTLIANG commented 4 years ago
ERROR: Please Enable Virtualization capabilities in your BIOS settings...

image

sebassem commented 4 years ago

Do you have VTx enabled from the BIOS ?

scarycrow-dave commented 4 years ago

I have VTx enabled in Bios, and I still get prompted, any ideas how to fix.

VTenabled

sebassem commented 4 years ago

It appears that the check for BIOS is not returning consistent results across different models , can you please share the output of both commands below in an elevated PowerShell session ?

scarycrow-dave commented 4 years ago

PS C:\WINDOWS\system32> Get-ComputerInfo -Property HyperVRequirementVirtualizationFirmwareEnabled,hypervisorpresent
HyperVRequirementVirtualizationFirmwareEnabled HyperVisorPresent


                                                        True

PS C:\WINDOWS\system32> (Get-WmiObject win32_computersystem).hypervisorpresent True

Dreamer451 commented 4 years ago

I have the same issue and yes, virtualization is enabled in my BIOS. The output of the first command:

The second command results in False. This is on an HP OMEN an188nr.

sebassem commented 4 years ago

@scarycrow-dave thanks for sharing the output , you should not get this message if the second output if true which is the case as you shared , one more check please to confirm that virtualization is correctly enabled on your machine . Please run the below to enable the sandbox feature and validate if it was enabled successfully or you got an error message

Enable-WindowsOptionalFeature -FeatureName 'Containers-DisposableClientVM' -All -Online -NoRestart

scarycrow-dave commented 4 years ago

PS C:\WINDOWS\system32> Enable-WindowsOptionalFeature -FeatureName 'Containers-DisposableClientVM' -All -Online -NoRestart

Path : Online : True RestartNeeded : False

sebassem commented 4 years ago

PS C:\WINDOWS\system32> Enable-WindowsOptionalFeature -FeatureName 'Containers-DisposableClientVM' -All -Online -NoRestart

Path : Online : True RestartNeeded : False

Thank you , will submit a fix shortly

rdjr71 commented 4 years ago

The script is currently checking to see if a Hypervisor is already present. That will return True if you have Hyper-V already installed (so the computer supports virtualization). But that does not tell you if your computer supports Virtualization when it returns False.

If it returns false for hypervisor present, you'll need to check to make sure these are true so you know virtualization is supported.

(GWMI Win32_Processor).VirtualizationFirmwareEnabled and (GWMI Win32_Processor).SecondLevelAddressTranslationExtensions

sebassem commented 4 years ago

The script is currently checking to see if a Hypervisor is already present. That will return True if you have Hyper-V already installed (so the computer supports virtualization). But that does not tell you if your computer supports Virtualization when it returns False.

If it returns false for hypervisor present, you'll need to check to make sure these are true so you know virtualization is supported.

(GWMI Win32_Processor).VirtualizationFirmwareEnabled and (GWMI Win32_Processor).SecondLevelAddressTranslationExtensions

Thank you , we are trying to check if virtualization is enabled or not ,VirtualizationFirmwareEnabled returns false or empty value if hypervisor is enabled

rdjr71 commented 4 years ago

Yeah, the presence of a hypervisor changes what you get when you query the CPU. I would check for hypervisor=false, if false then do the additional 2 checks to make sure they are true.

brasmith-ms commented 4 years ago

Merged into master fff6af8e10496c37ca29501f2de3cbdb4c834ca8

scarycrow-dave commented 4 years ago

Thank you that fixed it :)