Creating a Windows 10 VM on the AMD Ryzen 9 3900X using Qemu 4.0 and VGA Passthrough

Last updated: April 4, 2020

Introduction

Before you read on, I encourage you to watch this video. Let’s put it this way: what you are embarking on is easier.

I’ve already written a detailed tutorial on VGA passthrough based on QEMU 2.11. Time has passed and more modern distributions like Ubuntu 19.10 or Pop!_OS come with QEMU 4.0.

A lot has happened since version 2.11. QEMU 4.0 includes numerous changes and improvements such as trim support in the virtio-blk driver, pcie-root-port with PCIe 4.0 support (with Q35-4.0 machine type), as well as improved audio. Continue reading “Creating a Windows 10 VM on the AMD Ryzen 9 3900X using Qemu 4.0 and VGA Passthrough”

Upgrading my PC to an AMD Ryzen 9 3900X System – Benchmarks

It wasn’t easy this time. Don’t get me wrong – the VFIO passthrough part, though challenging in some ways, went quite well. All in all I’m pleased now with the results. Here the Passmark 9.0 benchmark as uploaded onto their database (for more details, click the frame below):

PassMark Rating

Continue reading “Upgrading my PC to an AMD Ryzen 9 3900X System – Benchmarks”

Upgrading my PC to an AMD Ryzen 9 3900X System

Introduction

I’ve been contemplating a PC upgrade for more than a year (see my post here). At first I considered staying with Intel and getting an i9-9900K CPU with integrated GPU on a Z390 motherboard.

Along came the AMD Ryzen 9 3900X that topped the benchmarks, including the Adobe Lightroom and Photoshop benchmarks (to be precise, it ranked #4 in the Adobe Lightroom benchmark, and a narrow #1 in the Adobe Photoshop benchmark). These good news about the AMD Ryzen 3900X were soon followed by reports about BIOS issues and VFIO incompatibility. At the very least, it looked like VGA passthrough was more challenging.

Then I read Bryan Steiner’s GPU passthrough tutorial for the AMD Ryzen 9 3900X and an Ubuntu-based Pop!_OS Linux host. Several users on the VFIO Reddit forum reported successful VFIO VGA passthrough with the AMD Ryzen 9. Continue reading “Upgrading my PC to an AMD Ryzen 9 3900X System”

Hardware upgrade or what’s holding me back?

More than a year has passed since I’ve posted about building a new PC. So what is holding me back from the upgrade? Time and money are considerations, but not the reason.

On paper, the AMD Ryzen 9 has outperformed Intel in most if not all tasks. The Ryzen 9 3900X beats the Intel i9 9900K as well as the Intel i9 10900X in multi-threaded workloads. The Intel i9 9900K can barely hold its ground on single-threaded tasks. Numerous benchmarks have shown that AMD is a clear winner. Continue reading “Hardware upgrade or what’s holding me back?”

Impact of Spectre and Meltdown Protection on Virtual Machine Performance

A year ago I wrote about the 2D graphics performance impact of the Windows 10 (1803) update inside a virtual machine. As it turned out, the performance impact was related to the Spectre vulnerability patch that Microsoft had introduced. However, the same patch had practically no performance impact on a Windows 10 bare-metal installation.

Time has passed and I wanted to see if there has been any progress. Right now I’m running Windows 10 (1903) with Nvidia driver release 431.36. Windows 10 is up-to-date, Nvidia however already offers a newer version (431.60). Continue reading “Impact of Spectre and Meltdown Protection on Virtual Machine Performance”

GPU Passthrough with Low-End Intel i3-6100 CPU

For some time I wanted to run a kvm virtual machine with GPU passthrough on a low-end Asus H110M-K D3 motherboard with an i3-6100 CPU and an Nvidia GTX 1060 GPU, but never found the time. Now I finally had a chance to give it a try. While the preparations were easy, I ran into a problem when starting the Windows 10 VM:

Jan 22 15:21:24 alon-i3 kernel: [  108.514992] vfio_pin_pages_remote: RLIMIT_MEMLOCK (16777216) exceeded

Continue reading “GPU Passthrough with Low-End Intel i3-6100 CPU”

Blacklisting Graphics Driver

When running a VM with GPU passthrough, that GPU should be bound to the VFIO driver. To make this happen, we need to prevent the regular graphics driver from binding to the passthrough GPU and instead bind the vfio-pci driver.

The most common way to do this is by blacklisting the graphics driver. This works in most cases, but what if you need the graphics driver for another GPU, e.g. the host GPU? Continue reading “Blacklisting Graphics Driver”

Tuning VM Disk Performance

Qemu/kvm provides you with a plethora of ways to configure your storage devices. Yet no other type of device shows such a variance in its performance, with disk I/O throughput anywhere from stellar to abysmal using the very same hardware.

In this post I like to show some configuration options that have worked well for me. For an in-depth presentation on the latest developments and features, with hands-on examples, see Storage Performance Tuning for FAST! Virtual Machines. Continue reading “Tuning VM Disk Performance”

Creating a Windows 10 Virtual Machine Using the Virtual Machine Manager (virt-manager)

March 29. 2020 edit: Recently I published a tutorial using Virtual Machine Manager. You can find it here: Creating a Windows 10 VM on the AMD Ryzen 9 3900X using Qemu 4.0 and VGA Passthrough.

Before you get your hopes high, this post is not (yet?) a tutorial on creating a Windows 10 virtual machine using the Virtual Machine Manager (virt-manager) GUI. It should have been, though. I spent the better part of a week trying to configure and install a Windows 10 VM that delivers the performance that I’m used to.

As it turns out, it was a failure. Don’t get me wrong, I did manage to configure and run Windows using virt-manager and virsh. I even installed it multiple times, changing the configuration to what I hoped would improve performance. But whatever I tried, I never got even near the speed and snappiness that I achieve by following my tutorial using a start script.

Continue reading “Creating a Windows 10 Virtual Machine Using the Virtual Machine Manager (virt-manager)”

New PC Build

Back in 2012 I built a PC around the Intel i7 3930K 6-core/12HT processor which I have been using ever since. While it’s still a strong PC, especially with the upgrades (GPU, SSD) I made, I’m starting to feel that editing photos isn’t as snappy as it used to be. I am also curious in how well the new generation of CPUs lend themselves to VGA passthrough. In short, I’m considering building a new PC. Continue reading “New PC Build”