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:
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 \Share on Twitter Share on Facebook
-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
How mad at your CSS do you have to be to add 274 zeroes to your z-index? https://t.co/N0UKEyaTI3
2 days, 7 hours ago
Trump just looked up to the sky and said “I am the chosen one.” A reminder that he’s completely insane, and unfit f… https://t.co/kLxXobuaJg
3 days, 4 hours ago
I have no idea which genius made it, but it was worth the creation of Monty Python for this alone. It’s perfect.… https://t.co/ewNkCAmWLj
6 days, 14 hours ago