So, I've been looking at this for about a week.
If I run virt-manager and try to create a new VM (there aren't any there now), the error is:
Error: No hypervisor options were found for this connection.
This usually means that QEMU or KVM is not installed on your machine, or the KVM kernel modulus are not loaded.
Check KVM kernel modules:
They are there, loaded.
Next, check the packages:
So, those are all that should be needed. Checking libvirt packages:
Let's check the daemons,
If I directly run /usr/bin/qemu-system-x86_64 (no options), I'm shown a new window with a VM trying to boot. Something between qemu and libvirt is screwed?
Now, I'm desperate. Time to check the system logs ...
Time to google those errors. Check for issues with the PID file first. The only result was that /var was full. Checking:
Plenty of room in /var/.
Next error ...
Try stopping AppArmor and then restart libvirtd and relaunch virt-manager
sudo systemctl stop apparmor
Did that. Got a little farther, but still getting error.
Switched to attempting to use virsh to add an exist VM:
Fresh 20.04 server install, not an upgrade.
Some system basic information:
This is a Server install with a minimal WM-only GUI. No DE. It has been stable the last 2 weeks now. The hardware was running 18.l04 with KVM for the last 3+ yrs, upgraded to a newer Ryzen a few months ago and has been very stable. I rebooted it today to manually check the BIOS SVR was set. Why can't they just call it Virtualization?
BIOS has SVR enabled.
I've reinstalled all the KVM/QEMU/Libvirt packages ... but I didn't purge them first. Also, this system doesn't have IPv6 enabled. It is disabled by grub.
I'm not stuck, but would appreciate some help. Think I've checked all the bonehead stuff, but I can do some really bonehead things. Discovered some permission problems in /var/lib/libvirt/. Fortunately, I have another 20.04 system running lots of VMs that has the correct permissions, which I've setup. libvirt-qemu:kvm
Ideas?
If I run virt-manager and try to create a new VM (there aren't any there now), the error is:
Quote:
Error: No hypervisor options were found for this connection.
This usually means that QEMU or KVM is not installed on your machine, or the KVM kernel modulus are not loaded.
Code:
$ lsmod |grep kvm
kvm_amd 155648 0
kvm 1015808 1 kvm_amd
ccp 102400 1 kvm_amd
Next, check the packages:
Code:
$ dpkg -l qemu* |egrep '^ii'
ii qemu 1:4.2-3ubuntu6.26 amd64 fast processor emulator, dummy package
ii qemu-block-extra:amd64 1:4.2-3ubuntu6.26 amd64 extra block backend modules for qemu-system and qemu-utils
ii qemu-kvm 1:4.2-3ubuntu6.26 amd64 QEMU Full virtualization on x86 hardware
ii qemu-system-common 1:4.2-3ubuntu6.26 amd64 QEMU full system emulation binaries (common files)
ii qemu-system-data 1:4.2-3ubuntu6.26 all QEMU full system emulation (data files)
ii qemu-system-gui:amd64 1:4.2-3ubuntu6.26 amd64 QEMU full system emulation binaries (user interface and audio support)
ii qemu-system-x86 1:4.2-3ubuntu6.26 amd64 QEMU full system emulation binaries (x86)
ii qemu-utils 1:4.2-3ubuntu6.26 amd64 QEMU utilities
Code:
$ dpkg -l libvirt* |egrep '^ii'
ii libvirt-clients 6.0.0-0ubuntu8.16 amd64 Programs for the libvirt library
ii libvirt-daemon 6.0.0-0ubuntu8.16 amd64 Virtualization daemon
ii libvirt-daemon-driver-qemu 6.0.0-0ubuntu8.16 amd64 Virtualization daemon QEMU connection driver
ii libvirt-daemon-driver-storage-rbd 6.0.0-0ubuntu8.16 amd64 Virtualization daemon RBD storage driver
ii libvirt-daemon-system 6.0.0-0ubuntu8.16 amd64 Libvirt daemon configuration files
ii libvirt-daemon-system-systemd 6.0.0-0ubuntu8.16 amd64 Libvirt daemon configuration files (systemd)
ii libvirt-glib-1.0-0:amd64 3.0.0-1 amd64 libvirt GLib and GObject mapping library
ii libvirt0:amd64 6.0.0-0ubuntu8.16 amd64 library for interfacing with different virtualization systems
Code:
$ sudo systemctl status libvirt*
● libvirtd.service - Virtualization daemon
Loaded: loaded (/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/libvirtd.service.d
└─override.conf
Active: active (running) since Wed 2023-05-31 08:59:40 EDT; 43min ago
TriggeredBy: ● libvirtd-ro.socket
● libvirtd.socket
● libvirtd-admin.socket
Docs: man:libvirtd(8)
https://libvirt.org
Main PID: 5238 (libvirtd)
Tasks: 19 (limit: 32768)
Memory: 77.9M
CGroup: /system.slice/libvirtd.service
├─2908 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper
├─2909 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper
└─5238 /usr/sbin/libvirtd
May 31 09:38:11 hadar libvirtd[5238]: internal error: Cannot find suitable emulator for x86_64
May 31 09:38:11 hadar libvirtd[5238]: internal error: Failed to start QEMU binary /usr/bin/qemu-system-i386 for probing: qemu-system-i386: cannot create PID file>
May 31 09:38:11 hadar libvirtd[5238]: Failed to probe capabilities for /usr/bin/qemu-system-i386: internal error: Failed to start QEMU binary /usr/bin/qemu-syste>
May 31 09:38:11 hadar libvirtd[5238]: internal error: Failed to start QEMU binary /usr/bin/qemu-system-x86_64 for probing: qemu-system-x86_64: cannot create PID >
May 31 09:38:11 hadar libvirtd[5238]: Failed to probe capabilities for /usr/bin/qemu-system-x86_64: internal error: Failed to start QEMU binary /usr/bin/qemu-sys>
May 31 09:38:11 hadar libvirtd[5238]: unknown procedure: 436
May 31 09:38:15 hadar libvirtd[5238]: internal error: Failed to start QEMU binary /usr/bin/qemu-system-i386 for probing: qemu-system-i386: cannot create PID file>
May 31 09:38:15 hadar libvirtd[5238]: Failed to probe capabilities for /usr/bin/qemu-system-i386: internal error: Failed to start QEMU binary /usr/bin/qemu-syste>
May 31 09:38:15 hadar libvirtd[5238]: internal error: Failed to start QEMU binary /usr/bin/qemu-system-x86_64 for probing: qemu-system-x86_64: cannot create PID >
May 31 09:38:15 hadar libvirtd[5238]: Failed to probe capabilities for /usr/bin/qemu-system-x86_64: internal error: Failed to start QEMU binary /usr/bin/qemu-sys>
Now, I'm desperate. Time to check the system logs ...
Code:
$ egrep -i 'err|warn' /var/log/syslog
...
May 31 09:38:15 hadar libvirtd[5238]: Failed to probe capabilities for /usr/bin/qemu-system-i386: internal error: Failed to start QEMU binary /usr/bin/qemu-system-i386 for probing: qemu-system-i386: cannot create PID file: Failed to write pid file
May 31 09:38:15 hadar libvirtd[5238]: internal error: Failed to start QEMU binary /usr/bin/qemu-system-x86_64 for probing: qemu-system-x86_64: cannot create PID file: Failed to write pid file
...
Code:
$ dft
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/vg01-root01 ext4 35G 5.8G 27G 18% /
/dev/nvme0n1p3 ext4 672M 145M 479M 24% /boot
/dev/nvme0n1p2 vfat 50M 6.1M 44M 13% /boot/efi
/dev/mapper/vg01-tmp01 ext4 3.9G 88K 3.7G 1% /tmp
/dev/mapper/vg01-var01 ext4 20G 1.7G 17G 9% /var
/dev/mapper/vg01-home01 ext4 9.8G 5.0G 4.3G 54% /home
/dev/mapper/vg01-libvirt--01 ext4 134G 131G 0 100% /var/lib/libvirt
/dev/mapper/vg--hadar-lv--backups ext4 459G 23G 436G 5% /Backups
Next error ...
Quote:
Try stopping AppArmor and then restart libvirtd and relaunch virt-manager
sudo systemctl stop apparmor
Switched to attempting to use virsh to add an exist VM:
Code:
$ virsh define /tmp/Win7Ult.xml
error: Failed to define domain from /tmp/Win7Ult.xml
error: internal error: Failed to start QEMU binary /usr/bin/kvm for probing: qemu-system-x86_64: cannot create PID file: Failed to write pid file
Some system basic information:
Code:
$ inxi -bz
System:
Kernel: 5.15.0-72-generic x86_64 bits: 64 Desktop: FVWM2 2.6.8
Distro: Ubuntu 20.04.6 LTS (Focal Fossa)
Machine:
Type: Desktop Mobo: ASUSTeK model: ROG STRIX B450-F GAMING v: Rev 1.xx
serial: <filter> UEFI: American Megatrends v: 5003 date: 02/03/2023
CPU:
6-Core: AMD Ryzen 5 5600G with Radeon Graphics type: MT MCP
speed: 4198 MHz min/max: 1400/4200 MHz
Graphics:
Device-1: AMD driver: amdgpu v: kernel
Display: x11 server: X.Org 1.20.13 driver: amdgpu,ati
unloaded: fbdev,modesetting,vesa resolution: 1920x1200~60Hz
OpenGL: renderer: AMD RENOIR (DRM 3.42.0 5.15.0-72-generic LLVM 12.0.0)
v: 4.6 Mesa 21.2.6
Network:
Device-1: Intel I211 Gigabit Network driver: igb
Info:
Processes: 359 Uptime: 1h 13m Memory: 30.72 GiB used: 2.25 GiB (7.3%) Shell: bash
inxi: 3.0.38
BIOS has SVR enabled.
Code:
$ kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used
I'm not stuck, but would appreciate some help. Think I've checked all the bonehead stuff, but I can do some really bonehead things. Discovered some permission problems in /var/lib/libvirt/. Fortunately, I have another 20.04 system running lots of VMs that has the correct permissions, which I've setup. libvirt-qemu:kvm
Ideas?