Bug 1714586 - new VM wizard reports kvm is not available
Summary: new VM wizard reports kvm is not available
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Virtualization Tools
Classification: Community
Component: virt-manager
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Cole Robinson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-28 11:29 UTC by ricky.tigg
Modified: 2020-01-26 19:08 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-01-26 19:08:16 UTC
Embargoed:


Attachments (Terms of Use)
KVM-warning message (21.50 KB, image/png)
2019-05-28 11:29 UTC, ricky.tigg
no flags Details
Output from "virsh capabilities" (7.37 KB, text/plain)
2019-07-19 09:08 UTC, ricky.tigg
no flags Details

Description ricky.tigg 2019-05-28 11:29:56 UTC
Created attachment 1574317 [details]
KVM-warning message

Description of problem: While a fresh instantiation was accomplished, opening virt-manager using Libvirt URI qemu:///system, then launching a guest creation process leads to a warning message.

Version-Release number of selected component: 2.1.0-2.fc30

Actual results: see virt-manager_2.1.0_error_KVM.png

Additional info: executed commands

# dnf -y install @virtualization
$ dnf list installed | grep kernel| grep module
kernel-modules.x86_64                 5.0.9-301.fc30                  @anaconda       
kernel-modules.x86_64                 5.0.17-300.fc30                 @updates        
kernel-modules-extra.x86_64           5.0.9-301.fc30                  @anaconda       
kernel-modules-extra.x86_64           5.0.17-300.fc30                 @updates        
$ dnf list installed | grep kvm
libvirt-daemon-kvm.x86_64             5.1.0-6.fc30                    @updates        
qemu-kvm.x86_64                       2:3.1.0-8.fc30                  @updates 

Under Gnome on Wayland:

$ LANG=C sudo virt-manager
[yk@localhost ~]$ No protocol specified
Unable to init server: Could not connect: Connection refused
No protocol specified
Unable to init server: Could not connect: Connection refused
No protocol specified
Unable to init server: Could not connect: Connection refused

(virt-manager:11392): Gtk-WARNING **: 14:23:52.453: cannot open display: :0

Comment 1 Cole Robinson 2019-06-16 15:25:44 UTC
Does rebooting fix it? I'm trying to determine if this is a first-install issue or if your machine does not actually support kvm

Comment 2 ricky.tigg 2019-07-19 08:51:15 UTC
Hi. That issue did not use to be produced in the past on the hardware on which it now occurs.

$ cat /proc/cpuinfo | sed -n "2p;20,21p" | grep -E 'vendor| lm|vmx|bugs'
vendor_id	: GenuineIntel
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl cpuid aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm pti tpr_shadow vnmi flexpriority dtherm ida
bugs		: cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds

Comment 3 Daniel Berrangé 2019-07-19 08:53:56 UTC
Can you run  "virt-host-validate qemu" as root & attach its output. Also run "virsh capabilities" as root & again attach its output.

Comment 4 ricky.tigg 2019-07-19 09:08:45 UTC
Created attachment 1591936 [details]
Output from "virsh capabilities"

$ virt-host-validate qemu
  QEMU: Checking for hardware virtualization                                 : PASS
  QEMU: Checking if device /dev/kvm exists                                   : FAIL (Check that the 'kvm-intel' or 'kvm-amd' modules are loaded & the BIOS has enabled virtualization)
  QEMU: Checking if device /dev/vhost-net exists                             : PASS
  QEMU: Checking if device /dev/net/tun exists                               : PASS
  QEMU: Checking for cgroup 'cpu' controller support                         : PASS
  QEMU: Checking for cgroup 'cpuacct' controller support                     : PASS
  QEMU: Checking for cgroup 'cpuset' controller support                      : PASS
  QEMU: Checking for cgroup 'memory' controller support                      : PASS
  QEMU: Checking for cgroup 'devices' controller support                     : PASS
  QEMU: Checking for cgroup 'blkio' controller support                       : PASS
  QEMU: Checking for device assignment IOMMU support                         : PASS
  QEMU: Checking if IOMMU is enabled by kernel                               : WARN (IOMMU appears to be disabled in kernel. Add intel_iommu=on to kernel cmdline arguments)

