Giter Site home page Giter Site logo

easy-gpu-pv's People

Contributors

borgotto avatar collincodez avatar jamesstringerparsec avatar kodikuu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

easy-gpu-pv's Issues

Nvidia-SMI and other ramblings

Hi,

I'm sure you're going to get a ton of influx of activity here due to LTT's recent video, hope you don't mind me adding to that chaos..

OS: Windows 10 21H2
GPU: RTX 3080TI
CPU: intel 8700k (5 of 12 cores allocated to guest)
RAM: 32gb with 16 going to guest

A few things I've been wondering/playing with...

  1. nvidia-smi
    On the host OS, running nvidia-smi yields this:
    image

PID 15324 is parsec running on the host OS.
PID 1300 is dwm.exe

On the guest OS:
image

I'm wondering why there are several entries for "Insufficient Permissions" on the host OS, and on the guest OS it is erroring out. It says "No running processes" even when there is a 3d app running.

The whole thing DOES seem to be working acceptably though.. although, that brings me to my next "issue"

  1. GPU utilization stays around 40% on the host despite having set "GPUResourceAllocationPercentage = 50"
    Also, Task Manager on the guest OS does not have a GPU listed there, is that functioning as designed? I'm not supposed to see the host's GPU there, correct?

  2. Do you think there would be any benefit to rolling my driver back in order to use this patch: https://github.com/keylase/nvidia-patch/tree/master/win for patching nvfbs and nvenc to remove those limitations?

  3. For updating when there are changes to your github, is there a way to re-run the script without completely rebuilding the entire VM? Or is just running "Update-VMGPUPartitonDriver.ps1" for driver updates only sufficient?

  4. Would it be worth it to upgrade to windows 11, as far as performance and features are concerned in regards to this project?

Thanks for such a cool script and all your work!

Windows 10 21H2 Host: Add-VMGPUPartitionAdapter Error

When running the script on a Windows 10, 21H2 host, the following error was encountered.

Add-VMGpuPartitionAdapter : A parameter cannot be found that matches parameter name 'InstancePath'.

+     Add-VMGpuPartitionAdapter -VMName $VMName -InstancePath $DevicePa ...
+                                               ~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Add-VMGpuPartitionAdapter], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.HyperV.PowerShell.Commands.AddVMGpuPartitionAdapter

Omitting the -InstancePath parameter on line 4251 seems to resolve the issue,
Add-VMGpuPartitionAdapter -VMName $VMName

I could find any available parameters that seemed like they would be a direct replacement for -InstancePath is that parameter perhaps depreciated? I have not seen it referenced in other GPU-P guides.

Can it be removed or are there instances where it's required such as Laptops with Switching Graphics?

Creating a VM with certain (too long?) names will cause Windows 11 to fail to process unattend.xml on startup.

exact error message is as follows:

Windows could not parse or process unattend answer file [C:\unattend.xml] for pass [specialize]. The answer file is invalid.

The VMName is passed as ComputerName inside the specialize pass, which is why the VMName can affect anything on the VM at all. I suspect what was causing me to run into this issue was that I was using a 20 character long VMName, while Windows has a 15 character limit on NetBIOS names. I cut that down to a 6 character name, which allowed windows to actually finish setting up and boot.

GPU Issue

After I followed all the steps, it all went smoothly.
Only one error cause I was simply being dump, that got fixed.

My GPU shows up in device manager but not task manager.
From the way a game ran it acted like it was on integrated graphics and several other programs did not recognize the GPUI.
The Drivers did carry over and I did use the Update-VMGpuPartitionDriver in admin for PowerShell.

Current GPU > Radeon RX 580 8GB
CPU > Ryzen 7 1700x
OS > Windows 10 Pro

Followed the steps but keep running into this error

PS C:\Windows\system32> C:\Users\Benjamin Tan\Downloads\Easy-GPU-P-main\Easy-GPU-P-main\CopyFilesToVM.ps1
Import-Module : File C:\Users\Benjamin Tan\Downloads\Easy-GPU-P-main\Easy-GPU-P-main\Add-VMGpuPartitionAdapterFiles.psm1 cannot be loaded. The file C:\Users\Benjamin
Tan\Downloads\Easy-GPU-P-main\Easy-GPU-P-main\Add-VMGpuPartitionAdapterFiles.psm1 is not digitally signed. You cannot run this script on the current system. For more
information about running scripts and setting execution policy, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At C:\Users\Benjamin Tan\Downloads\Easy-GPU-P-main\Easy-GPU-P-main\CopyFilesToVM.ps1:25 char:1

  • Import-Module $PSSCriptRoot\Add-VMGpuPartitionAdapterFiles.psm1
  •   + CategoryInfo          : SecurityError: (:) [Import-Module], PSSecurityException
      + FullyQualifiedErrorId : UnauthorizedAccess,Microsoft.PowerShell.Commands.ImportModuleCommand
    
    

