Xorg.conf for QEMU/KVM

Page Trail: [[ Xorg.conf for QEMU/KVM ]]
2009-06-30 22:02

If you want to use a large resolution with a QEMU or KVM virtual machine, you'll need to manually specify a few things in xorg.conf.

Out of the box, you can usually only use resolutions up to 800x600, although Fedora and Ubuntu have patched this up to 1024x768.

I created this xorg.conf to work with larger resolutions. With it, I was able to use up to 1280x1024 with the default emulated graphics and up to 1920x1200 when passing the -std-vga option to QEMU or KVM.

To make use of this:

  1. Back up your existing /etc/X11/xorg.conf in your virtual machine, if any.
  2. Save the file to /etc/X11/xorg.conf in your virtual machine:
    sudo wget -O /etc/X11/xorg.conf \
    https://ongardie.net/var/blog/qemu-xorg/xorg.conf
    
  3. If you want to use a resolution other than 1280x1024, modify the Modes line to suit your needs.
  4. Start or restart your virtual machine's X server.

If you're having problems, try passing QEMU/KVM the -std-vga flag.