QEMU/KVM with 3D accelerated desktop on Ubuntu

(Comments)

I've been try to get QEMU/KVM working with accelerated 3D desktop for a while but I've always run into trouble. Now that most standard desktop Linux images use 3D graphics, and also browsers, it's a bit annoying if you want to test something out in a VM and it's really slow.

So when reading https://www.collabora.com/news-and-blog/blog/2018/02/12/virtualizing-gpu-access/ by Robert Foss I decided to give it another go. And this time it worked great!

Unfortunately the QEMU packages on Ubuntu are compiled with virglrenderer disabled. However it's quite easy to enable, so I thought I'd upload some packages to my PPA if anyone's interested:

https://launchpad.net/~ernstp/+archive/ubuntu/virgl

That's all you need. And here's a (slightly modified) copy of Robert's instructions for using it:

wget http://releases.ubuntu.com/17.10/ubuntu-17.10.1-desktop-amd64.iso
qemu-img create -f qcow2 ubuntu.qcow2 10G
qemu-system-x86_64 \
-show-cursor \ -enable-kvm -M q35 -smp 2 -m 4G \ -drive file=ubuntu.qcow2,if=virtio \ -net nic,model=virtio \ -net user,hostfwd=tcp::2222-:22 \ -vga virtio \ -display sdl,gl=on \ -boot d -cdrom ubuntu-17.10.1-desktop-amd64.iso
Currently unrated

Comments

Recent Tweets


Recent Posts

Archive

2018
2016
2015

Categories

Tags

Authors

Feeds

RSS / Atom