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”

Linux Virtual Gaming Machine

You may wonder what’s wrong with this fellow (meaning me, the author). Has he completely lost his mind when he proposes a Linux virtual gaming machine? Before you discredit the idea, let me explain. Continue reading “Linux Virtual Gaming Machine”

Installing a Linux Mint 19 (Ubuntu 18.04) VM with VGA Passthrough

Introduction

Installing a Linux Mint 19 VM (or Ubuntu 18.04) with VGA passthrough is surprisingly straightforward. This tutorial follows the Running Windows 10 on Linux using KVM with VGA Passthrough almost step-by-step. I will therefore focus on what’s different from the above tutorial.

While booting the Linux Mint 19 life installation media (ISO) as a VM was easy, the installation of Linux Mint invariably ended with the following error:

The ‘grub-efi-amd64-signed’ package failed to install target/

The following tutorial will describe the steps to overcome this problem (bug?). Continue reading “Installing a Linux Mint 19 (Ubuntu 18.04) VM with VGA Passthrough”

Windows 10 Virtual Machine Benchmarks

Benchmarking Performance of a Virtual Machine

I have run  a number of benchmarks to document the performance of Windows 10 running as a virtual machine on Linux, in the hope other PC users will dive into the fascinating world of virtualization.

Benchmarks are helpful in comparing one system with another, and one configuration with another. I use them for optimizing my Windows 10 performance and for making sure that updates/upgrades haven’t produced unwanted side effects. Continue reading “Windows 10 Virtual Machine Benchmarks”

Low 2D Graphics Benchmark with Windows 10 (1803) KVM VM

Problem: bad 2D performance in Windows VM versus Windows on bare metal

For the past few months I noticed sluggish 2D graphics in my Windows 10 VM, something that hadn’t happened before. Below are the Passmark 8 results and comparisons between different configurations/releases: Continue reading “Low 2D Graphics Benchmark with Windows 10 (1803) KVM VM”

Upgrade to Linux Mint 19 (Ubuntu 18.04)

I recently upgraded from Linux Mint 18.3 to the latest version, Linux Mint 19. I did this so I could test and eventually update my VGA passthrough tutorial. There was no other practical reason for me to upgrade.

I did the upgrade twice:

  1. Using the mintupgrade tool provided by Linux Mint. This allowed me to upgrade my existing Linux Mint installation and all installed applications.
    The upgrade went surprisingly smooth, with only minor glitches. However, in the end I decided to reinstall the Linux Mint 19 system from scratch (see 2. below).
  2. Install the entire operating system from the downloaded ISO, while preserving the /home director (my user directory) and all other data.
    This was quite a pain in the neck, as it turned out.

Continue reading “Upgrade to Linux Mint 19 (Ubuntu 18.04)”

Memory Failure

I did some overclocking (to 4.2 GHZ) and gave the CPU and memory a trial using Prime95 and other torture tests. Later, much later, I realised that part of my memory was gone!

Checking the BIOS showed memory failures of two of 8 modules, reducing my total to 24GB. I’m not sure it was the overclocking, the torture tests or simply old age (the PC and memory is 6 years old). The funny thing was that I could boot into Linux and run some applications, and whenever I used Firefox I would sooner or later get a freeze. I monitored the processes and saw that the kswapd demon was busy. It took me a little to grasp that I had “lost” memory. Continue reading “Memory Failure”

Qemu and libvirt security – ppa:jacob/virtualisation

I’m running Linux Mint 18.3 which is based on Ubuntu 16.04 Xenial. Until yesterday I used the Personal Packet Archive ppa:jacob/virtualisation to get more up-to-date releases of Qemu, libvirt, and virt-manager.

Ubuntu and Linux Mint recently released security updates for their official (but old) qemu and libvirt packages to address the Meltdown and Spectre vulnerabilities. Unfortunately the Ubuntu 16.04 releases in the ppa:jacob/virtualisation archive have not been updated, judging from the upload date. Continue reading “Qemu and libvirt security – ppa:jacob/virtualisation”