Running Kraken on Hyper v - RSKrakenCommunity/CommunityAPI GitHub Wiki

Alt Text Alt Text

### Requirements

Make sure to update your graphics driver and windows before starting this guide. You will need windows 10 pro or higher. It will not work on home edition.

Check if your GPU is capable of being split.

Open PowerShell with administrator privileges. This can be done by searching for it in the start menu.

Creating a session

Type into PowerShell

Get-VMHostPartitionableGpu

This will tell you if your GPU can be virtualized.

Creating a session

How to Install Hyper-V

Go to Turn Windows features on or off. It can be found by searching for it in the start bar.

Creating a session

Scroll down until you see Hyper-V. Once you find it check the box. It will install Hyper-V. Once finished, reboot your computer.

Creating a session

Setting up Hyper-V

Once you have Hyper-V installed, open the Hyper-V manager by searching for it in the start menu.

Creating a session

Once you have Hyper-V Manager open, there will be a few things we need to change first before creating our first VM.

Creating a session

We need to create a network switch. To do this right, click on your desktop name[1] and choose the option "Virtual Switch Manager"[2]

Creating a session

Click on New virtual network switch[1]. Chose external on the right-hand side[2]. Then click create virtual switch[3].

Creating a session

Name the switch External[1], make sure the external network is checked[2], Select your network adapter in the drop-down box[3]. Then check to allow management operating system to share this network adapter[4]. press apply. a window should pop up; hit yes.

Creating a session

Click on your computer name and go to hyper-v settings.

Creating a session

Go to enhanced session mode and uncheck the box. We want to disable this.

Creating Hyper-V VM

Click on your computer name and go to new then Virtual machine.

Creating a session

This will open up a machine wizard. Go ahead and hit next. Name your virtual machine and hit next. Select Generation 2 and hit next. Select how much ram you wish to give this VM and turn off dynamic memory, and hit next. Select the network bridge you created. We named it external and hit next. Select the amount of hard drive space you wish to give warning, make sure to use about 50gigs, and hit next. This is where you will select the ISO for windows. To generate an iso using the link below. It will give you two options: installing windows and creating an ISO. Chose the second

https://go.microsoft.com/fwlink/?LinkId=691209

Once you have the iso selected, hit next, then fish. You have created your first VM.

Right-click on the newly created VM and go to settings.

image

Go to the processor and give it more power, depending on your CPU.

image


Setting up GPU-Passthrough

Requirements

Have windows installed and updated on VM. Have driver folder from system 32 and Nvidia files.

First, we want to go to your main computer, not your VM. Open up file explore and go to system 32. C:\Windows\System32

Next, we will be looking for a folder called DriverStore. Open it, then open FileRepository. C:\Windows\System32\DriverStore\FileRepository Type "NV quickly" to find folders that start with NV. We will be looking for a folder that should be named "nv_dispi.inf_amd64_c0e159863e7afdde" depending on your GPU and driver, the numbers will be different. The impotent part is nv_dispi. Copy this folder to your desktop.

Create a folder called System32 on your desktop.

Go back to system 32. C:\Windows\System32 and type "NV" again until you reach the files that start with NV. Copy all these files into the system 32 folders on your desktop that you created.

image

Transfer these files over to your VM desktop, then place them in the exact location you found them. If the folder is not there, create it. nv_dispi.inf_amd64_c0e159863e7afdde folder goes into C:\Windows\System32\DriverStore\FileRepository NV files that you copied go into C:\Windows\System32.

Shut down your VM. It must be a shutdown, not a reboot.

Next, we will open Windows PowerShell ISE as administrator on the host computer.

image

Next, paste the following code into PowerShell. This will allow you to run the following script to give the VM control over your GPU. When asked, click yes to all.

set-executionpolicy unrestricted

Edit the $vm = "GPUP-01" to the name you set for your VM. Then copy this into PowerShell and run it.

$vm = "GPUP-01"

Add-VMGpuPartitionAdapter -VMName $vm
Set-VMGpuPartitionAdapter -VMName $vm -MinPartitionVRAM 80000000 -MaxPartitionVRAM 100000000 -OptimalPartitionVRAM 100000000 -MinPartitionEncode 80000000 -MaxPartitionEncode 100000000 -OptimalPartitionEncode 100000000 -MinPartitionDecode 80000000 -MaxPartitionDecode 100000000 -OptimalPartitionDecode 100000000 -MinPartitionCompute 80000000 -MaxPartitionCompute 100000000 -OptimalPartitionCompute 100000000

Set-VM -GuestControlledCacheTypes $true -VMName $vm
Set-VM -LowMemoryMappedIoSpace 1Gb -VMName $vm
Set-VM –HighMemoryMappedIoSpace 32GB –VMName $vm

You now can bot using Hyper-V. Start your VM back up and proceed to the bot.

(back to top)

⚠️ **GitHub.com Fallback** ⚠️