3

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

Thanks Jef

6
  • You should add information requested to your original posting. Do you have any PPA's in addition to the original ones? What do you have checked in Software & Updates/Ubuntu Software? Something is preventing getting the dependencies for the qemu-system-x86 package.
    – ubfan1
    Nov 7, 2023 at 17:29
  • Thanks ubfan, I added a list of repositories that I have installed, but how do you find out if one may be causing the problem?
    – Artillery
    Nov 7, 2023 at 18:36
  • focal...bionic...jammy What a mess. First, get rid of the old ones, then see what problems remain.
    – ubfan1
    Nov 7, 2023 at 19:16
  • yes its very embarrasing to have repositories from different versions of Ubuntu, but thats kxstudio, so not much I can do. Lots of vst's and audio apps and plugins use it so thats just how they roll. Anyway, I removed their repositories for the moment and unfortunately I still get the same dependencies error when I try to install qemu-system-x86.
    – Artillery
    Nov 7, 2023 at 19:59
  • After you removed the old repos, did you run sudo apt update before trying the install?
    – ubfan1
    Nov 7, 2023 at 20:43

2 Answers 2

4

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
4
  • Hi, I tried running sudo apt install qemu-system-x86 but it gave me around 15 unmet dependency errors. ``` qemu-system-x86 : Depends: libfdt1 (>= 1.6.1) but it is not going to be installed ... Depends: ipxe-qemu-256k-compat-efi-roms but it is not going to be installed ... Recommends: qemu-block-extra (= 1:6.2+dfsg-2ubuntu6.15) but it is not going to be installed Recommends: cpu-checker but it is not going to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). ``
    – Artillery
    Nov 7, 2023 at 16:24
  • Sorry, that comment all ran together as one line, It says these are Unmet Dependencies ``` libfdt1, libibverbs1, libpmem1, librdmacm1, libslirp0, qemu-system-common, qemu-system-data, seabios, ipxe-qemu, ipxe-qemu-256k-compat-efi-roms, qemu-system-gui, qemu-utils, ovmf, qemu-block-extra, cpu-checker, ```
    – Artillery
    Nov 7, 2023 at 16:32
  • 1
    @Artillery have you run sudo apt update recently?
    – Thomas Ward
    Nov 7, 2023 at 16:40
  • Thanks Thomas, I did an update just there, but unfortunately still getting same errors
    – Artillery
    Nov 7, 2023 at 17:04
0

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. :)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .