Unable to build a snap due to being unable to enable kvm

I am trying to build a snap, but it is giving the error:

Build environment is in unknown state, cleaning first.
info failed: The following errors occurred:
instance "snapcraft-graphwhiz" does not exist
launch failed: Cannot check BIOS for determining KVM extensions support.        
Unable to load KVM support. Please ensure KVM is installed on your machine.
An error occurred with the instance when trying to launch with 'multipass': returned exit code 2.
Ensure that 'multipass' is setup correctly and try again.

I know that my computer support KVM - when I run sudo /usr/sbin/kvm-ok I get

INFO: /dev/kvm does not exist
HINT:   sudo modprobe kvm_amd
INFO: Your CPU supports KVM extensions
INFO: KVM (svm) is disabled by your BIOS
HINT: Enter your BIOS setup and enable Virtualization Technology (VT),
      and then hard poweroff/poweron your system
KVM acceleration can NOT be used

I have MSI BIOS. From all the tutorials I could find, I need to configure SVM. I am supposed to do this through either OC -> CPU Configuration or Settings -> Advanced Settings -> CPU Configuration.

However, even though I have Settings -> Advanced settings that looks like the tutorials, and I also have an OC section that looks like the tutorials, neither of these contain a CPU Configuration sub-menu.

How do I enable KVM so that multipass can work, so that I can build my snap? Is there another way of building my snap without KVM?

you could use lxd instead of multipass … snapcraft has a --use-lxd option that will use an already set up lxd on your host …

Thank you! That worked!

1 Like