Uploaded May 2020 | Updated September 2026, 10 hours ago
In this video we compile a custom version of QEMU with virgl enabled
to get better graphics performance for Android 9 pie x86 virtual machine.
PUBG mobile running in this Android x86 virtual machine:
youtu.be/Z4vL03g37w0
Virgl:
virgil3d.github.io
Subscribe: youtube.com/user/linuxleech?sub_confirmation=1
Install dependencies:
sudo apt install -y build-essential libepoxy-dev libdrm-dev libgbm-dev libx11-dev libvirglrenderer-dev libpulse-dev libsdl2-dev libgtk-3-dev
Download qemu 3.1.1.1:
download.qemu.org/qemu-3.1.1.1.tar.bz2
Within the build directory that we just created:
../configure --with-sdlabi=2.0 --enable-sdl --enable-opengl --enable-virglrenderer --enable-system --enable-modules --audio-drv-list=pa --target-list=x86_64-softmmu --enable-kvm --enable-gtk
Once configuration has completed run make to compile QEMU
make
Install qemu-utils to get qemu-img:
sudo apt install qemu-utils
Make our virtual hard disk:
qemu-img create -f qcow2 Android9.img 12G
Add your user to kvm group:
sudo adduser $USER kvm
Add a udev rule for KVM in /lib/udev/rules.d/99-kvm.rules
KERNEL=="kvm", GROUP="kvm", MODE="0666"
Download android x86
android-x86.org/download.html
Create our first virtual machine to install android x86 in:
./x86_64-softmmu/qemu-system-x86_64 -boot d -cdrom "android-x86_64-9.0-r2.iso" -enable-kvm -smp 2 -device virtio-vga,virgl=on -net nic -net user,hostfwd=tcp::5555-:22 -cpu host -soundhw es1370 -m 2048 -display sdl,gl=on -hda Android9.img
After installation boot the VM without the cd-rom drive and tell QEMU to boot
from the disk that we created:
./x86_64-softmmu/qemu-system-x86_64 -boot c -enable-kvm -smp 2 -device virtio-vga,virgl=on -net nic -net user,hostfwd=tcp::5555-:22 -cpu host -soundhw es1370 -m 2048 -display sdl,gl=on -hda Android9.img
To see if virgl is working within the VM:
Inside of the android vm open terminal emulator and type:
dmesg | grep virgl
-------------------------------------------------------------------------------
To remove all of the work we have done from your system.
To remove qemu 3.1.1.1 just delete the qemu3.1.1.1 directory.
remove the dependencies
sudo apt remove -y build-essential libepoxy-dev libdrm-dev libgbm-dev libx11-dev libvirglrenderer-dev libpulse-dev libsdl2-dev libgtk-3-dev
#kvm #virgl #androidx86
Blog: linuxleech.com
Twitter: twitter.com/linuxleech
Facebook: facebook.com/linuxleech
In this video we compile a custom version of QEMU with virgl enabled
to get better graphics performance for Android 9 pie x86 virtual machine.
PUBG mobile running in this Android x86 virtual machine:
youtu.be/Z4vL03g37w0
Virgl:
virgil3d.github.io
Subscribe: youtube.com/user/linuxleech?sub_confirmation=1
Install dependencies:
sudo apt install -y build-essential libepoxy-dev libdrm-dev libgbm-dev libx11-dev libvirglrenderer-dev libpulse-dev libsdl2-dev libgtk-3-dev
Download qemu 3.1.1.1:
download.qemu.org/qemu-3.1.1.1.tar.bz2
Within the build directory that we just created:
../configure --with-sdlabi=2.0 --enable-sdl --enable-opengl --enable-virglrenderer --enable-system --enable-modules --audio-drv-list=pa --target-list=x86_64-softmmu --enable-kvm --enable-gtk
Once configuration has completed run make to compile QEMU
make
Install qemu-utils to get qemu-img:
sudo apt install qemu-utils
Make our virtual hard disk:
qemu-img create -f qcow2 Android9.img 12G
Add your user to kvm group:
sudo adduser $USER kvm
Add a udev rule for KVM in /lib/udev/rules.d/99-kvm.rules
KERNEL=="kvm", GROUP="kvm", MODE="0666"
Download android x86
android-x86.org/download.html
Create our first virtual machine to install android x86 in:
./x86_64-softmmu/qemu-system-x86_64 -boot d -cdrom "android-x86_64-9.0-r2.iso" -enable-kvm -smp 2 -device virtio-vga,virgl=on -net nic -net user,hostfwd=tcp::5555-:22 -cpu host -soundhw es1370 -m 2048 -display sdl,gl=on -hda Android9.img
After installation boot the VM without the cd-rom drive and tell QEMU to boot
from the disk that we created:
./x86_64-softmmu/qemu-system-x86_64 -boot c -enable-kvm -smp 2 -device virtio-vga,virgl=on -net nic -net user,hostfwd=tcp::5555-:22 -cpu host -soundhw es1370 -m 2048 -display sdl,gl=on -hda Android9.img
To see if virgl is working within the VM:
Inside of the android vm open terminal emulator and type:
dmesg | grep virgl
-------------------------------------------------------------------------------
To remove all of the work we have done from your system.
To remove qemu 3.1.1.1 just delete the qemu3.1.1.1 directory.
remove the dependencies
sudo apt remove -y build-essential libepoxy-dev libdrm-dev libgbm-dev libx11-dev libvirglrenderer-dev libpulse-dev libsdl2-dev libgtk-3-dev
#kvm #virgl #androidx86
Blog: linuxleech.com
Twitter: twitter.com/linuxleech
Facebook: facebook.com/linuxleech










