GliderJan Varho

Increasing Display Resolution in Virtual Machine Manager

  • Bash
  • KVM
  • Linux
  • resolution
  • script
  • virt-manager
  • virtual
  • virtualization

With KVM you can use a high resolution by passing kvm the -vga std parameter (or -std-vga before KVM-77). When using virt-manager to manage virtual machine guests, there is no option to change display resolution. However, it is possible to work around it as follows.

First, create a bash script that adds the argument to a kvm call: #!/bin/bash kvm [email protected] -vga std

Put it at, say, /usr/bin/qemu-kvm and make it executable: chmod +x qemu-kvm sudo install qemu-kvm /usr/bin/

Then make virt-manager (libvirt) use that instead of kvm. Unfortunately, I haven't found a way to change it system-wide, but it can be changed for individual virtual machines by editing the corresponding XML file in ~/.libvirt/qemu. Or for all at once: for i in `ls ~/.libvirt/qemu/*.xml`; do sed -i "s/\/usr\/bin\/kvm/\/usr\/bin\/qemu-kvm/" $i; done

(I think I read most of this from somewhere, but can no longer find the reference.)