Hyper-V GPU Passthrough

这篇博客介绍了如何在Hyper-V主机上,通过PowerShell脚本将GPU直通给Windows 10 Pro虚拟机。首先,确保更新主机显卡驱动,然后复制驱动到虚拟机的System32目录。接着,通过PowerShell脚本进行文件复制,并创建VM的GPU分区适配器,设置不同VRAM和计算资源的分区。最后,调整虚拟机的内存映射空间并启动虚拟机。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Guest Windows 10 pro

Host Windows 10 pro

        Update host's graphic driver to most recent.

        Copy Host's System32 graphic driver to Guest System 32. (VM need to be power on and login)

************ Power Shell **********               

$vm = "Your_Hyper-V_VM_name"
$systemPath = "C:\Windows\System32\"
$driverPath = "C:\Windows\System32\DriverStore\FileRepository\"

# check if script is admin
$currentPrincipal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())
if( $currentPrincipal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) ) {
    
    # do we need guest vm privs? enable it
    Get-VM -Name $vm | Get-VMIntegrationService | ? {-n

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值