Jump to content

passthrough/partition iGPU to Hyper-V VM

Go to solution Solved by hellomynameisleo,
1 hour ago, m9x3mos said:

This might actually work. 

You can try using this for it to see what it does. 

Just make sure you have the latest intel graphics driver installed from their site first. 

https://github.com/Razzmatazzz/Interactive-Easy-GPU-PV

I've look at the scripts for this and it look really exessive and there doesn't seem to be an easy undo for all those changes. I use the RTX 3090 gpu for my host.

 

Any idea if this would work for just an intel iGPU?

edit: it works

$vm = "myVM"
if (Get-VMGpuPartitionAdapter -VMName $vm -ErrorAction SilentlyContinue) {
   Remove-VMGpuPartitionAdapter -VMName $vm
}
Set-VM -GuestControlledCacheTypes $true -VMName $vm
Set-VM -LowMemoryMappedIoSpace 1Gb -VMName $vm
Set-VM -HighMemoryMappedIoSpace 32Gb -VMName $vm
Add-VMGpuPartitionAdapter -VMName $vm -Instancepath "\\?\PCI#VEN_8086&DEV_A780&SUBSYS_7D251462&REV_04#3&11583659&0&10#{064092b3-625e-43bf-9eb5-dc845897dd59}\GPUPARAV"

I've been looking online for guides for passing through or somehow giving access a Intel iGPU to a Hyper-V VM but only found partitioning for a dedicated GPU.

Are there any guides I can follow to use a iGPU instead for my hyper-V VM or is it not possible?

Link to comment
Share on other sites

Link to post
Share on other sites

It's basically the same thing. A igpu is just another gpu really.

Link to comment
Share on other sites

Link to post
Share on other sites

you cannot pass through your igpu if there are no other gpus in the host.
otherwise assuming you have a graphics card or something, then make sure the igpu has drivers installed and is showed up in windows, then it should just show up in the list of devices you can pass through.

Link to comment
Share on other sites

Link to post
Share on other sites

you can pass it through like any other gpu. But you will need a pcie gpu for your host in that case.
you cannot share an iGPU

I make Rainmeter things and other art :D

Link to comment
Share on other sites

Link to post
Share on other sites

40 minutes ago, hellomynameisleo said:

I've been looking online for guides for passing through or somehow giving access a Intel iGPU to a Hyper-V VM but only found partitioning for a dedicated GPU.

Are there any guides I can follow to use a iGPU instead for my hyper-V VM or is it not possible?

This might actually work. 

You can try using this for it to see what it does. 

Just make sure you have the latest intel graphics driver installed from their site first. 

https://github.com/Razzmatazzz/Interactive-Easy-GPU-PV

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, m9x3mos said:

This might actually work. 

You can try using this for it to see what it does. 

Just make sure you have the latest intel graphics driver installed from their site first. 

https://github.com/Razzmatazzz/Interactive-Easy-GPU-PV

I've look at the scripts for this and it look really exessive and there doesn't seem to be an easy undo for all those changes. I use the RTX 3090 gpu for my host.

 

Any idea if this would work for just an intel iGPU?

edit: it works

$vm = "myVM"
if (Get-VMGpuPartitionAdapter -VMName $vm -ErrorAction SilentlyContinue) {
   Remove-VMGpuPartitionAdapter -VMName $vm
}
Set-VM -GuestControlledCacheTypes $true -VMName $vm
Set-VM -LowMemoryMappedIoSpace 1Gb -VMName $vm
Set-VM -HighMemoryMappedIoSpace 32Gb -VMName $vm
Add-VMGpuPartitionAdapter -VMName $vm -Instancepath "\\?\PCI#VEN_8086&DEV_A780&SUBSYS_7D251462&REV_04#3&11583659&0&10#{064092b3-625e-43bf-9eb5-dc845897dd59}\GPUPARAV"
Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, hellomynameisleo said:

I've look at the scripts for this and it look really exessive and there doesn't seem to be an easy undo for all those changes. I use the RTX 3090 gpu for my host.

 

Any idea if this would work for just an intel iGPU?

edit: it works

$vm = "myVM"
if (Get-VMGpuPartitionAdapter -VMName $vm -ErrorAction SilentlyContinue) {
   Remove-VMGpuPartitionAdapter -VMName $vm
}
Set-VM -GuestControlledCacheTypes $true -VMName $vm
Set-VM -LowMemoryMappedIoSpace 1Gb -VMName $vm
Set-VM -HighMemoryMappedIoSpace 32Gb -VMName $vm
Add-VMGpuPartitionAdapter -VMName $vm -Instancepath "\\?\PCI#VEN_8086&DEV_A780&SUBSYS_7D251462&REV_04#3&11583659&0&10#{064092b3-625e-43bf-9eb5-dc845897dd59}\GPUPARAV"

I'm glad that worked. It is complex due to the interactive capability. 

Pretty sure there is an undo in the ui so that should be in there somewhere. 

Link to comment
Share on other sites

Link to post
Share on other sites

19 minutes ago, m9x3mos said:

I'm glad that worked. It is complex due to the interactive capability. 

Pretty sure there is an undo in the ui so that should be in there somewhere. 

all I needed to do was just copy the host drivers from the host to the VM, disable checkpoint in the vm, then run that powershell command and it just worked.

 

That script is is long because it tries to make vm from scratch install os and parsec and do a bunch of other stuff.

I made a script below that is easy to run, shows and prompts for vmname and gpu name then does its thingy.

 

Get-VM | Format-Table
do {
    $vmName = read-host "Input VM name here to assign full GPU partition"
    if (!($(Get-VM).Name -contains $vmName)) {
        write-host "VM Name '$vmName' could not be found, try again." -ForegroundColor Red
    }
} while (!($(Get-VM).Name -contains $vmName))

Get-VMPartitionableGpu | select-object Name | Format-Table
do {
    $GPUName = read-host "Input GPU name here to assign to the Hyper-V VM"
    if (!($(Get-VMPartitionableGpu).Name -contains $GPUName)) {
        write-host "GPU Name '$GPUName' could not be found, try again." -ForegroundColor Red
    }
} while (!($(Get-VMPartitionableGpu).Name -contains $GPUName))
write-host "Assigning GPU '$GPUName' to VM '$vmName'" -ForegroundColor Green

read-host "Press enter to continue"

if (Get-VMGpuPartitionAdapter -VMName $vmName -ErrorAction SilentlyContinue) {
   Remove-VMGpuPartitionAdapter -VMName $vmName
}

Set-VM -GuestControlledCacheTypes $true -VMName $vmName
Set-VM -LowMemoryMappedIoSpace 1Gb -VMName $vmName
Set-VM -HighMemoryMappedIoSpace 32Gb -VMName $vmName

Add-VMGpuPartitionAdapter -VMName $vmName -Instancepath $GPUName

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×