Windows(R) Image to Virtual Hard Disk Converter for Windows(R) 10
Copyright (C) Microsoft Corporation. All rights reserved.
Version 10.0.14278.1000.amd64fre.rs1_es_media.160201-1707

INFO : Opening ISO Win11_English_x64v1.iso...
INFO : Looking for E:\sources\install.wim...
INFO : Looking for the requested Windows image in the WIM file
INFO : Image 6 selected (Professional)...
INFO : Creating sparse disk...
INFO : Mounting VHDX...
INFO : Initializing disk...
INFO : Creating EFI system partition...
INFO : Formatting system volume...
INFO : Setting system partition as ESP...
INFO : Creating MSR partition...
INFO : Creating windows partition...
INFO : Formatting windows volume...
INFO : Windows path (J:) has been assigned.
INFO : Windows path (J:) took 1 attempts to be assigned.
INFO : System volume location: I:
INFO : Applying image to VHDX. This could take a while...
INFO : Image was applied successfully.
INFO : Applying unattend file (autounattend.xml)...
INFO : Making image bootable...
INFO : Drive is bootable. Cleaning up...
ERROR : The term 'Add-VMGpuPartitionAdapterFiles' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name,
or if a path was included, verify that the path is correct and try again.
INFO : Log folder is C:\Users\BENJAM~1\AppData\Local\Temp\Convert-WindowsImage\2e937a88-3a92-48cf-a17a-ae2fadc3357c
INFO : Closing Windows image...
INFO : Closing ISO...
INFO : Done.
Failed to create VHDX, stopping script

bcdboot.exe-StandardOutput.txt
Convert-WindowsImageTranscript.txt
DismLogs.log
t

MMIO Region Above Supported Physical Address Range.

