'Domain requires KVM, but it is not available. Check that virtualization is enabled in the host BIOS

Unable to power on VM from foreman. I could create the VM but it gives me below error when trying to power on. I could see that the VM is created in host. Failed to start abc.sdnlab.com: Call to virDomainCreateWithFlags failed: unsupported configuration: Domain requires KVM, but it is not available. Check that virtualization is enabled in the host BIOS, and host configuration is setup to load the kvm modules.

I have checked that kvm kernel module is loaded. Any idea what can be done?



Solution 1:[1]

You need to check in BIOS and enable virtualization there ( I think it should be there under Security section).

The, do this to verify kvm module is loaded. #lsmod | grep kvm

if kvm module is not loaded, you need to do #modprobe kvm

Check whether kvm is properly loaded, using #dmesg.

PS: You may need to check whether libvirtd daemon is running. (For this you need to start, libvirtd daemon). I think it is "service libvirtd start"

Solution 2:[2]

I got fix for this issue : the details of the issue fix are as follows :

KVM Software tools should be on the controller

patterns-sles-kvm_server - KVM Host Server 12-58.8

patterns-sles-kvm_server-32bit - KVM Host Server

patterns-sles-kvm_tools - KVM Virtualization Host and tools

patterns-sles-kvm_tools-32bit - KVM Virtualization Host and tools

qemu-kvm - Kernel-based Virtual Machine

virt-v2v - Convert a virtual machine to run on KVM

yast2-vm - Configure Hypervisor and Tools for Xen and KVM

check the hardware requirement as mentioned below:

1.1. Hardware Requirements¶ Currently, SUSE only supports KVM full virtualization on x86_64 hosts. KVM is designed around hardware virtualization

features included in AMD (AMD-V) and Intel (VT-x) CPUs. It supports virtualization features of chipsets, and PCI devices,

such as an I/O Memory Mapping Unit (IOMMU) and Single Root I/O Virtualization (SR-IOV)).

You can test whether your CPU supports hardware virtualization with the following command:

egrep '(vmx|svm)' /proc/cpuinfo If this command returns no output, your processor either does not support hardware virtualization, or this feature has been disabled in the BIOS.

The following Web site identifies processors which support hardware virtualization:

how to enable the vx-t in virtual machine :

https://forum.ivorde.com/kvm-nested-in-vmware-esxi-5-5-enable-guest-hypervisor-vmx-svm-flags-without-vsphere-web-client-

t19773.html

GO to the VMS vmdk folders and edit .vmx file and add the following flag in that file and save it.

vhv.enable = "TRUE"

Follow the commands below to restart the VM and reboot the machine.

/vmfs/volumes/53071ba5-6f9682d4-5898-002590883ef6/SLES 12 VM # vim-cmd vmsvc/getallvms | grep -i sles 15 SLES-82 [datastore1] SLES 1/SLES 1.vmx sles11_64Guest vmx-08
59 SLES 12 VM [datastore1] SLES 12 VM/SLES 12 VM.vmx sles11_64Guest vmx-08
/vmfs/volumes/53071ba5-6f9682d4-5898-002590883ef6/SLES 12 VM # vim-cmd vmsvc/reload 59 /vmfs/volumes/53071ba5-6f9682d4-5898-002590883ef6/SLES 12 VM #

Reboot your machine and try to start your controller it will work.

Thanks Nagesh

Solution 3:[3]

I just came across this issue after a BIOS update - the kvm module was loaded (& could be removed & re-inserted) - libvirtd was crashed with the error 'KVM is not available' - checking /dev/kvm it did not exist which is the clue.

The solution in my case on an AMD system was to enable svm (virtualization) in the BIOS. I had enabled it before & the BIOS rebooted itself a couple of times after the update & must have reset it back to off (the default).

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 kumar
Solution 2 Nagesh HS
Solution 3 Stuart Cardall