home server windows 10 vm

DIY HOME SERVER 2021 – Software – Windows 10 PCI Passthrough

1. DIY HOME SERVER - Windows 10 - Prepare the host

Before you can start creating a Windows 10 virtual machine and passthrough a graphics card, you have to make sure the host is configured properly. This is a 2 step process :

  1. The first requirement is a properly configured home server BIOS. Consult the BIOS Configuration section in this previous post and adjust your own BIOS accordingly.

  2. The second requirement is to configure Proxmox. Follow the Proxmox Wiki on PCI Pass-through to configure your Proxmox host OS.

2. DIY HOME SERVER - Windows 10 - Prepare the VM

To create a Windows 10 VM, we need two ISO images :

  1. Microsoft Windows 10 Professional

    Download the Microsoft Media Creation Tool and create an ISO image for installing Windows 10. Upload the created ISO image to your Proxmox local ISO Images folder.

  2. Microsoft VirtIO Drivers

    Download the latest stable Microsoft VirtIO Drivers ISO file and upload it to your Proxmox local ISO Images folder.

Be sure to use Microsoft Windows 10 Professional. After passing through the GPU, you will no longer be able to use your Proxmox console to access the VM. Instead you’ll have to use Remote Desktop to connect to the VM. Remote Desktop is only avalable in the Professional version of Windows 10.

Click the Create VM button to create a new VM.

On the General tab, specify the name an set the password for the root user.

Click Next.

On the OS tab, select the uploaded Windows 10 Pro ISO file.

Set the Guest OS Type to Mcrosoft Windows and the Version to 10/2016/2016.

Click Next.

On the System tab :

  • enable the Qemu Agent
  • set BIOS to OVMF(UEFI)
  • add the EFI disk to your Storage
  • set Machine to q35

Click Next.

Be aware that setting your BIOS to OVMF(UEFI) will only work correctly if your home server system BIOS is properly configured to use UEFI.

On the Hard Disk tab :

  • use the SCSI Bus
  • set a 80 GB Disk on your local Storage
  • Enable de SSD emulation option
  • Use No Cache

Click Next.

On the CPU tab :

  • set the number of Cores
  • set Type to host
  • select pcid +

Click Next.

On the Memory tab, set at least 8 GB.

Click Next.

On the Network tab, select the main network interface and set the Model to VirtIO (paravirtualized).

Click Next.

On the Confirm tab, check the results.

Click Finish.

The VM will now be created.

Select the newly created VM and click Hardware → Add → CD/DVD Drive.

Use the SATA bus and attach the Microsoft VirtIO Driver ISO file.

Click the Create button.

If available, click Hardware → Add → Network Device to add additional network interfaces..

Click the Add button.

Do not add your GPU yet!
We will add it later.

Your VM is now ready to install Windows 10 Pro.

3. DIY HOME SERVER - Windows 10 - Installation

Start the VM.

Follow the normal Windows 10 installation path.

Select Custom.

We need to install 4 additional drivers.

Click Load driver.

Go to the CD drive containing the VirtIO drivers.

Click Browse.

Select the folder \vioserial\w10\amd64\ and click the OK button.

Then click Next.

Do the same for the other 3 drivers, located in :

  • \NetKVM\w10\amd64\
  • \Balloon\w10\amd64\
  • \amd64\

Click Next.

Windows 10 will continue installing.

Follow the normal Windows 10 installation path until you reach the Windows 10 Pro desktop.

4. DIY HOME SERVER - Windows 10 - Configuration

Richt-click The windows logo an select Device Manager. Check if all devices are recognized and installed properly.

Open the Explorer. Go to the VirtIO Driver CD and copy the folder guest agent to your Download folder. Open that folder and start qemu-ga-x86_64.exe to install the Qemu Client.

Open the Explorer. Go to the VirtIO Driver CD and install the virtio-win-guest-tools.exe.

This will make sure the Windows 10 Pro guest OS memory usage is reported back correctly to the Proxmox host OS.

Using the Windows Search Bar, search for Remote desktop settings and enable the Remote Desktop service.

Without enabling the remote desktop service, you’ll not be able to access the Windows 10 Pro guest OS once we set our NVIDIA GPU as primary GPU. So be sure to activate it and test it before continuing!

To make the remote access easier the next time you start the VM, you might want to assign your primary NIC a fixed IP address. 

Then go to All settings → Update and Security → Windows Update and check for updates. Reboot the system when required. Repeat this until all updates are installed.

When done, shut down the Windows 10 VM.

5. DIY HOME SERVER - Windows 10 - Add GPU

Select the VM and click Hardware → Add → PCI Device.

Select the first occurence of the NVIDIA GPU.

Enable :

  • All Functions
  • ROM-Bar
  • PCI-Express

Do not enable Primary GPU yet, we will enable it later.

Click the Add button.

Start the VM again and log in.

Wait for Windows to find the newly installed GPU and install the NVIDIA drivers.

When done, right-click the Windows logo again and select Device Manager. Check if the GPU is installed properly, both the video and the audio part.

Notice the presents of the NVIDIA Control Panel.

In Control Panel → Programms and features you’ll find the installed NVIDIA software.

When done, shut down the Windows VM again.

Be aware your GPU can only be used in one active VM at a time. So shutdown all other VMs using the GPU before starting another one.

If your VM will not start properly, start the VM from the PVE → Shell by using the command qqm start <vim-number> and check the returned error message.

6. DIY HOME SERVER - Windows 10 - Enable GPU

Select the VM and click Hardware.

Now double-click the PCI Device (hostpci0) and activate the Primary GPU option. Click OK to close the dialog.

Congratulations. You reached the finish.

Restart the VM. Access the Windows 10 Pro machine by using Remote Desktop.

Be aware your GPU can only be used in one active VM at a time. So shutdown all other VMs using the GPU before starting another one.

If your VM will not start properly, start the VM from the PVE → Shell by using the command qqm start <vim-number> and check the returned error message.

In the next episode, we’ll install Blue Iris as a surveillance station to manage our IP cameras.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.