Docker Community Forums

Share and learn in the Docker community.

Emulator: CPU Acceleration: DISABLED -> Starting emulator inside docker image on ubuntu

Hi All,
I am trying to start the emulator kvm installed machine but getting below error.

inside startup
INFO: /dev/kvm exists
KVM acceleration can be used

  • Starting libvirt management daemon libvirtd [ OK ]
  • Checking status of libvirt management daemon libvirtd [ OK ]
    Warning: Observed package id ‘build-tools;25.0.0’ in inconsistent location ‘/home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/build-tools/android-7.1.2’ (Expected ‘/home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/build-tools/25.0.0’)
    Warning: Observed package id ‘platforms;android-25’ in inconsistent location ‘/home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/platforms/android-7.1.2’ (Expected ‘/home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/platforms/android-25’)
    Warning: Observed package id ‘system-images;android-25;default;armeabi-v7a’ in inconsistent location ‘/home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/system-images/android-7.1.2/armeabi-v7a’ (Expected ‘/home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/system-images/android-25/default/armeabi-v7a’)
    Warning: Observed package id ‘system-images;android-25;default;x86’ in inconsistent location ‘/home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/system-images/android-7.1.2/x86’ (Expected ‘/home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/system-images/android-25/default/x86’)
    Parsing /home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/build-tools/27.0.3/package.xmlParsing /home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/build-tools/android-7.1.2/package.xmlParsing /home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/emulator/package.xmlParsing /home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/extras/android/support/package.xmlParsing /home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/patcher/v4/package.xmlParsing /home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/platform-tools/package.xmlParsing /home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/platforms/android-7.1.2/package.xmlParsing /home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/samples/android-7.1.2/package.xmlParsing /home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/system-images/android-7.1.2/armeabi-v7a/package.xmlParsing /home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/system-images/android-7.1.2/x86/package.xmlParsing /home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/tools/package.xmlemulator: Android emulator version 30.0.12.0 (build_id 6466327) (CL:N/A)
    emulator: Found AVD name ‘JENKINS_AVD’
    emulator: Found AVD target architecture: x86
    emulator: argv[0]: ‘/home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/emulator/emulator’; program directory: ‘/home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/emulator’
    emulator: Found directory: /home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/system-images/android-7.1.2/x86/

emulator: emuDirName: ‘/home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/emulator’
emulator: Found directory: /home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/system-images/android-7.1.2/x86/

emulator: Probing for /home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/system-images/android-7.1.2/x86//kernel-ranchu-64: file missing
emulator: try dir /home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/emulator
emulator: Trying emulator path ‘/home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/emulator/qemu/linux-x86_64/qemu-system-i386-headless’
emulator: Found target-specific 64-bit emulator binary: /home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/emulator/qemu/linux-x86_64/qemu-system-i386-headless
emulator: Adding library search path: ‘/home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/emulator/lib64’
emulator: Adding library search path: ‘/home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/emulator/lib64/gles_angle’
emulator: Adding library search path: ‘/home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/emulator/lib64/gles_angle9’
emulator: Adding library search path: ‘/home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/emulator/lib64/gles_angle11’
emulator: Adding library search path: ‘/home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/emulator/lib64/gles_swiftshader’
emulator: Adding library search path: ‘/home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/emulator/lib64/libstdc++’
emulator: Running :/home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/emulator/qemu/linux-x86_64/qemu-system-i386-headless
emulator: qemu backend: argv[00] = “/home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/emulator/qemu/linux-x86_64/qemu-system-i386-headless”
emulator: qemu backend: argv[01] = “-verbose”
emulator: qemu backend: argv[02] = “@JENKINS_AVD
emulator: qemu backend: argv[03] = “-no-audio”
emulator: qemu backend: argv[04] = “-no-snapshot”
emulator: qemu backend: argv[05] = “-no-window”
emulator: qemu backend: argv[06] = “-gpu”
emulator: qemu backend: argv[07] = “on”
emulator: qemu backend: argv[08] = “-cores”
emulator: qemu backend: argv[09] = “4”
emulator: Concatenated backend parameters:
/home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/emulator/qemu/linux-x86_64/qemu-system-i386-headless -verbose @JENKINS_AVD -no-audio -no-snapshot -no-window -gpu on -cores 4
emulator: autoconfig: -skin 1920x1080
emulator: autoconfig: -skindir (null)
emulator: autoconfig: -kernel /home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/system-images/android-7.1.2/x86//kernel-ranchu
emulator: Target arch = ‘x86’
emulator: Auto-config: -qemu -cpu qemu32
emulator: Auto-detect: Kernel image requires new device naming scheme.
emulator: Auto-detect: Kernel does not support YAFFS2 partitions.
emulator: autoconfig: -ramdisk /home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/system-images/android-7.1.2/x86//ramdisk.img
emulator: Using initial system image: /home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/system-images/android-7.1.2/x86//system.img
emulator: Using initial vendor image: /home/jenkins/p4/nemo/android-sdk/sw/02.0/dev/linux/system-images/android-7.1.2/x86//vendor.img
emulator: autoconfig: -initdata /root/.android/avd/JENKINS_AVD.avd/userdata.img
emulator: autoconfig: -cache /root/.android/avd/JENKINS_AVD.avd/cache.img
emulator: Increasing RAM size to 1024MB
emulator: VM heap size 0MB is below hardware specified minimum of 256MB,setting it to that value
emulator: System image is read only
emulator: Found 2 DNS servers: 8.8.8.8 8.8.4.4
emulator: found magic skin width=1920 height=1080 bpp=16

emulator: VERBOSE: System.cpp:2346: statvfs(’/root/.android/avd/JENKINS_AVD.avd/snapshots/default_boot/ram.img’) failed: No such file or directory

emulator: Creating: /root/.android/avd/JENKINS_AVD.avd/userdata-qemu.img by copying from /root/.android/avd/JENKINS_AVD.avd/userdata.img

emulator: WARNING: encryption is off
emulator: Creating empty ext4 cache partition: /root/.android/avd/JENKINS_AVD.avd/cache.img
Creating filesystem with parameters:
Size: 69206016
Block size: 4096
Blocks per group: 32768
Inodes per group: 4224
Inode size: 256
Journal blocks: 1024
Label:
Blocks: 16896
Block groups: 1
Reserved block group size: 7
Created filesystem with 11/4224 inodes and 1302/16896 blocks
emulator: CPU Acceleration: DISABLED
emulator: CPU Acceleration status: This user doesn’t have permissions to use KVM (/dev/kvm).
The KVM line in /etc/group is: [kvm:x:104:root]

If the current user has KVM permissions,
the KVM line in /etc/group should end with “:” followed by your username.

If we see LINE_NOT_FOUND, the kv
emulator: ERROR: x86 emulation currently requires hardware acceleration!
Please ensure KVM is properly installed and usable.
CPU acceleration status: This user doesn’t have permissions to use KVM (/dev/kvm).
The KVM line in /etc/group is: [kvm:x:104:root]

If the current user has KVM permissions,
the KVM line in /etc/group should end with “:” followed by your username.

If we see LINE_NOT_FOUND, the kv
More info on configuring VM acceleration on Linux:
https://developer.android.com/studio/run/emulator-acceleration#vm-linux
General information on acceleration: https://developer.android.com/studio/run/emulator-acceleration.

And i am starting the emulator with following command:

EMULATOR -verbose @JENKINS_AVD -no-audio -no-snapshot -no-window -gpu off -cores 4