Easy-GPU-PV
                                
                                
                                
                                    Easy-GPU-PV copied to clipboard
                            
                            
                            
                        Can i change the GPU allocation without deleting everything?
So, i already have a GPUVM set up with windows 10, but i set the allocation to 45 and i want to change it to something higher without losing data because i spend a lot of time setting it up. If it helps i own an: AMD Radeon Vega 8 Graphics.
I am also curious about changing the value of GPUResourceAllocationPercentage after the VM has been created.
There's no solution in the script right now, but take a look at the Assign-VMGPUPartitionAdapter function in CopyFilesToVM.ps1
I managed to do this from the Hyper-V Settings: File > Settings > SCSI Controller > Hard Drive > Edit > Choose Action (on the menu on the left > Expand After selecting the new size, restart the machine, and search for Create and format hard disk partitions on the windows menu. You should see there is some unallocated space on the drive. Right Click your C: Partition and click Expand. Some Next buttons later you should have your drive expanded.
@ArmandoRl1 The question is about the GPU partition allocation, not the drive space
I have put an pull request regarding to change the GPU resource allocation.
@Sm0rezDev I used your script to adjust GPU allocation on two VMs. Thank you! It seems to have worked perfectly - only suggestion I have is to add a warning that virtual machines will be restarted, perhaps with an option like --force to allow unattended usage.
@moligny trying to run the script I got these errors regarding this section (running on PowerShell ISE)
Param ( [string]$VMName = "GPUPV", [int]$GPUResourceAllocationPercentage = Precentage(33) )
"Missing expression after '='. "
"Unexpected token ")" in expression or statement"
How do you run it successfully.
Seems to work using
[string]$VMName = "GPUPV"
[int]$GPUResourceAllocationPercentage = 33
                                    
                                    
                                    
                                
Highly relevant feature from @Sm0rezDev, any chance to get it merged @Kodikuu @jamesstringerparsec @CollinCodez?
https://github.com/jamesstringerparsec/Easy-GPU-PV/pull/117
Hello! thanks for the notice, didn't see that I added a comment inline with the param variable. Should be fixed by now. Changes were made in the PowerShell code comment section, left the uncommented Param section variable blank as it's used to get input from the Terminal. Den tors 3 nov. 2022 kl 08:16 skrev MeranaTona @.***>:
Highly relevant feature from @Sm0rezDev https://github.com/Sm0rezDev, any chance to get it merged @Kodikuu https://github.com/Kodikuu @jamesstringerparsec https://github.com/jamesstringerparsec @CollinCodez https://github.com/CollinCodez?
— Reply to this email directly, view it on GitHub https://github.com/jamesstringerparsec/Easy-GPU-PV/issues/99#issuecomment-1301722407, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALBHJP7WQDARXWY4OUOGYG3WGNRDHANCNFSM5MRKPP2A . You are receiving this because you were mentioned.Message ID: @.***>
So, i already have a GPUVM set up with windows 10, but i set the allocation to 45 and i want to change it to something higher without losing data because i spend a lot of time setting it up. If it helps i own an: AMD Radeon Vega 8 Graphics.
you can set the parameters as you wish whenever the vm is shutdown, you won't lose any data. i use this extreme profile in a ps1 script which i usually run whenever i re-add the gpu-p (eg. after nvidia drivers update).
REF: https://forum.level1techs.com/t/2-gamers-1-gpu-with-hyper-v-gpu-p-gpu-partitioning-finally-made-possible-with-hyperv/172234/187 https://github.com/jamesstringerparsec/Easy-GPU-PV/issues/280
PS1 script below:
$VMName = "Windows11" Set-VMGpuPartitionAdapter -VMName $VMName -MinPartitionVRAM 1000000000 -MaxPartitionVRAM 1000000000 -OptimalPartitionVRAM 1000000000 -MinPartitionEncode 18446744073709551615 -MaxPartitionEncode 18446744073709551615 -OptimalPartitionEncode 18446744073709551615 -MinPartitionDecode 1000000000 -MaxPartitionDecode 1000000000 -OptimalPartitionDecode 1000000000 -MinPartitionCompute 1000000000 -MaxPartitionCompute 1000000000 -OptimalPartitionCompute 1000000000
Note that "GPUResourceAllocationPercentage" is just a variable set on the copy script to determine a devider. It is not actually recognizable by powershell cmdlets