# virsh capabilities > virsh_capabilities

Comment 5 Daniel Berrangé 2019-07-19 09:13:30 UTC
The FAIL line confirms the problem from libvirt's POV - please ensure the kvm-intel module is loaded & that the /dev/kvm device exists after loading.

Comment 6 ricky.tigg 2019-07-19 09:36:20 UTC
Checked that BIOS has enabled virtualization.

# lsmod | grep -i kvm-intel
# modprobe kvm-intel
modprobe: ERROR: could not insert 'kvm_intel': Operation not supported

Comment 7 Daniel Berrangé 2019-07-19 09:49:39 UTC
Check your kernel log messages for any further info.

Comment 8 ricky.tigg 2019-07-26 12:25:28 UTC
Relevant information could be:

$ LANG=C sudo cat /var/log/boot.log | grep FAILED | head -n 1
[FAILED] Failed to start TCG Core Services Daemon.
$ LANG=C journalctl -b | grep -i kvm
Jul 26 14:39:32 localhost.localdomain kernel: kvm: disable TXT in the BIOS or activate TXT before enabling KVM
Jul 26 14:39:32 localhost.localdomain kernel: kvm: disabled by bios

Comment 9 Daniel Berrangé 2019-07-26 12:28:23 UTC
Ok, so its blocked by BIOS as suspected.

Comment 10 ricky.tigg 2019-07-26 14:28:08 UTC
I did a whole procedure in the BIOS according to the previous instructions. nevertheless that warming message is still exhibited. In the BIOS interface of the computer I use, there is a mention regarding option Trusted Execution (TXT): "The TPM Virtualization Technology (TPM VT) and Virtualization Technology for I/O (VT for I/O) must be enabled to use this feature."

How would you proceed? Leaving in BIOS those four options, one related to TPM –here as 1.2– ,three to virtualization, in their actual state, selected, then in the system disabling KVM?  What could be then that "KVM" it is referred to; a service –which means libvirtd–, module?

$ ps -aux | grep -Ei 'libvirtd|kvm' | head -n 1
root       907  0.0  1.1 1564212 45472 ?       Ssl  16:32   0:00 /usr/sbin/libvirtd

$ lsmod | grep -i kvm
kvm                   741376  0
irqbypass              16384  1 kvm

Comment 11 ricky.tigg 2019-07-26 17:49:10 UTC
Disabling TXT in BIOS while package-group Virtualization is installed suppresses the involved message.

Steps to reproduce to confirm the issue:
1.
$ LANG=C systemctl status tcsd | tail -n 5
Jul 26 20:03:50 localhost.localdomain systemd[1]: Starting TCG Core Services Daemon...
Jul 26 20:03:50 localhost.localdomain tcsd[3110]: TCSD TDDL[3110]: TrouSerS ioctl: (25) Inappropriate ioctl for device
Jul 26 20:03:50 localhost.localdomain tcsd[3110]: TCSD TDDL[3110]: TrouSerS Falling back to Read/Write device support.
Jul 26 20:03:50 localhost.localdomain systemd[1]: Started TCG Core Services Daemon.
Jul 26 20:03:50 localhost.localdomain TCSD[3117]: TrouSerS trousers 0.3.13: TCSD up and running.

2.
# dnf -qy remove @virtualization && dnf clean all && reboot

3. In BIOS disable TXT, then enable it, by applying change at each operation. Boot the system;
4. Execute command at step 1; Errors are no more present
5.
# dnf -qy install @virtualization

6. Execute command at step 1; Errors are once more present.
7. Open new VM wizard; it reports once more kvm is not available.

Comment 12 Cole Robinson 2020-01-26 19:08:16 UTC
If KVM is not loading, then that is the authoritative answer that your BIOS is not advertising virt support. Either the kernel has a bug or your bios firmware does. It's unlikely this is an issue with virt-manager or libvirt


Note You need to log in before you can comment on or make changes to this bug.