KVM. kvm-ok not found error

Ubuntu 22.04

I’m trying to set up KVM by following this guide https://help.ubuntu.com/community/KVM/Installation and unfortunately Im getting the following error when I run kvm-ok

Command 'kvm-ok' not found, but can be installed with:
sudo apt install cpu-checker

I then tried to install cpu-checker and it gave this error

cpu-checker : Depends: msr-tools but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Ive enabled Virtualization in the BIOS (AMD Ryzen7 GFX CPU) and Ive tried the –fix-broken install.

kvm is a requirement to install Docker Desktop which is what Im trying to get working,
Does anyone know how to fix this so I can get kvm/Docker working?

Installed Repositories
Its suggested that this problem is being caused by having conflicting repositories, but how do you find out which one is the culprit? I have a few repositories installed for Audio Apps (kxstudio), Brave Browser, Wine, Proton, VSCode and Chrome. They were all installed in the last few months. (The system was re-built 3 months ago)

sudo grep -rhE ^deb /etc/apt/sources.list* 
deb http://gb.archive.ubuntu.com/ubuntu/ jammy main restricted
deb http://gb.archive.ubuntu.com/ubuntu/ jammy-updates main restricted
deb http://gb.archive.ubuntu.com/ubuntu/ jammy universe
deb http://gb.archive.ubuntu.com/ubuntu/ jammy-updates universe
deb http://gb.archive.ubuntu.com/ubuntu/ jammy multiverse
deb http://gb.archive.ubuntu.com/ubuntu/ jammy-updates multiverse
deb http://gb.archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu jammy-security main restricted
deb http://security.ubuntu.com/ubuntu jammy-security universe
deb http://security.ubuntu.com/ubuntu jammy-security multiverse
deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main
deb https://ppa.launchpadcontent.net/git-core/ppa/ubuntu/ jammy main
deb https://ppa.launchpadcontent.net/flatpak/stable/ubuntu/ jammy main
deb http://ppa.launchpad.net/kxstudio-debian/libs/ubuntu bionic main
deb http://ppa.launchpad.net/kxstudio-debian/music/ubuntu bionic main
deb http://ppa.launchpad.net/kxstudio-debian/plugins/ubuntu bionic main
deb http://ppa.launchpad.net/kxstudio-debian/apps/ubuntu bionic main
deb http://ppa.launchpad.net/kxstudio-debian/kxstudio/ubuntu bionic main
deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg] https://brave-browser-apt-release.s3.brave.com/ stable main
deb http://ppa.launchpad.net/kxstudio-debian/libs/ubuntu focal main
deb http://ppa.launchpad.net/kxstudio-debian/plugins/ubuntu focal main
deb http://ppa.launchpad.net/kxstudio-debian/apps/ubuntu focal main
deb http://ppa.launchpad.net/kxstudio-debian/kxstudio/ubuntu focal main
deb [arch=amd64,arm64,armhf] http://packages.microsoft.com/repos/code stable main
deb [arch="all", signed-by=/usr/share/keyrings/protonvpn-stable-archive-keyring.gpg] https://repo.protonvpn.com/debian stable main


Asked By: Artillery


kvm is a part of the package qemu-system-x86 these days. Install that package.

sudo apt install qemu-system-x86

Create an image with (fill in your own names):

kvm -m 4096 -cdrom ${PWD}/$ISO -boot d ${NAME}

and run the image with (adjust cores/memory as needed):

kvm -smp cores=4,threads=2 -cpu host -m 4096 -vga virtio -usb $IMAGE
Answered By: ubfan1

The conflict seems to have been caused by a package called avldrums.lv2 which had an unmet dependency avldrums.lv2-data. I think this package was installed along with a suit of Audio packages and VST’s by Ubuntu Studio, (but not 100% sure). I have no idea why that would have had a knock on effect with installing other unrelated packages, but purging it from the system has worked and I can now install qemu-system-x86 and I can run the command kvm-ok and proceed with installing Docker. Thanks to all who helped. 🙂

Answered By: Artillery
Categories: Answers Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.