How to increase the visualized screen resolution on QEMU / KVM?

Add the '-vga std' flag to the command line

Basically, the virtual machine loads its own virtual driver. Hardware virtualization is necessary because virtual disk images are often copied to many different systems with diverse architectures. By abstracting the hardware the vm images are capable of doing this.

By using the '-vga std' flag you make the GuestOS load a standard VGA device that should be able to support resolution equal-to-or-greater than your physical card can handle.

For more info check out this article.

Note: If you're using an older version of kvm/qemu the you might need to use the '-std-vga' flag instead.

If you aren't able to reach resolutions greater than 1600x1200 note that there are still some issues with this option.


-vga virtio

Using this option allows me to go all the way up to 4096 x 2160.

Of course, this is useless since my display only goes up to 1080p, so I set 1080p.

Then you can toggle fullscreen with Ctrl + Alt + F, or by passing -full-screen.

How I guessed it: virtio in general means: simulate a generic convenient VM machine without normal hardware restrictions.

Tested with this exact setup: https://askubuntu.com/questions/884534/how-to-run-ubuntu-16-04-desktop-on-qemu/1046792#1046792

As explained there, QEMU has a feature which automatically updates the resolution as you increase the host window size e.g. by dragging the borders with your mouse. But it also works if you go into the guest Ubuntu resolution settings. But if you select a huge guest resolution with a tiny host window, that will of course be useless (QEMU will have to sample multiple pixels into one), so generally you just want to let QEMU automatically scale for you.

This screenshot shows how my guest could go up to 4k:

enter image description here


Use the vmvga Video Card

I use virt-manager (as I'm a complete noob to kvm and libvirt).

I was able to get higher resolutions on a Windows 7 guest by changing the video card from vga to vmvga in the virtual machine's settings window.