환경 hpst OS : windows 2016 server guest vm : windows 10 GPU
PowerShell 실행
-------------------------------기본 변수 지정-------------------------------------------- 제어판 – 장치관리자 – 디스플레이 어댑터 – VM에 할당할 GPU 카드 속성 – 자세히 인스턴스 경로 : PCI\VEN_10DE&DEV_102D&SUBSYS_106C10DE&REV_A1\6&41A1BBC&0&00400018 위치 경로 : PCIROOT(0)#PCI(0300)#PCI(0000)#PCI(0800)#PCI(0000)
#vm 이름 변수 선언 및 할당 $vm = "가상머신이름"
#GPU 장치 인스턴스 경로 변수 선언 및 할당 $gpudevs = "PCI\VEN_10DE&DEV_102D&SUBSYS_106C10DE&REV_A1\6&41A1BBC&0&00400018"
#GPU 위치 경로 변수 선언 및 할당 $locationPath = "PCIROOT(0)#PCI(0300)#PCI(0000)#PCI(0800)#PCI(0000)"
---------------------VM에서 GPU 장치 할당 (가상머신을 종료 후 진행)---------------------- step 1) #자동 중지 작업 설정(가상 컴퓨터 끄기 로 설정이 변경됩니다.) Set-VM -Name $vm -AutomaticStopAction TurnOff
#CPU에 Write-Combining 설정 Set-VM -GuestControlledCacheTypes $true -VMName $vm
#32 bit MMIO 공간 구성 Set-VM -LowMemoryMappedIoSpace 3Gb -VMName $vm
#32 bit 이상 MMIO 공간 구성 Set-VM -HighMemoryMappedIoSpace 33280Mb -VMName $vm
* MMIO 공간에 대해서 추가적인 확인은 URL 참조 https://docs.microsoft.com/ko-kr/windows-server/virtualization/hyper-v/plan/plan-for-deploying-devices-using-discrete-device-assignment
step 2) #호스트 서버에서 GPU 장치 사용 안 함 설정 (사용 안 함 설정이 되어있다면 무시 가능) Disable-PnpDevice -InstanceId $gpudevs
#호스트 서버에서 GPU 장치 분리 Dismount-VMHostAssignableDevice -force -LocationPath $locationPath