docker run -it -v /tmp/.X11-unix/:/tmp/.X11-unix -it -e DISPLAY=$DISPLAY --device /dev/kvm:/dev/kvm imagename
The key parts are bind mounting the /tmp/.X11-unix socket and setting the DISPLAY env in the container with -e and "--device /dev/kvm:/dev/kvm" which sets the /dev/kvm and associated cgroups. You can now use KVM inside Docker and with a GUI!