My VM will fail to start giving an MMIO error. A small bit of research suggests this could be an incompatibility with older CPU architectures, as I am running an I7-2600k (Sandy Bridge).
This issue thread ( [https://github.com/microsoft/wslg/issues/33] ) on WSL highlights that these older chips only support 36bit physical addresses.
I don't have much knowledge in this area but I hope its something that can be supported in future releases of Easy-GPU-P.
Capture
PC Details (If Important):
I7-2600k
24GB DDR3
GTX 1080
1TB SSD w/ 200GB free space
Win 10 21H1 x64

VM Preset:
SizeBytes = 40GB
MemoryAmount = 8GB
CPUCores = 2
GPUAllocation = 50
ISO = Win 10 21H1 x64

image conversion fails with Windows 10 21H2 Media

Fails to convert image when supplied with the 21H2 media which uses ESD format for install instead of install.wim

{{DriveLetter}}\Sources\Install.wim isn't present with 21H2,, it's instead in ESD format
{{DriveLetter}}\Sources\Install.esd

I tried to make a couple of adjustments to the script however a fair portion of the script works on the assumption it's working with install.wim so I was not able to easily adapt it.

Would it be possible to add support for install.esd, as well as potentially modularize some of the larger portions of the script such as the conversion logic?

As a workaround I was able to use Rufus to download Windows 21H1 from Microsoft Servers

SizeBytes Parameter is ignored, Virtual Disk is always 25GB

Virtual Disk is always 25GB in size, there appears to be logic in the script which overrides the parameter set in the beginning of the script.

I.E. I can specify
SizeBytes = 120gb

but the virtual disk will still be 25GB, leaving little free space for games, requiring manual resizing afterwards.

VHD Path

Hello can you take Hyper-V Manager's VHD Path instead of hardcoding it ?
Or at least maybe add it so we can see and modify it in CopyFilesToVM.ps1's parms
This could be more "user friendly" if we want to install the VM in a different drive

Thank you !

copy-item : There is not enough space on the disk.

How much space do I need.. I have 50 gigs on my C drive


INFO : Setting up Parsec to install at boot
ERROR : There is not enough space on the disk.

INFO : Log folder is C:\Users\alfre\AppData\Local\Temp\Convert-WindowsImage\34ef08de-218b-4971-a08d-76e38240d804
INFO : Closing Windows image...
INFO : Closing ISO...
INFO : Done.
Failed to create VHDX, stopping script

PS C:\Users\alfre\Downloads\Easy-GPU-P-main> C:\Users\alfre\Downloads\Easy-GPU-P-main\PreChecks.ps1
System Compatible
Printing a list of compatible GPUs...May take a second
Copy the name of the GPU you want to share...
NVIDIA GeForce RTX 3070
NVIDIA GeForce RTX 3070
Press Enter to Exit:

PS C:\Users\alfre\Downloads\Easy-GPU-P-main> C:\Users\alfre\Downloads\Easy-GPU-P-main\CopyFilesToVM.ps1

Windows(R) Image to Virtual Hard Disk Converter for Windows(R) 10
Copyright (C) Microsoft Corporation. All rights reserved.
Version 10.0.14278.1000.amd64fre.rs1_es_media.160201-1707

INFO : Opening ISO win11.iso...
INFO : Looking for E:\sources\install.wim...
INFO : Looking for the requested Windows image in the WIM file
INFO : Image 6 selected (Professional)...
INFO : Creating sparse disk...
INFO : Mounting VHDX...
INFO : Initializing disk...
INFO : Creating EFI system partition...
INFO : Formatting system volume...
INFO : Setting system partition as ESP...
INFO : Creating MSR partition...
INFO : Creating windows partition...
INFO : Formatting windows volume...
INFO : Windows path (J:) has been assigned.
INFO : Windows path (J:) took 1 attempts to be assigned.
INFO : System volume location: I:
INFO : Applying image to VHDX. This could take a while...
INFO : Image was applied successfully.
INFO : Applying unattend file (autounattend.xml)...
INFO : Making image bootable...
INFO : Drive is bootable. Cleaning up...
INFO : Finding and copying driver files for NVIDIA GeForce RTX 3070 to VM. This could take a while...
Copy-item : There is not enough space on the disk.
At C:\Users\alfre\Downloads\Easy-GPU-P-main\Add-VMGpuPartitionAdapterFiles.psm1:36 char:17

  • ... Copy-item -path "$ServiceDriverDir" -Destination "$Servic ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : WriteError: (nvui.dll:FileInfo) [Copy-Item], IOException
    • FullyQualifiedErrorId : CopyDirectoryInfoItemIOError,Microsoft.PowerShell.Commands.CopyItemCommand

Request: Support for Linux Hosts

As stated in title, can support be added for this to work with the 5.16 Linux Kernel?

Which also supports Hypervisors & Para-virtualization features, it can also passthrough, have nested virtualisation, run VMware, Virtualbox, QEMU+KVM, Xen, Rump vKernels, Run from Containers, Use Wine/Darwine, etc etc etc

Surely if people can run online games in Guest VM's then this would be possible to do on there: https://www.youtube.com/watch?v=Bc3LGVi5Sio right?

Specifying the GPU in a setup with more than one identical GPU

I'll post this here, tutorial and all, but also post a link to it on the level1techs thread.

The script by jamesstringerparsec currently only allows for specification of a particular GPU based on it's name alone. This is problematic when you have two of the same GPU, which results in the "PreChecks.ps1" script outputting an unhelpful result, such as this:
https://i.imgur.com/re9HdN9.png

One solution to this (and an extremely necessary step in the process of having more than one GPU connected to your system in my opinion) is to change the display names to be more descriptive. For example, my Device Manager now looks like this:
https://i.imgur.com/caU2T7d.png
With the script now outputting:
https://i.imgur.com/3VyVNBb.png

To achieve this I mostly followed this guide which didn't work, but on closer inspection I then discovered where exactly this script actually pulls the descriptor from.
For future reference, it might be best to parse for the registry key "FriendlyName" prior to checking the "DeviceDesc" (or "Device Name"), as this has to be added by the user manually and so will be the most correct point of reference.
Ideally, you can come up with a workaround using my suggestions or maybe some kind of prompt for the user to decide inside the script itself.

Now for the tutorial on how to give your GPU's unique names (which allows you to identify and select the correct one more easily in jamesstringerparsec's script)...

First, open up a notepad program and create a new empty file. This is mainly for taking down the driver registry keys which are long and complicated and keeping them paired with the unique name you will choose later.

Next, press the key combination "WIN+R" and type in
devmgmt.msc
followed by the ENTER key
https://i.imgur.com/qoNS7sm.png
This will open up the "Device Manager" window.

In the "Device Manager" window, find the "Display Adapter" heading and expand that category.
https://i.imgur.com/YCz4Ggc.png
Here, you will find two (or more) entries for your graphics cards.

At this stage, you need to verify which GPU is which. I think the most fool proof way would be to connect the display cables directly to the GPUs, either both simultaneously with two separate cables (as I did) or each in turn, while disabling one by one (remembering to enable one before disabling the other!).
This way you can tell for sure which GPU is which, because it will be the only one enabled and still outputting to the display.
https://i.imgur.com/kWHEvdo.png

As you do this and find the first GPU, before re-enabling the other one, you will need to right-click the currently enabled GPU, navigate to and select the "Properties" item in this context menu.
https://i.imgur.com/oolcMK5.png
In the "Properties" window that opens up, you must navigate to the "Details" tab.
https://i.imgur.com/Mjlmqgm.png
In the "Property" drop-down on this page, navigate to and select "Device Instance Path"
https://i.imgur.com/Tu4cuJC.png
which will display something along the lines of:
PCI\VEN_10DE&DEV_1B80&SUBSYS_61833842&REV_A1\4&C9C687&0&0009
https://i.imgur.com/QeQEppP.png
Right-click this entry, and select "Copy" from the context-menu, adding this to your notepad before entering a new line.

Next, decide the name of this GPU, for me I chose the exact model name of this GPU itself (EVGA GTX 1080 SC ACX 3.0), and add this on a new line in the notepad under the others. Enter two new lines to separate for the next GPU.

Repeat the same process, enabling the previously disabled GPU and disable the GPU you just successfully identified (remember to enable one before disabling the other, or you'll be in trouble!).
For me, the "Device Instance Path" on the next GPU was:
PCI\VEN_10DE&DEV_1B80&SUBSYS_145119DA&REV_A1\4&BAB4994&0&0008
Which is very similar but still different.
Choose a unique name for this GPU, for me again I chose the exact model of this GPU itself (ZOTAC GTX 1080 MINI), and add this on a new line in the notepad under the others.

You should have something like this in the end:
https://i.imgur.com/gxDypvt.png

Now, press the key combination "WIN+R" and type in
regedit
followed by the ENTER key, which will open up the "Registry Editor" window.
https://i.imgur.com/ucyZy6x.png
Once open go to the location bar at the top (CTRL+L) and paste this address:
Computer\HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\PCI\
https://i.imgur.com/d1BZ3dM.png

// TAKING PERMISSION OF REGISTRY KEYS (skip if you know how)

First, take control of this entire key by right-clicking the "PCI" key and selecting the "Permissions..." context-menu entry.
https://i.imgur.com/h4xzZ50.png
In the "Permissions" window that pops up, press the "Advanced" button.
https://i.imgur.com/56ND6DI.png
In the "Advanced Security Settings" window that opens up, at the top next to the "Owner" heading and entry, press the "Change" link.
https://i.imgur.com/A17JUe1.png
In the "Select User or Group" window that pops up, select the "Advanced" button.
https://i.imgur.com/aBV8apQ.png
In the newly expanded window, select the "Find Now" button.
https://i.imgur.com/MT7AUWl.png
Then find your current username in the list and select it, highlighting the entry.
https://i.imgur.com/TOYFXuQ.png
After this head up to the "OK" button and press to accept the new owner selection.
https://i.imgur.com/kV86Yfz.png
You will be returned to the "Advanced Security Settings" window, be sure to check both boxes here for
"Replace owner on subcontainers and objects"
https://i.imgur.com/krdWgTc.png
as well as "Replace all child object permissions with inheritable permission entries from this object"
https://i.imgur.com/u0bo4oK.png
Now, head to the "OK" button at the bottom and press to accept the change of ownership.
https://i.imgur.com/Kva10PV.png
The window will likely throw up various warnings or errors, none of these matter so long as you followed the steps correctly. When faced with the security warning:
https://i.imgur.com/mOg7GMU.png
Simply press the "Yes" button. As well as when you are notified about changes not being applied to some keys, simply press the "OK" button.
https://i.imgur.com/v6cqbNP.png
You will be returned the original "Permissions" window, where you will need to select your username from the list in the "Group or user names" box near the top.
https://i.imgur.com/cne52nx.png
Then in the "Permissions for [your username]" box below, you will need to select and tick "Full Control" (which will also select and tick "Read" for you).
https://i.imgur.com/hsVA7ts.png
Finally, press the "OK" button at the bottom of the window to accept all the changes.
https://i.imgur.com/AgF3jt0.png

// END

Back to your "Registry Editor" window.
Now you need to cross reference to your notes and find the correct key for your current device. So first I looked for:
VEN_10DE&DEV_1B80&SUBSYS_61833842&REV_A1\4&C9C687&0&0009
Then expand this key and select the "Driver Key" which should be the only child key and will look something along the lines of mine, which for me is:
4&c9c687&0&0009
Now, in the right hand panel where the registry entries themselves are, we must create a new "String Value"
https://i.imgur.com/DAfNqMa.png
For the name, enter:
FriendlyName
Double-click this new entry and in the "Edit String" window that pops up, under "Value Data" enter the name for this GPU that you have selected. I decided to use:
EVGA GTX 1080 SC ACX 3.0
https://i.imgur.com/j2wIx1C.png
Next, is the part relevant to the script in question. It seems to parse the entry "DeviceDesc" which for me looks something like:
@oem2.inf,%nvidia_dev.1b80%;NVIDIA GTX 1080
https://i.imgur.com/5oAFQcc.png
Double-click this entry and in the "Value Data" change the device descriptor at the end of this sentence to the name your chose and used for this same GPU earlier in the "FriendlyName" entry, so for me:
@oem2.inf,%nvidia_dev.1b80%;EVGA GTX 1080 SC ACX 3.0
https://i.imgur.com/BZBAvrJ.png

Repeat these steps for all of your other GPU's.
Once complete, go back to your Device Manager window, and from the "Action" global menu, navigate to and press the "Scan for hardware changes" menu option.
https://i.imgur.com/N4geqtt.png
Find the "Display Adapter" heading again and expand that category. Here, you will now find your two (or more) uniquely named entries for your graphics cards.

Now, when running the script you will have a much more descriptive and useful response:
https://i.imgur.com/3VyVNBb.png
Select one of these and proceed with the original script tutorial!

This does not work with Windows 10 Education

For those who don't know: Windows 10 Education builds on Windows 10 Enterprise and provides the enterprise-grade manageability and security desired by many schools.
As an educator I have access to Windows 10 Education version of Windows 10 and probably 11 but this script only works with Pro or Enterprise (what Education is based on). Any chance the script can be changed so I can run this and maybe showcase in class to my students?

Resolution locked at 1024x768

First off, thanks for the great work in putting the scripts together!

Now the issue,
I Partitioned a 6800xt, it works (remarkably had 4vms sharing it running the heaven benchmark, held just above 60 at 1080p cranked) and on first boot it starts with a resolution of 1080p, but subsequent boots are locked down to 1024x768

tried so far:

  • Set-VMVideo while the vm is off (didn’t work)

spec:
Host and guest os: windows 11
CPU: Ryzen 9 3950x
GPU: Radeon 6800xt

multiple GPUs ?

hi there ,

had multiple questions

1, will this work on multiple gpus ?

splitting 4 vms into 2 groups (2x2) and assigning a vm group (2 vms) into each gpu ? (2 vm 1 gpu x 2)

2, how does the friends/people will able to connect to the vm (with low latency)?
via RDP ? is there any other ways ?

Bypass script for Laptop GPU

When trying to run Precheck:

.\PreChecks.ps1
WARNING: Computer is a laptop. Laptop dedicated GPU's that are partitioned and assigned to VM may not work with Parsec.
WARNING: Thunderbolt 3 or 4 dock based GPU's may work

How do we bypass this check?
In the past I have managed to run Parsec on a VM on a machine with GVT-g, the machine is quite old HP EliteDesk 800 g2 mini and Parsec runs fast.

What I am trying now is for a Surface Book 2 laptop with GTX 1060

GPU-P and Windows 21H2 host and VM

You mentioned you wanted people to contact you about support on Windows 10 with Easy-GPU-P.

I'm having a number of issues, it seems generally virtualisation with 3d acceleration works ok (have so far only tested out 3d acceleration from a website called shadertoy.com, assuming it's using Chrome with DirectX) but OpenGL seems to be an issue - trying to run Blender 3.0 inside a VM, get this error -
image

Could this be because I'm not using a dummy dongle (Shadertoy seems to work without it), I don't have any spare HDMI sockets in my GPU (A single Nvidia 3080 ti), however because I'm dual-monitored, it appears to work without.

What I'm trying to get working is a setup where I can run Parsec client on the VM host computer with the GPU, to connect into a VM with Blender and Unity installed - that way I won't clutter up the host system with these programs.

I'm having terrible issues with the Parsec client running on the host computer with a VM configured with Easy-GPU-P - In certain circumstances, any video mode changes in host or client results in a weird issue whereby Parsec will not Quit when asked to from the tray icon, or even worse, it'll jam up the host display entirely if I kill it, or change anything - when this happens, for all intents and purposes it appears like the host computer has frozen, except it hasn't (music still plays, email notifications still chime), but the display is locked solid, not even Ctrl-Alt-Del does anything. Only a full reset will return to normality.

What's peculiar though, is that it appears that 3d acceleration works straight out of the VM Connect program it seems, which I didn't think is possible, is this a viable option instead of using Parsec to stream the content back to the client?

It would be good to know if Blender runs either on a Win11 VM on a win10 host, or both Win11 host and VM with this solution thru Parsec, if so I'll consider using that OS, or generally if stability is improved on that OS.

Haven't tried installing Unity yet, prob not a good idea at this stage.

Thanks

GPU issue

Everything seemingly worked while installing, I had no errors or anything but after install my graphics card is running Microsoft drivers according to Device Manager. I tried to fix this by reinstalling nvidia drivers on my host machine, rebooting, and then running the Update-VMGpuPartitionDriver.ps1 file. It ran fine with no errors but I still don't see the proper driver installed.

Specs:
Ryzen 7 3700X
32GB Ram
RTX 3060
Windows 11 Pro 21H2

VM:
4 Cores
8GB Ram
50% of AUTO (RTX 3060)
Windows 11 Pro 21H2

EDIT: After doing some looking into it, I think it might be because the VM does not have a "nv_dispi..." directory in C:\Windows\System32\DriverStore\FileRepository and the host does. But, I could be completely wrong I don't know this stuff lol.

The same but for Linux?

Hello
Is it possible to run an ubuntu vm in a windows host with a gpu attached to the vm? thanks

Couldn't find path

Hi,
I got the following error in PS:

INFO : Opening ISO Win11_English_x64.iso...
INFO : Looking for E:\sources\install.wim...
INFO : Looking for the requested Windows image in the WIM file
INFO : Image 6 selected (Professional)...
INFO : Creating sparse disk...
INFO : Mounting VHDX...
INFO : Initializing disk...
INFO : Creating EFI system partition...
INFO : Formatting system volume...
INFO : Setting system partition as ESP...
INFO : Creating MSR partition...
INFO : Creating windows partition...
INFO : Formatting windows volume...
INFO : Windows path (H:) has been assigned.
INFO : Windows path (H:) took 1 attempts to be assigned.
INFO : System volume location: F:
INFO : Applying image to VHDX. This could take a while...
INFO : Image was applied successfully.
INFO : Applying unattend file (autounattend.xml)...
INFO : Making image bootable...
INFO : Drive is bootable. Cleaning up...
INFO : Finding and copying driver files for AMD Radeon RX 5600 XT to VM. This could take a while...
INFO : Setting up Parsec to install at boot
INFO : Dismounting VHDX...
INFO : Closing Windows image...
INFO : Closing ISO...
INFO : Done.
New-VM : Nem sikerült új virtuális gépet létrehozni.
A(z) GPUP konfigurációjának életbe léptetése nem sikerült. (Virtuális gép azonosítója: FD3C3797-7F9E-438C-86FE-EDDBEA4AB9F6)
Nem sikerült a konfigurációs adattároló elérése: A rendszer nem találja a megadott elérési utat. (0x80070003).
At C:\Users\Olivér\Downloads\Easy-GPU-P-main (1)\Easy-GPU-P-main\CopyFilesToVM.ps1:4304 char:9

  •     New-VM -Name $VMName -MemoryStartupBytes $MemoryAmount -VHDPa ...
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (:) [New-VM], VirtualizationException
    • FullyQualifiedErrorId : ObjectNotFound,Microsoft.HyperV.PowerShell.Commands.NewVM
      .....

Just a quick translate:
Couldn't create VM. Couldn't reach the config storage. Couldn't find the path.

I tried it with different Win10 & 11 versions.

Virtualization-based security is required error

I am getting the following error:

The virtual machine can't start because virtualization-based security is not running on the host. Virtualization-based security is required for one of the VM's devices.

These are the settings I have set in Group Policy Editor
image

Driver version mismatch between host and guest

I've followed the the steps to install the VM with a success. The machine works and can connect to it via Parsec via Internet. The problem is that it cannot run any games on it. Tried 2 of them

  • Farming Simulator 22 - I can access main menu but when trying to start the game it CTDs and leaves this entry in Event Log
    event
  • Don't Starve Together - just doesn't start whatsoever. Doesn't leave error logs or anything

I've noticed that driver version in guest machine doesn't match the driver version in host machine.

Host (W10 21H2 Education)
host

Guest (W10 21H2 Pro N)
guest

I've used DDU to completely remove GPU drivers and did a fresh install (as of writing this current version is 22.1.1). After that used the Update-VMGpuPartitionDriver.ps1 to update the drivers on guest. Nothing changed. Is the driver mismatch an issue here?

Host specs:
CPU: AMD Ryzen 5 3600 (2c/4t allocated to VM)
GPU: AMD Radeon RX 5700 XT (50% resources allocated to VM)
RAM: 32GB 3200MHz (8GB allocated to VM)

Attaching mentioned Windows Event Log for those interested:
event.zip

EDIT:
Checked another game CS:GO - same results like with Farming Simulator 22. Can enter main menu, crashes when trying to go into game. No event produced.

GPU-P on nested Virtualization with Linux/KVM Guest and nested Mac OS Guest

This is more of a question than an issue (also maybe a suggestion too)

I believe Parsec works with Mac OS as host (a certain version?) however this GPU-P solution works with Hyper-V and natively Hyper-V does not support running Mac OS image. Would this solution work with nested virtualization. Running Arch Linux on Hyper-V with GPU and then KVM with that then from there install Mac OS. [for education purposes]

Got issue with running the script

Hi, I got an issue with converting Iso as it says it cannot convert because the path is null.
image
and this is what the log says :
image
The path given is direct to the Iso file.

Games do not start in VM

Hey,

i have set up the VM as described in the guide without any problems.
After installing 3 games all of them do not start or show any error message.
Starting the games result in a few seconds of windows showing the cursor loading cirlce and then nothing happens.

Games:

The Division - Ubisoft Connnect
Anno 1701 History Edition - Ubisoft Connect
Stronghold Warlords - GOG Galaxy (No DRM)

My Hardware:

Windows 11 Pro
RYZEN 5900X
32GB DDR4 3600
RTX 3080 10GB
WD 850 M.2 SSD 2TB

VM Parameters:
Windows 11
8 Cores
8192MB Memory
200GB Storage
25% GPU Allocation

Is there something i can check or try out to find out whats going on?

Issue with phantom and duplicate GPU Devices in Device Manager

Had someone encounter an issue where the scripts were failing to inject the drivers and subsequently failing to create the VMDK due to an issue where there was a phantom, inactive device entry in device manager from the GPU having previously been in a different slot.

This was causing issues for Line 66 and 75 as the return was looking something like this

NVIDIA GeForce RTX 2080 SUPERNVIDIA GeForce RTX 2080 SUPER
I found that adding an additional condition that the adapter's status is "OK" Helped filter these phantom adapters, although it wouldn't work in cases where there were legitimately two cards with an identical name in device manager, in which case they probably use the same driver so may as well just force only one return

$service = Get-PnpDevice | Where-Object {$_.Name -eq "$GPUName" -and $_.Status -eq "OK"} | Select-Object Service -ExpandProperty Service | Select-Object -First 1

$GPUName = Get-PnpDevice | Where-Object {$_.DeviceID -like "*$($DevicePathName.Substring(8,16))*"}  |Where-Object {$_.Status -eq "OK"} |  Select-Object FriendlyName -ExpandProperty FriendlyName |select-object -first 1

Bootable ISO improperly detected as non bootable

Using image Win10_1809Oct_English_x64.iso, the file is bootable. The check in the script was thinking it wasn't causing the script to crash. I just removed the entire else clause to skip this and it worked.
I think the problem lies with the systemDrive parameter. It is setting it as a drive letter that doesn't exist. I am not sure what systemDrive is supposed to represent.

Error While Formatting.

$params = @{
VMName = "GPUP"
SourcePath = "D:\Downloads\Win11_EnglishInternational_x64v1.iso"
Edition = 6
VhdFormat = "VHDX"
DiskLayout = "UEFI"
SizeBytes = 40GB
MemoryAmount = 4GB
CPUCores = 4
NetworkSwitch = "Default Switch"
UnattendPath = "$PSScriptRoot"+"\autounattend.xml"
GPUName = "AUTO"
GPUResourceAllocationPercentage = 50
Team_ID = ""
Key = ""
Username = "GPUVM"
Password = "CoolestPassword!"
Autologon = "true"
}

Log file
Convert-WindowsImageTranscript.txt

Reporting success for Win10 Education 21H2 as host and Win 11 Pro 21H2 as Guest, but there are issues

Hi!

After adjusting the script as said here #35 I was able to create and boot Win 11 Pro 21H2 as Guest under Win10 Education 21H2 as host.

Host has Ryzen 7 3800X (8C16T) / 32GB / RTX3060, guest has 4 cores / 8 GB / 50% of GPU.

However, there are still relatively major issues with the guest VM:

  1. Games that do require OpenGL seem to be not working, e.g., Minecraft. However, games that use DirectX seem to work, as I was able to run Portal 2 at ~200fps at passed in VM 50% of my RTX 3060.
  2. After power-cycling the VM, the resolution defaults to 1024x768 and I am unable to change it neither in Parsec settings, nor in Windows control panel. The only thing that helps is to log in to the VM from the Hyper-V host via Enhanced session mode and setting the resolution to 1080p there, and then after reconnecting Parsec can stream at 1080p60fps. After logging out from the VM on the hypervisor, the resolution drops back to 1024x768 and Parsec starts streaming this resolution.
  3. On VM there is no GPU in Task Manager, thus, I am unable to see if the GPU is actually utilized. However, GPU is present in Device Manager.

Also, another off-topic issue - on my NAS running Pentium Silver J5005 / UHD Graphics 605 hardware decoding is extremely slow, and software H264 decoding kinda works, but as long as there is enough keyboard input it becomes slow again and playing game becomes painful, though for basic tasks e.g. YouTube playback the decoder is good enough. On both of my laptops with Iris Plus Graphics and HD Graphics 4600 as dGPUs the hardware decoding worked flawlessly. All three client machines were running Ubuntu 20.04.

Time Zone and Regional Defaults

Time Zone and region settings applied to the unattend xml setup files are currently hard coded for Australia region and time zone settings. This can be pretty easily changed afterwards but would be nice if the script could dynamically grab those settings from the host machine and then replace those in the .xml with the obtained values.

Items that would be ideal to have dynamically updated are
SystemLocale,
UILanguage,
UILanguageFallback,
UserLocale,
TimeZone,

Black screen on VM after host reboot.

Hi, I tried this yesterday and it was working fine.
Today, after starting again the host (which is my Desktop PC), the Hyper-V connection is ok, but through parsec I got a black screen.
I got remote fine with parsec from a laptop, to the host, but I can't remote into the VM through parsec.

With hyper-v I can see the VM screen without any issue, and I can see that I can move the mouse with the parsec remote.
Decode/Encode also show :"N/A"

The issue doesn't go away with a reboot of the VM, but go away with a reboot of the host.

Import Modules not importing correctly

Hello I am receiving these errors after running the "CopyFilesToVM.ps1" Here is the error(s) I am getting:
https://pastebin.com/76yXH1D7
What I have done to troubleshoot is created an Environment Variable under PSModulePath I added a direct path to the Easy-GPU-P-main folder to see if that would fix my issue.
I verified Hyper-V is installed and active on bios and windows
My OS is Windows 10 Pro, version 21H2
Thanks for any assistance

The Host Encoder failed to initialize (AMD RX580)

Tested with windows 10 21H2 all went well except connecting with parsec

Im getting this error on parsec error 15000 The Host Encoder Failed to Initialize.
im pretty sure all my hardware is compatible, running Set-VMPartitionableGpu gives me no output

MB: Asus z97m PLUS
CPU: i5 4440
GPU: AMD RX 580

GPU-PV does not support sharing of a part of a GPU

GPU-PV (paravirtualization) always shares full GPU with a VM. Sharing of percentage of a GPU is not supported.
Therefore, the following parameter is misleading and it is ignored by the OS.
"GPUResourceAllocationPercentage = 50 - Percentage of the GPU you want to share with the VM"

Sharing of percentage of a GPU is supported by GPU-P (partitioning). Resource sharing parameters are used only in case of GPU-P. GPU-P is supported only on specific motherboards and GPU hardware.

A GPU-PV adapter is recognized by having GPUPARAV in the device instance name: GPU-P adapter will not have this substring,
PS C:\WINDOWS\system32> Get-VMPartitionableGpu
Name : \?\PCI#VEN_10DE&DEV_1CB3&SUBSYS_11BE103C&REV_A1#4&1f221e6c&0&0000#{064092b3-625e-43bf-9eb5-dc845897dd59}*GPUPARAV*

hi, i got this error

Convert-WindowsImage : Cannot validate argument on parameter 'SourcePath'. Cannot bind argument to parameter 'Path' because it is null.
At D:\VM\Hyper-V\Easy-GPU-P-main\CopyFilesToVM.ps1:4275 char:38

  • Convert-WindowsImage -SourcePath $SourcePath -Edition $Edition -V ...
    
  •                                  ~~~~~~~~~~~
    
    • CategoryInfo : InvalidData: (:) [Convert-WindowsImage], ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationError,Convert-WindowsImage

Hyper-V screen is black

After windows boots, the hyper-V window is black. This is with Windows 10 21H2. I have a 2060 Super and 3700X
Capture

VM created doesn't work

Using Windows 10 Enterprise 20H2 and installing Win11_English_x64v1, the HyperV vm errors and won't startup. Says possible bad configuration. If I boot from install disk I see the expected 4 partitions and Windows files are detected, but it of course wants me to reinstall windows. My guess would be this powershell script doesn't work when run from different versions of Windows.

Radeon RX Series

Trying to install drivers on an RX 550 results in Error Code 31 after installing drivers.

Windows 20H2 and NVIDIA Quadro T2000 Success

Thanks for putting this together! It's worked well for me so far. Sharing my system details so you can have more data. Let me know if I can provide any other useful info.

System Details
Laptop: Lenovo P17 Gen 1
GPUs: NVIDIA Quadro T2000 and Intel(R) UHD Graphics
Host OS: Windows 10 Pro Version 20H2 Build 19042.1415
VM ISO: Windows 10 Enterprise Evaluation

I left the GPUname param as AUTO per the instructions. I noticed the pre reqs mention laptops with NVIDIA cards not being supported so I assumed the integrated graphics would be passed through. But when looking at task manager it definitely looks like the NVIDIA card is being used. Is that expected with Quadro cards?

Error: The parameter is incorrect.

INFO : Looking for the requested Windows image in the WIM file
ERROR : The parameter is incorrect.
log just says that it does not specify which param is incorrect
params:

$params = @{
    VMName = "GPUP"
    SourcePath = "C:\Win11_EnglishInternational_x64.iso"
    Edition    = 6
    VhdFormat  = "VHDX"
    DiskLayout = "UEFI"
    SizeBytes  = 70GB
    MemoryAmount = 4GB
    CPUCores = 4
    NetworkSwitch = "Default Switch"
    UnattendPath = "$PSScriptRoot"+"\autounattend.xml"
    GPUName = "AUTO"
    GPUResourceAllocationPercentage = 50
    Team_ID = "0"
    Key = "0"
    Username = "GPUVM"
    Password = "CoolestPassword!"
    Autologon = "true"
}

I want to change where the VHD gets installed by the script.

The script doesn't appear to have and option to change where the VHD file gets put in terms of its directory and I have an SSD I want to put the VHD in but by default it installs it in my Public Documents folder. Is there a way to change where it gets installed? And if not, is it possible that this feature will be added in the future?

AMD Ryzen: VM will not start if -ExposeVirtualizationExtensions=True

The Hyper-V VM will fail to power on on AMD Ryzen Systems if the following line is processed.
Set-VMProcessor -VMName $VMName -ExposeVirtualizationExtensions $true

The result is that the VM will fail to power on, starting an error that the platform does not support nested virtualization.

This was encountered on an AMD Ryzen 1700X running 21H2

Google searches suggest this might be resolved in an eventual Windows 10 build update, as support is partially available if the host is running the most current insider preview and the VM is provisioned using version 9.3 configuration.

Can the line Set-VMProcessor -VMName $VMName -ExposeVirtualizationExtensions $true be commented out or be made conditional depending upon current Nested virtualization support?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.