Why gaming on a virtual machine?
Gaming on a virtual machine (VM) can be an option for several reasons:
I will briefly go over the steps to set up a Windows 10 VM.
The GPU can be shared with the host and the VM, alternatively, you can try to enable GPU passthrough, but it is not covered in this guide.
My Machine has 2 GPUs, one is the integrated AMD GPU and the other is a dedicated NVIDIA GPU. I will need to disable the integrated GPU in the Device Manager and assign the NVIDIA GPU to the VM.
F: drive.HostDriverStore in F:\Windows\System32\ (This is the mounted drive).C:/Windows/System32/DriverStore/FileRepository to F:\Windows\System32\HostDriverStore.nv in C:\Windows\System32\ to F:\Windows\System32\.Next we will need to paritition and assign the GPU to the VM.
vm variable to the name of your VM in the script below.$vm = "Game"
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
Last step before we start the machine is to disable the Checkpoint feature in Hyper-V.
Settings and disable Checkpoints.We need a virtual audio device for sunshine to steam audio. You can use the Virtual Audio Device from the VB-Cable project or the Virtual Audio Cable project.
VB-Cable or Virtual Audio Cable and Install it.Sound settings)If you want to access the VM from another device in local network, you can do port forwarding (not covered here) or simply add an external network adapter to the VM.
Virtual Switch Manager and create a new External network switch.Last step is to install sunshine on the VM and you should be able to connect to it.