IT/기타

WSL 활성화 ↔ VT-x/EPT or AMD-V/RVI 활성화 전환

kykyky 2024. 7. 23. 15:18

WSL 활성화

해당 VM이 위치한 폴더의 .vmx 파일 >

다음 라인 추가: hypervisor.cpuid.v0 = "FALSE"

 

windows 기능 켜기/끄기 >
"Hyper-V"와 "Windows Subsystem for Linux" 켜기

 

VMware Workstation >

Edit > Preferences > Display tab > "Accelerate 3D graphics" 활성화

Settings > Processors tab > "Virtualize CPU performance counters"와 "Virtualize Intel VT-x/EPT or AMD-V/RVI" 끄기

 

관리자 권한으로 PowerShell >

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
wsl.exe --install --no-distribution
bcdedit /enum | findstr -i hypervisorlaunchtype
bcdedit /set hypervisorlaunchtype Auto

 

PC 재시작

 

VT-x/EPT or AMD-V/RVI 활성화

Developer command prompt for VS을 관리자 권한으로 >

bcdedit /set hypervisorlaunchtype off && dism.exe /Online /Disable-Feature:Microsoft-Hyper-V-All && dism.exe /Online /Disable-Feature:Microsoft-Hyper-V-Hypervisor && dism.exe /Online /Disable-Feature:Microsoft-Hyper-V-Services && dism.exe /Online /Disable-Feature:Microsoft-Hyper-V-Tools-All && dism.exe /Online /Disable-Feature:Microsoft-Hyper-V-Management-PowerShell && dism.exe /Online /Disable-Feature:Microsoft-Hyper-V-Management-Clients

 

원래 개별 명령어는 아래와 같다

bcdedit /set hypervisorlaunchtype off
dism.exe /Online /Disable-Feature:Microsoft-Hyper-V-All
dism.exe /Online /Disable-Feature:Microsoft-Hyper-V-Hypervisor
dism.exe /Online /Disable-Feature:Microsoft-Hyper-V-Services
dism.exe /Online /Disable-Feature:Microsoft-Hyper-V-Tools-All
dism.exe /Online /Disable-Feature:Microsoft-Hyper-V-Management-PowerShell
dism.exe /Online /Disable-Feature:Microsoft-Hyper-V-Management-Clients

 

Powershell을 관리자 권한으로 >

Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All

Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\DeviceGuard" -Name "EnableVirtualizationBasedSecurity" -Value 0

New-Item -Path "HKLM:\System\CurrentControlSet\Control\DeviceGuard\Scenarios" -Name "CredentialGuard" -Force

Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\DeviceGuard\Scenarios\CredentialGuard" -Name "Enabled" -Value 0

 

windows 기능 켜기/끄기 >

Hyper-V, Windows Hypervisor platform, Windows Subsystem for Linux 끄기

 

코어 격리 끄기

 

서비스 >

Hyper-V와 HV Host Service 모두 끄기

 

그룹 정책 편집 >

Computer Configuration > Administrative Templates > System > Device Guard에서 가상화 기반 보안 켜기 끄기

 

레지스트리 편집기 >

Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\SystemGuard > Enabled를 0으로 설정

 

VMware Workstation >

Settings > Processors tab > "Virtualize Intel VT-x/EPT or AMD-V/RVI" 켜기