After doing almost everything and losing hope that my pc couldn't run nested virtualization due to VBS not turning off.
I found this.
Before you start. I did a fresh install of windows, and I mean a fresh install. I created a bootable USB and downloaded windows 11. Personally, I used rufus Rufus - Create bootable USB drives the easy way
Once booted up you can start to disable VBS.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity = 0
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\DeviceGuard\EnableVirtualizationBasedSecurity = 0
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceGuardRequirePlatformSecurityFeatures = 0
Don't forget to turn core integrity to off
Open PowerShell as an administrator
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard" -Name "EnableVirtualizationBasedSecurity" -Value 0
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" -Name "Enabled" -Value 0
Disable Hypervisor
bcdedit /set hypervisorlaunchtype off
However msinfo32 still shows running.
Next Disable credential guard from elevated CMD (Line by line)
mountvol X: /s
copy %WINDIR%\System32\SecConfig.efi X:\EFI\Microsoft\Boot\SecConfig.efi /Y
bcdedit /create {0cb3b571-2f2e-4343-a879-d86a476d7215} /d “DebugTool” /application osloader
bcdedit /set {0cb3b571-2f2e-4343-a879-d86a476d7215} path “\EFI\Microsoft\Boot\SecConfig.efi”
bcdedit /set {bootmgr} bootsequence {0cb3b571-2f2e-4343-a879-d86a476d7215}
bcdedit /set {0cb3b571-2f2e-4343-a879-d86a476d7215} loadoptions DISABLE-LSA-ISO
bcdedit /set {0cb3b571-2f2e-4343-a879-d86a476d7215} device partition=X:
mountvol X: /d
bcdedit /set {0cb3b571-2f2e-4343-a879-d86a476d7215} loadoptions DISABLE-LSA-ISO,DISABLE-VBS
bcdedit /set vsmlaunchtype off
bcdedit /set hypervisorlaunchtype off
dism /online /disable-feature /featurename:Microsoft-hyper-v-all
Restart the computer to apply changes
Restart-Computer
After a reboot your BIOS will ask you if you would like to turn off Device Guard/ Credential Guard.