Is it possible to use crosvm in incus?

The AOSP Cuttlefish emulator uses KVM for virtualization via crosvm, but when running it in Incus, it displays the error message:

[… ERROR crosvm] exiting with error 1: no enabled hypervisor

Does anyone understand the principle behind crosvm’s detection of KVM support, or whether such nested virtualization is feasible in an Incus container?

Try incus config device add NAME kvm unix-char path=/dev/kvm

Thanks, and the error now

[ERROR crosvm] exiting with error 1: failed to open KVM device /dev/kvm
Caused by:Permission denied (os error 13)

After executing the above command

In container

itviewer@ubuntu24:~/Downloads/cf$ ll /dev/kvm 
crw-rw---- 1 root root 10, 232 Dec  4 15:05 /dev/kvm

In host

itviewer@JackMa:~/Downloads/cf$ ll /dev/kvm 
crw-rw----+ 1 root kvm 10, 232 Dec  4 13:48 /dev/kvm

So all I need to do is modify the user group attributes?

After executing sudo chown root:kvm /dev/kvm

[ERROR base::sys::linux::netlink] Received not a generic netlink controller msg
[ERROR devices::acpi] Did not find group_id corresponding to acpi_mc_group

Maybe try this. Inside container check what GID the kvm group has:

getent group kvm

Then check if your user inside container belongs to that group. If not:

sudo usermod -a -G kvm $LOGNAME

On the host, pass kvm to the container with the GID from the first command:

incus config device add <instance_name> kvm unix-char source=/dev/kvm path=/dev/kvm gid=993

Finally, restart your container.