How to create a Manjaro Linux virtual machine using QEMU/KVM/libvirt on Manjaro Linux?

System information
$ inxi -v7azy
System:
  Kernel: 5.19.17-2-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-5.19-x86_64
    root=UUID=1aecdb71-bf95-4e25-853c-c709ad46ad6e rw quiet apparmor=1
    security=apparmor resume=UUID=71ed32d9-8db4-4067-9ff8-756e4193cd36
    udev.log_priority=3
  Desktop: Cinnamon v: 5.6.6 tk: GTK v: 3.24.36 wm: muffin vt: 7 dm: LightDM
    v: 1.32.0 Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Desktop System: Gigabyte product: B450M DS3H v: N/A
    serial: <superuser required>
  Mobo: Gigabyte model: B450M DS3H-CF v: x.x serial: <superuser required>
    UEFI: American Megatrends LLC. v: F61c date: 05/10/2021
Battery:
  Message: No system battery data found. Is one present?
Memory:
  RAM: total: 30.74 GiB used: 6.86 GiB (22.3%)
  RAM Report: permissions: Unable to run dmidecode. Root privileges required.
CPU:
  Info: model: AMD Ryzen 7 5700G with Radeon Graphics bits: 64 type: MT MCP
    arch: Zen 3 gen: 4 level: v3 note: check built: 2021-22
    process: TSMC n7 (7nm) family: 0x19 (25) model-id: 0x50 (80) stepping: 0
    microcode: 0xA50000C
  Topology: cpus: 1x cores: 8 tpc: 2 threads: 16 smt: enabled cache:
    L1: 512 KiB desc: d-8x32 KiB; i-8x32 KiB L2: 4 MiB desc: 8x512 KiB L3: 16 MiB
    desc: 1x16 MiB
  Speed (MHz): avg: 2770 high: 4163 min/max: 1400/4672 boost: enabled
    scaling: driver: acpi-cpufreq governor: schedutil cores: 1: 3047 2: 4163
    3: 3562 4: 3691 5: 1400 6: 1400 7: 2660 8: 3711 9: 3313 10: 1400 11: 3416
    12: 1400 13: 2853 14: 1400 15: 3394 16: 3520 bogomips: 121408
  Flags: 3dnowprefetch abm adx aes aperfmperf apic arat avic avx avx2 bmi1
    bmi2 bpext cat_l3 cdp_l3 clflush clflushopt clwb clzero cmov cmp_legacy
    constant_tsc cpb cppc cpuid cqm cqm_llc cqm_mbm_local cqm_mbm_total
    cqm_occup_llc cr8_legacy cx16 cx8 de decodeassists erms extapic
    extd_apicid f16c flushbyasid fma fpu fsgsbase fsrm fxsr fxsr_opt ht
    hw_pstate ibpb ibrs ibs invpcid irperf lahf_lm lbrv lm mba mca mce
    misalignsse mmx mmxext monitor movbe msr mtrr mwaitx nonstop_tsc nopl npt
    nrip_save nx ospke osvw overflow_recov pae pat pausefilter pclmulqdq
    pdpe1gb perfctr_core perfctr_llc perfctr_nb pfthreshold pge pku pni popcnt
    pse pse36 rapl rdpid rdpru rdrand rdseed rdt_a rdtscp rep_good sep sha_ni
    skinit smap smca smep ssbd sse sse2 sse4_1 sse4_2 sse4a ssse3 stibp succor
    svm svm_lock syscall tce topoext tsc tsc_scale umip v_spec_ctrl
    v_vmsave_vmload vaes vgif vmcb_clean vme vmmcall vpclmulqdq wbnoinvd wdt
    xgetbv1 xsave xsavec xsaveerptr xsaveopt xsaves
  Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: retbleed status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW,
    STIBP: always-on, RSB filling, PBRSB-eIBRS: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: AMD Cezanne [Radeon Vega Series / Radeon Mobile Series]
    vendor: Gigabyte driver: amdgpu v: kernel arch: GCN-5.1 code: Vega-2
    process: TSMC n7 (7nm) built: 2018-21 pcie: gen: 3 speed: 8 GT/s lanes: 16
    link-max: gen: 4 speed: 16 GT/s ports: active: HDMI-A-1 empty: DVI-D-1
    bus-ID: 07:00.0 chip-ID: 1002:1638 class-ID: 0300 temp: 34.0 C
  Display: x11 server: X.Org v: 21.1.6 driver: X: loaded: amdgpu
    unloaded: modesetting alternate: fbdev,vesa dri: radeonsi gpu: amdgpu
    display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22")
    s-diag: 582mm (22.93")
  Monitor-1: HDMI-A-1 mapped: HDMI-A-0 model: BenQ GC2870 serial: <filter>
    built: 2018 res: 1920x1080 hz: 60 dpi: 79 gamma: 1.2
    size: 621x341mm (24.45x13.43") diag: 708mm (27.9") ratio: 16:9 modes:
    max: 1920x1080 min: 720x400
  API: OpenGL Message: Unable to show GL data. Required tool glxinfo missing.
Audio:
  Device-1: AMD Renoir Radeon High Definition Audio driver: snd_hda_intel
    v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16 link-max: gen: 4
    speed: 16 GT/s bus-ID: 07:00.1 chip-ID: 1002:1637 class-ID: 0403
  Device-2: AMD Family 17h/19h HD Audio vendor: Gigabyte
    driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16
    link-max: gen: 4 speed: 16 GT/s bus-ID: 07:00.6 chip-ID: 1022:15e3
    class-ID: 0403
  Sound API: ALSA v: k5.19.17-2-MANJARO running: yes
  Sound Server-1: JACK v: 1.9.21 running: no
  Sound Server-2: PulseAudio v: 16.1 running: yes
  Sound Server-3: PipeWire v: 0.3.64 running: yes
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Gigabyte driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s
    lanes: 1 port: f000 bus-ID: 04:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp4s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: noprefixroute scope: link
  IF-ID-1: br-3be1eef3477b state: down mac: <filter>
  IP v4: <filter> scope: global broadcast: <filter>
  IF-ID-2: br-b8442be99997 state: up speed: 10000 Mbps duplex: unknown
    mac: <filter>
  IP v4: <filter> scope: global broadcast: <filter>
  IP v6: <filter> scope: link
  IF-ID-3: docker0 state: down mac: <filter>
  Message: Output throttled. IPs: 1; Limit: 10; Override: --limit [1-x;-1
    all]
  IF-ID-4: veth1e29b2a state: up speed: 10000 Mbps duplex: full mac: <filter>
  IF-ID-5: veth650e9dd state: up speed: 10000 Mbps duplex: full mac: <filter>
  IF-ID-6: vetha5735fa state: up speed: 10000 Mbps duplex: full mac: <filter>
  IF-ID-7: virbr0 state: down mac: <filter>
  Message: Output throttled. IPs: 1; Limit: 10; Override: --limit [1-x;-1
    all]
  IF-ID-8: vnet0 state: down mac: <filter>
  Message: Output throttled. IPs: 1; Limit: 10; Override: --limit [1-x;-1
    all]
  WAN IP: <filter>
Bluetooth:
  Message: No bluetooth data found.
Logical:
  Message: No logical block device data found.
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 99.14 TiB used: 87.2 TiB (88.0%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Western Digital
    model: WDS100T2B0C-00PXH0 size: 931.51 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: 211210WD temp: 36.9 C scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 vendor: Seagate model: ST16000NM001G-2KK103
    size: 14.55 TiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
    type: HDD rpm: 7200 serial: <filter> rev: SB30 scheme: GPT
  ID-3: /dev/sdb maj-min: 8:16 vendor: Seagate model: ST16000NM001G-2KK103
    size: 14.55 TiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
    type: HDD rpm: 7200 serial: <filter> rev: SN03 scheme: GPT
  ID-4: /dev/sdc maj-min: 8:32 vendor: Toshiba model: MG09ACA18TE
    size: 16.37 TiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
    type: HDD rpm: 7200 serial: <filter> rev: 0104 scheme: GPT
  ID-5: /dev/sdd maj-min: 8:48 vendor: Toshiba model: MG08ACA16TE
    size: 14.55 TiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
    type: HDD rpm: 7200 serial: <filter> rev: 4303 scheme: GPT
  ID-6: /dev/sde maj-min: 8:64 vendor: Seagate model: ST16000NM001G-2KK103
    size: 14.55 TiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
    type: HDD rpm: 7200 serial: <filter> rev: SN03 scheme: GPT
  ID-7: /dev/sdf maj-min: 8:80 vendor: Toshiba model: MG08ACA16TE
    size: 14.55 TiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
    type: HDD rpm: 7200 serial: <filter> rev: 0102 scheme: GPT
  ID-8: /dev/sdg maj-min: 8:96 type: USB vendor: Seagate model: Expansion
    size: 4.55 TiB block-size: physical: 4096 B logical: 512 B type: N/A
    serial: <filter> rev: 0712
  ID-9: /dev/sdh maj-min: 8:112 type: USB vendor: Seagate model: Portable
    size: 4.55 TiB block-size: physical: 4096 B logical: 512 B type: N/A
    serial: <filter> rev: 0712 scheme: GPT
  Message: No optical or floppy data found.
Partition:
  ID-1: / raw-size: 914.69 GiB size: 899.26 GiB (98.31%)
    used: 539.13 GiB (60.0%) fs: ext4 dev: /dev/nvme0n1p2 maj-min: 259:2
    label: N/A uuid: 1aecdb71-bf95-4e25-853c-c709ad46ad6e
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 312 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
    label: NO_LABEL uuid: 374A-28F2
  ID-3: /mnt/hdd2 raw-size: 4.55 TiB size: 4.51 TiB (99.19%)
    used: 4.06 TiB (90.0%) fs: ext4 dev: /dev/sdh1 maj-min: 8:113 label: T
    uuid: d605a480-f133-443c-8fe7-5b0a2d1c60c1
  ID-4: /mnt/hdd3 raw-size: 14.55 TiB size: 14.44 TiB (99.20%)
    used: 13.49 TiB (93.4%) fs: ext4 dev: /dev/sdd1 maj-min: 8:49 label: V
    uuid: 61aea4de-aa02-4f6d-b77d-dc0b09eac2ca
  ID-5: /mnt/hdd4 raw-size: 14.55 TiB size: 14.44 TiB (99.20%)
    used: 13.49 TiB (93.5%) fs: ext4 dev: /dev/sdb1 maj-min: 8:17 label: W
    uuid: 3e3c48c4-9a6f-4a15-b1e1-b6e61b68e6b2
  ID-6: /mnt/hdd5 raw-size: 16.37 TiB size: 16.3 TiB (99.60%)
    used: 15.23 TiB (93.4%) fs: ext4 dev: /dev/sdc1 maj-min: 8:33 label: X
    uuid: 4e9781ed-4012-4319-a06e-6b0d3070b82e
  ID-7: /mnt/hdd6 raw-size: 14.55 TiB size: 14.44 TiB (99.20%)
    used: 13.47 TiB (93.3%) fs: ext4 dev: /dev/sde1 maj-min: 8:65 label: U
    uuid: 301e3d8d-6c0a-4f7c-864b-4185a70efbb0
  ID-8: /mnt/hdd7 raw-size: 14.55 TiB size: 14.44 TiB (99.20%)
    used: 13.45 TiB (93.2%) fs: ext4 dev: /dev/sda1 maj-min: 8:1 label: Z
    uuid: d08b13d8-8724-49d5-8000-2fdac4176157
  ID-9: /mnt/hdd8 raw-size: 14.55 TiB size: 14.44 TiB (99.20%)
    used: 13.49 TiB (93.4%) fs: ext4 dev: /dev/sdf1 maj-min: 8:81 label: Y
    uuid: 86b6e5c3-88a3-407b-84ca-71d966e0d0cb
  ID-10: /mnt/storage raw-size: N/A size: 93.88 TiB used: 87.2 TiB (92.9%)
    fs: fuse.mergerfs source: ERR-102
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 16.52 GiB used: 3.5 MiB (0.0%)
    priority: -2 dev: /dev/nvme0n1p3 maj-min: 259:3 label: swap
    uuid: 71ed32d9-8db4-4067-9ff8-756e4193cd36
Unmounted:
  Message: No unmounted partitions found.
USB:
  Hub-1: 1-0:1 info: Hi-speed hub with single TT ports: 10 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Hub-2: 2-0:1 info: Super-speed hub ports: 4 rev: 3.1 speed: 10 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
  Hub-3: 3-0:1 info: Hi-speed hub with single TT ports: 4 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Hub-4: 4-0:1 info: Super-speed hub ports: 2 rev: 3.1 speed: 10 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
  Device-1: 4-2:2 info: Seagate RSS LLC Portable type: Mass Storage
    driver: uas interfaces: 1 rev: 3.0 speed: 5 Gb/s power: 896mA
    chip-ID: 0bc2:2344 class-ID: 0806 serial: <filter>
  Hub-5: 5-0:1 info: Hi-speed hub with single TT ports: 4 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Hub-6: 5-1:5 info: Genesys Logic Hub ports: 4 rev: 2.1 speed: 480 Mb/s
    power: 100mA chip-ID: 05e3:0610 class-ID: 0900
  Device-1: 5-1.1:6 info: Logitech G502 SE HERO Gaming Mouse type: Mouse,HID
    driver: hid-generic,usbhid interfaces: 2 rev: 2.0 speed: 12 Mb/s power: 300mA
    chip-ID: 046d:c08b class-ID: 0300 serial: <filter>
  Device-2: 5-1.2:7 info: SONiX USB Keyboard type: Keyboard
    driver: hid-generic,usbhid interfaces: 1 rev: 2.0 speed: 12 Mb/s power: 500mA
    chip-ID: 2efd:7812 class-ID: 0301
  Hub-7: 6-0:1 info: Super-speed hub ports: 2 rev: 3.1 speed: 10 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
  Hub-8: 6-1:4 info: Genesys Logic Hub ports: 4 rev: 3.1 speed: 5 Gb/s
    chip-ID: 05e3:0612 class-ID: 0900
  Device-1: 6-2:2 info: Seagate RSS LLC Expansion type: Mass Storage
    driver: uas interfaces: 1 rev: 3.0 speed: 5 Gb/s power: 896mA
    chip-ID: 0bc2:2343 class-ID: 0806 serial: <filter>
Sensors:
  System Temperatures: cpu: 55.6 C mobo: 31.0 C gpu: amdgpu temp: 36.0 C
  Fan Speeds (RPM): N/A
Info:
  Processes: 523 Uptime: 6h 6m wakeups: 0 Init: systemd v: 252
  default: graphical tool: systemctl Compilers: gcc: 12.2.1 clang: 14.0.6
  Packages: pm: pacman pkgs: 2293 libs: 460 tools: pamac,yay pm: flatpak
  pkgs: 0 Shell: Zsh v: 5.9 running-in: tmux: inxi: 3.3.24

I’ve followed the guide Install KVM, QEMU and Virt Manager on Arch Linux / Manjaro

Check hardware support

$ LC_ALL=C lscpu | grep Virtualization
Virtualization:                  AMD-V
$ egrep -c '(vmx|svm)' /proc/cpuinfo
16

The output must be greater than 0. Otherwise virtualization needs to be enabled in the BIOS.

sudo pacman -Syyu
reboot
sudo pacman -S archlinux-keyring
sudo pacman -S qemu-desktop virt-manager virt-viewer dnsmasq vde2 bridge-utils openbsd-netcat

This gave me some error:

sudo pacman -S ebtables iptables
warning: iptables-1:1.8.8-2 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...
warning: removing 'iptables' from target list because it conflicts with 'iptables-nft'
:: iptables-nft and iptables are in conflict. Remove iptables? [y/N] n
error: unresolvable package conflicts detected
error: failed to prepare transaction (conflicting dependencies)
:: iptables-nft and iptables are in conflict

Install libguestfs

sudo pacman -S libguestfs

Start KVM libvirt service

sudo systemctl enable --now libvirtd.service

I got an error

systemctl status libvirtd.service
Unable to open /dev/kvm: No such file or directory

I enabled normal user account to use KVM by modifying /etc/libvirt/libvirtd.conf and doing

sudo usermod -a -G libvirt $(whoami)
newgrp libvirt
sudo systemctl restart libvirtd.service

Then I launched Virtual Machine Manager and clicked on create new virtual machine and it says:

Warning: KVM is not available. This may mean the KVM package is not installed, or the KVM kernel modules are not loaded. Your virtual machines may perform poorly.

From the KVM ArchWiki page

Arch Linux kernels provide the required kernel modules to support KVM.

  • One can check if the necessary modules, kvm and either kvm_amd or kvm_intel, are available in the kernel with the following command:
$ zgrep CONFIG_KVM /proc/config.gz
CONFIG_KVM_GUEST=y
CONFIG_KVM_MMIO=y
CONFIG_KVM_ASYNC_PF=y
CONFIG_KVM_VFIO=y
CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=y
CONFIG_KVM_COMPAT=y
CONFIG_KVM_XFER_TO_GUEST_WORK=y
CONFIG_KVM=m
CONFIG_KVM_INTEL=m
CONFIG_KVM_AMD=m
CONFIG_KVM_AMD_SEV=y
CONFIG_KVM_XEN=y
CONFIG_KVM_EXTERNAL_WRITE_TRACKING=y

The module is available only if it is set to either y or m.

  • Then, ensure that the kernel modules are automatically loaded, with the command:
$ lsmod | grep kvm
kvm                  1130496  0
irqbypass              16384  1 kvm

In Fedora you can just install the whole virtualization group with

sudo dnf install @virtualization

—
QEMU/KVM for absolute beginners

Is there a package in the AUR to install and configure all this automatically?

Otherwise, what should I do to solve the KVM is not available error before I create a new virtual machine?

you said no - so the conflict is still there and the installation can’t proceed
solve this first - don’t just keep going and then wonder why nothing works :sunglasses:

I’ve installed it but it didn’t affect the KVM error.

Is there any other guide I could try before I have to read the QEMU, KVM and libvirt ArchWiki articles?

I was just about to tell you to go and read exactly that.

run the whole thing again - you are probably missing half of the required components

sudo pacman -S qemu virt-manager virt-viewer dnsmasq vde2 bridge-utils openbsd-netcat

… and: use the Arch wiki :muscle:

That guide you used seems to be not wholly consistent.
For example:
installing the keyring (and only the arch one) after you have just updated everything makes no sense
That is an immediate red flag for me.

I installed those packages before the iptables mistake without any error.

The keyring just said it was already installed. I guess the guide is just making sure it can be installed from zero.

$ sudo pacman -S archlinux-keyring
warning: archlinux-keyring-20221220-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) archlinux-keyring-20221220-1

Total Installed Size:  1,60 MiB
Net Upgrade Size:      0,00 MiB

:: Proceed with installation? [Y/n]
(1/1) checking keys in keyring                                           [########################################] 100%
(1/1) checking package integrity                                         [########################################] 100%
(1/1) loading package files                                              [########################################] 100%
(1/1) checking for file conflicts                                        [########################################] 100%
(1/1) checking available disk space                                      [########################################] 100%
:: Processing package changes...
(1/1) reinstalling archlinux-keyring                                     [########################################] 100%
==> Appending keys from archlinux.gpg...
==> Updating trust database...
gpg: next trustdb check due at 2023-04-21
==> Updating trust database...
gpg: next trustdb check due at 2023-04-21
:: Running post-transaction hooks...
(1/2) Reloading system manager configuration...
(2/2) Arming ConditionNeedsUpdate...

from the arch wiki you don’t want to read:

1 Installation

Warning: The previous versions of this guide encouraged installing ebtablesAUR package, but the iptables-nft package provides ebtables functionality without the need to rely on the AUR. Only use it if you specifically need the legacy Xtables implementation.

libvirt - ArchWiki


also:
LC_ALL=C lscpu | grep Virtualization

to check whether you even have hardware support

and:

Then, ensure that the kernel modules are automatically loaded, with the command:

$ lsmod | grep kvm

from here

KVM - ArchWiki

you are better off to adhere to the arch wiki

Sorry, I’m getting confused. The guide I followed said to install ebtables and iptables but the ArchWiki says I should use iptables-nft only if I need the legacy Xtables implementation. I already had iptables-nft but I’ve replaced it for iptables since they were conflicting. I don’t know whether or not I need the legacy Xtables. Do I keep iptables or do I install iptables-nft?

maybee helps,
for me its working better then the arch wiki entry

1 Like

I think both will do, but since the recommendation is the latter …

I’ve found a solution in virt-manager: KVM is not available but I haven’t found which video driver I have installed so I don’t think I have that same package. Following the steps didn’t solve the problem.

This error was related to the driver opencl-amdgpu-pro-orca. [This answer][1] details some background of what causes the error. Here’s how I went about resolving the problem:

  1. Run sudo systemctl edit libvirtd, which opens Nano.
  • That command creates a temporary file which will save to become override.conf within the directory of the libvirtd service.
  1. Enter the following into this (empty in my case) file:
[Service]
Environment="LD_LIBRARY_PATH=/usr/lib"
  1. Restart libvirtd with sudo systemctl restart libvirtd.
  2. Open virt-manager. The error should not be present.
  • It’s worth noting that I did not need to reboot following these changes.

The rest of the question as it originally was is detailed below.

Hmm - you found a solution, which didn’t solve the problem.

seems entirely inconsistent to me

…
do you even have enabled the hardware support for being able to use kvm?

LC_ALL=C lscpu | grep Virtualization

grep -E --color=auto 'vmx|svm|0xc0f' /proc/cpuinfo

If nothing is displayed after running either command, then your processor does not support hardware virtualization, and you will not be able to use KVM.

Note: You may need to enable virtualization support in your BIOS. All x86_64 processors manufactured by AMD and Intel in the last 10 years support virtualization. If it looks like your processor does not support virtualization, it is almost certainly turned off in the BIOS.

check the Bios settings

I’ve added that info to the first post.

so your processor does have the ability
good

I just (at the moment) do not understand what you are struggling with. :man_shrugging:

perhaps reiterate where you get hung up?

I’m not really hung up, I’ve actually managed to create a virtual machine but it’s so slow that it’s completely unusable, I’ll just abandon this for now and use VirtualBox.

  • Stop and disable the KVM libvirt service:
$ sudo systemctl stop libvirtd.service
$ sudo systemctl disable libvirtd.service
  • Remove the user account from the libvirt group:
$ sudo gpasswd -d $(whoami) libvirt
  • Remove the installed packages:
$ sudo pacman -Rsc libguestfs qemu-desktop virt-manager virt-viewer dnsmasq vde2 bridge-utils openbsd-netcat ebtables iptables
$ sudo pacman -S virtualbox

mkay - perhaps not all the needed modules are loaded automatically

this is what you posted:

a lot seems to be missing

mkay - good luck!

I’ve found an error while doing the same on VirtualBox which I’m going to copy here because it may be related.

Error message from VirtualBox

Failed to open a session for the virtual machine XXX.

AMD-V is disabled in the BIOS. (VERR_SVM_DISABLED).

Result Code: NS_ERROR_FAILURE (0x80004005)
Component: Console
Interface: IConsole {1968b7d3-e3bf-4ceb-99e0-cb7c913317bb}

And the solution for Gigabyte b450m

If you can’t find this option try pressing CTRL + F1 at the same time. Once you are in the “Advanced Mode” navigate to the “M.I.T” tab. Select “Advanced Frequency Settings” → “Advanced CPU Core Settings”. On this tab you need to select “SVM Mode” and turn it on.

that is why you check
in the beginning
before you do anything else
whether the option to virtualize a system is even possible