Certified Azure Solution Architect & DevOps expert with 20 years in software. Microsoft Press Author. CloudSkills Community Author. Also a bit of a data nerd.
Support Technican, System Engineer, System Architect, Consultant, Mentor and so much more for: Microsoft (nearly everything), Linux (Ubuntu, CentOS), ITIL (V3), Prince²
Still working on more skills.
Support Technican, System Engineer, System Architect, Consultant, Mentor and so much more for: Microsoft (nearly everything), Linux (Ubuntu, CentOS), ITIL (V3), Prince²
Still working on more skills.
I used the 2 networking lines from macOS-Simple-KVM rather than the method he listed, which did not work in WSL2. I've added a few more processor flags to my launch shell script (and changed the name for ease of typing) :
.wslconf borrowed and modified from yours (I'm pretty sure some of those AMD settings are non-functional) --note that the number of processors is inherited from the host and does not need listing here. When building my own kernel I had to use the 104 one -- the available 128 option failed to mount my C drive after building. I probably didn't need to go that route at all, since the current Insider dev build (20211.1005) has nested KVM support out of the box.
Launch script from this tutorial with my additions to the flags (I think svm is critical for AMD) and adjustments to RAM/Proc
############################################################################
# NOTE: Tweak the "MY_OPTIONS" line in case you are having booting problems!
############################################################################
MY_OPTIONS="+svm,+hypervisor,+msr,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+avx2,+aes,+xsave,+xsaveopt,check"
# This script works for Big Sur, Catalina, Mojave, and High Sierra. Tested with
# macOS 10.15.6, macOS 10.14.6, and macOS 10.13.6
ALLOCATED_RAM="17166" # MiB
CPU_SOCKETS="1"
CPU_CORES="4"
CPU_THREADS="8"
REPO_PATH="./"
OVMF_DIR="."
It's possible (likely?) that I could trace my original installation-reboot issue by comparing the launch file with the one from macOS-simple-kvm.
That list of processor flags provide a big performance gain, but I'm not done yet. My next step is to place all of the AMD processor flags into the options line and then systematically remove the ones that cause errors -- this is similar to the process used for the huge long list of Intel flags at the bottom of the Accelerated KVM Guests post, and my performance with the graphical Ubuntu shell he walks through the installation of at the bottom is fantastic. Granted that's has a much lighter overhead then macOS.
Support Technican, System Engineer, System Architect, Consultant, Mentor and so much more for: Microsoft (nearly everything), Linux (Ubuntu, CentOS), ITIL (V3), Prince²
Still working on more skills.
@ciparis
i'm sure there is also a huge difference with the vCPU which he uses for QEMU.
I also use the switch -deamonize to free the WSL console for htop and other monitoring.
I just tried Mojave and it ran much slower than Catalina (the opposite of what I expected). For whatever reason, Catalina is faster on my Ryzen setup. Still laggy, but usable.
Support Technican, System Engineer, System Architect, Consultant, Mentor and so much more for: Microsoft (nearly everything), Linux (Ubuntu, CentOS), ITIL (V3), Prince²
Still working on more skills.
@pkostelnik yeah dbus is a great shout, same IPC etc, did you check the performance gain after the full kernel compile or with both together?
@nicole Not really because there is only a slightly speedup between this changes maybe 10-15%
@ciparis would you mind to share your configuration please.
Here's the guide I followed:
github.com/kholia/OSX-KVM
I used the 2 networking lines from macOS-Simple-KVM rather than the method he listed, which did not work in WSL2. I've added a few more processor flags to my launch shell script (and changed the name for ease of typing) :
.wslconf borrowed and modified from yours (I'm pretty sure some of those AMD settings are non-functional) --note that the number of processors is inherited from the host and does not need listing here. When building my own kernel I had to use the 104 one -- the available 128 option failed to mount my C drive after building. I probably didn't need to go that route at all, since the current Insider dev build (20211.1005) has nested KVM support out of the box.
Launch script from this tutorial with my additions to the flags (I think svm is critical for AMD) and adjustments to RAM/Proc
It's possible (likely?) that I could trace my original installation-reboot issue by comparing the launch file with the one from macOS-simple-kvm.
That list of processor flags provide a big performance gain, but I'm not done yet. My next step is to place all of the AMD processor flags into the options line and then systematically remove the ones that cause errors -- this is similar to the process used for the huge long list of Intel flags at the bottom of the Accelerated KVM Guests post, and my performance with the graphical Ubuntu shell he walks through the installation of at the bottom is fantastic. Granted that's has a much lighter overhead then macOS.
@ciparis i'm sure there is also a huge difference with the vCPU which he uses for QEMU.
I also use the switch -deamonize to free the WSL console for htop and other monitoring.
Here's the list of every AMD CPU flag (from /proc/cpuinfo) that is accepted without error by QEMU:
Performance remains good; I should probably benchmark between this list and the previous one.
@pkostelnik What version of macOS are you using?
I just tried Mojave and it ran much slower than Catalina (the opposite of what I expected). For whatever reason, Catalina is faster on my Ryzen setup. Still laggy, but usable.
@ciparis trying actually both catalina (which started with clover) and also mojave, but trying now to change to opencore.