mirror of
https://github.com/jamesstringerparsec/Easy-GPU-PV.git
synced 2024-08-30 18:22:17 +00:00
Only set nested virtualization on Win10 AMD machines
This commit is contained in:
parent
11648360a9
commit
5d2d4f24f6
@ -4302,7 +4302,13 @@ param(
|
||||
New-VM -Name $VMName -MemoryStartupBytes $MemoryAmount -VHDPath $VhdPath -Generation 2 -SwitchName "Default Switch" -Version $MaxAvailableVersion | Out-Null
|
||||
Set-VM -Name $VMName -ProcessorCount $CPUCores -CheckpointType Disabled -LowMemoryMappedIoSpace 3GB -HighMemoryMappedIoSpace 32GB -GuestControlledCacheTypes $true -AutomaticStopAction ShutDown
|
||||
Set-VMMemory -VMName $VMName -DynamicMemoryEnabled $false
|
||||
Set-VMProcessor -VMName $VMName -ExposeVirtualizationExtensions $true
|
||||
$CPUManufacturer = Get-CimInstance -ClassName Win32_Processor | select Manufacturer
|
||||
$BuildVer = Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion'
|
||||
if (($BuildVer.CurrentBuild -lt 22000) -and ($CPUManufacturer -eq "AuthenticAMD")) {
|
||||
}
|
||||
Else {
|
||||
Set-VMProcessor -VMName $VMName -ExposeVirtualizationExtensions $true
|
||||
}
|
||||
Set-VMHost -ComputerName $ENV:Computername -EnableEnhancedSessionMode $false
|
||||
Set-VMKeyProtector -VMName $VMName -NewLocalKeyProtector
|
||||
Enable-VMTPM -VMName $VMName
|
||||
|
Loading…
Reference in New Issue
Block a user