I use Gitlab CI to build an Android app and automatically run tests on an Android Virtual Device (AVD).
I would like to use the x86 version of this emulator instead of the ARM one.
But an x86 AVD currently requires virtualization (VT) and KVM properly installed and loaded.
All this runs in a Docker container on a DigitalOcean host.
'lscpu' shows VT is enabled for an Intel processor :
Model name: Intel(R) Xeon(R) CPU E5-2650L v3 @ 1.80GHz
Virtualization: VT-x
Hypervisor vendor: KVM
Virtualization type: full
I therefore installed qemu-kvm and other related debian packages :
export DEBIAN_FRONTEND=noninteractive
apt-get --quiet update --yes
apt-get --quiet install --yes qemu-kvm libvirt-bin virtinst bridge-utils
adduser 'id -un' libvirt
Then 'virt-host-validate' shows kvm-intel is not loaded :
$ virt-host-validate
QEMU: Checking for hardware virtualization : PASS
QEMU: Checking for device /dev/kvm : FAIL (Check that the 'kvm-intel' or 'kvm-amd' modules are loaded & the BIOS has enabled virtualization)
QEMU: Checking for device /dev/vhost-net : PASS
QEMU: Checking for device /dev/net/tun : PASS
LXC: Checking for Linux >= 2.6.26 : PASS
ERROR: Job failed: exit code 1
But, adding 'modprobe kvm-intel' fails :
$ modprobe kvm-intel
modprobe: ERROR: ../libkmod/libkmod.c:557 kmodsearchmoddep() could not open moddep file '/lib/modules/4.9.16-coreos-r1/modules.dep.bin'
And neither :
$ depmod
depmod: ERROR: could not open directory /lib/modules/4.9.16-coreos-r1: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
ERROR: Job failed: exit code 1
Nor :
$ apt-get install --reinstall linux-image-'uname -r'
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package linux-image-4.9.16-coreos-r1
E: Couldn't find any package by regex 'linux-image-4.9.16-coreos-r1'
...does solve the problem. Any idea on how I can get kvm-intel loaded ?
Kind regards,
Laurent Le Moux
uname -r
--yes' fails with the following error : E: Unable to locate package linux-headers-4.9.16-coreos-r1 I tried to use another image/header. 'kvm-intel.ko' is then installed but can not be loaded. Using 'insmod -f' fails because of an 'invalid module format'. I'm stuck. I would really appreciate if anyone could help. – Laurent Le Moux