Easy-GPU-PV/README.md

61 lines
4.5 KiB
Markdown
Raw Normal View History

2021-06-22 22:22:22 +00:00
# Easy-GPU-P
2021-11-14 17:24:32 +00:00
A Project dedicated to making GPU Partitioning on Windows Hyper-V easier! Also known as GPU Paravirtualization (GPU-PV).
2021-11-14 19:53:47 +00:00
GPU-P allows you to partition your systems dedicated or integrated GPU and assign it to several Hyper-V VMs. It's the same technology that is used in WSL2, and Windows Sandbox.
2021-11-13 21:53:26 +00:00
Easy-GPU-P aims to make this easier by automating the steps required to get a GPU-P VM up and running.
2021-11-14 17:24:32 +00:00
Easy-GPU-P does the following...
2021-11-13 21:53:26 +00:00
1) Creates a VM of your choosing
2021-11-14 19:54:22 +00:00
2) Automatically Installs Windows 11 to the VM
2021-11-13 21:53:26 +00:00
3) Partitions your GPU of choice and copies the required driver files to the VM
4) Installs Parsec to the VM
2021-06-22 22:38:54 +00:00
2021-10-19 06:07:22 +00:00
WARNING: A work in progress...
2021-06-22 22:42:01 +00:00
2021-11-14 20:54:16 +00:00
### Prerequisites:
2021-10-19 06:07:22 +00:00
* Windows 11 Pro or Enterprise
2021-11-13 21:25:19 +00:00
* Desktop Computer with dedicated NVIDIA/AMD GPU or Integrated Intel GPU - Laptops with NVIDIA GPUs are not supported at this time, but Intel integrated GPUs work on laptops. GPU must support hardware video encoding (NVIDIA NVENC, Intel Quicksync or AMD AMF).
2021-10-19 06:07:22 +00:00
* Latest GPU driver from Intel.com or NVIDIA.com, don't rely on Device manager or Windows update.
2021-10-19 06:08:53 +00:00
* Windows 11 ISO [downloaded from here](https://www.microsoft.com/en-us/software-download/windows11)
2021-10-19 06:07:22 +00:00
* Virtualisation enabled in the motherboard and Hyper-V fully enabled on the Windows 11 OS (requires reboot)
* Allow Powershell scripts to run on your system - typically by running "Set-ExecutionPolicy unrestricted" in Powershell
2021-06-22 22:38:54 +00:00
2021-11-14 17:24:32 +00:00
### Instructions
2021-10-19 06:07:22 +00:00
1. Make sure your system meets the prerequisits.
2021-10-19 06:10:09 +00:00
2. [Download the Repo and extract.](https://github.com/jamesstringerparsec/Easy-GPU-P/archive/refs/heads/main.zip)
2021-10-19 06:07:22 +00:00
3. Search your system for Powershell ISE and run as Administrator.
2021-11-16 14:49:05 +00:00
4. In the extracted folder you downloaded, open PreChecks.ps1 in Powershell ISE (It must be Powershell ISE or Powershell 5.X)
2021-10-19 06:10:09 +00:00
5. Open and Run PreChecks.ps1 in Powershell ISE using the green play button and copy the GPU Listed (or the warnings that you need to fix).
2021-10-22 14:19:12 +00:00
6. Open CopyFilesToVM.ps1 and edit the params section at the top of the file, you need to be careful about how much ram, storage and hard drive you give it as you system needs to have that available. You also need to write the GPU name exactly how it appears in PreChecks.ps1. Additionally, you need to provide the path to the Windows 11 ISO file you downloaded.
2021-10-19 06:07:22 +00:00
7. Run CopyFilesToVM.ps1 with your changes to the params section - this may take 5-10 minutes.
2021-11-14 21:08:44 +00:00
8. View the VM in Hyper-V, once it gets to the Windows Desktop you will need to approve the certificate install request for Parsec and Virtual Audio Cable
2021-10-19 06:07:22 +00:00
9. Sign into Parsec on the VM.
2021-11-14 21:08:44 +00:00
10. You should be good to go!
2021-11-08 16:47:26 +00:00
### Values
```VMName = "GPUP"``` - Name of VM in Hyper-V and the computername / hostname
```SourcePath = "C:\Users\james\Downloads\Win11_English_x64.iso"``` - path to Windows 11 ISO on your host
```Edition = 6``` - Leave as 6, this means Windows 11 Pro
```VhdFormat = "VHDX"``` - Leave this value alone
```DiskLayout = "UEFI"``` - Leave this value alone
```SizeBytes = 40gb``` - Disk size, in this case 40GB
```MemoryAmount = 8GB``` - Memory size, in this case 8GB
```CPUCores = 4``` - CPU Cores you want to give VM, in this case 4
```UnattendPath = "$PSScriptRoot"+"\autounattend.xml"``` -Leave this value alone
```GPUName = "NVIDIA Geforce RTX 2060 SUPER"``` - The exact name of the GPU you want to share with the VM
```GPUResourceAllocationPercentage = 50``` - Percentage of the GPU you want to share with the VM
```Team_ID = ""``` - The Parsec for Teams ID if you are a Parsec for Teams Subscriber
```Key = ""``` - The Parsec for Teams Secret Key if you are a Parsec for Teams Subscriber
```Username = "GPUVM"``` - The VM Windows Username, do not include special characters
2021-11-17 12:59:04 +00:00
```Password = "CoolestPassword!"``` - The VM Windows Password
```Autologon = "true"```- If you want the VM to automatically login to the Windows Desktop
2021-11-08 16:47:26 +00:00
2021-11-14 17:24:32 +00:00
Thanks to [Hyper-ConvertImage](https://github.com/tabs-not-spaces/Hyper-ConvertImage) for creating an updated version of [Convert-WindowsImage](https://github.com/MicrosoftDocs/Virtualization-Documentation/tree/master/hyperv-tools/Convert-WindowsImage) that is compatible with Windows 10 and 11.
2021-11-13 21:22:19 +00:00
2021-11-14 17:24:32 +00:00
### Notes:
2021-11-17 22:06:45 +00:00
This script will fail in newer versions of Powershell due to the add-type function call, but it will work correctly in Powershell ISE running as Administrator.
2021-11-17 22:28:07 +00:00
A display or HDMI dummy dongle must be plugged into the GPU to allow Parsec to capture the screen.
The screen may go black for times up to 10 seconds in sitautions when UAC prompts appear - not really sure why this happens, it's unique to GPU-P machines.