close

接續前一篇

既然可以直接存取到VM

使用完畢之後,或是要給其他的VM

則要載卸VM裡的GPU

 

Step1: 關閉 VM Guest OS

 

Step2: 列出所有device的名稱

$ppsrch = Get-PnpDevice | Where-Object {$_.Present -eq $true} | Where-Object {$_.Class -eq "System"}

 

Step3:

$ppsrch > tmp.txt

建議將step2.列出的所有device都先輸出至一個txt

然後再開啟文字檔,搜尋dismounted device

除非你還有dismount其他device,不然應該只有一個

記下他在tmp.txt檔的第幾行 ex是第31

 

Step4:

$locationpath = ($ppsrch[30] | Get-PnpDeviceProperty DEVPKEY_Device_LocationPaths).data[0]

 

Step5:

$locationpath

 

Step6:

Remove-VMHostAssignableDevice -LocationPath $locationpath -VMName W2016  (or Remove-VMAssignableDevice -LocationPath $locationpath -VMName W2016)

 

Step7:

Mount-VMHostAssignableDevice -LocationPath $locationpath 

(or Mount-VMHostAssignableDevice -LocationPath $locationpath)

 

Step8:

$pnp = Get-PnpDevice | Where-Object {$_.Present -eq $true} | Where-Object {$_.Class -eq "Display"}

 

Step9:

$pnp

應該這時候就可以看到尚未pass through GPU以前的display數量(前篇的step1相同)

 

Step10:

Enable-PnpDevice -InstanceId $pnp[0].InstanceId -Confirm:$false

或是直接在device manager enable也行

arrow
arrow
    全站熱搜

    Kim 發表在 痞客邦 留言(0) 人氣()