Hans de Goede (hansdegoede) wrote,
Hans de Goede

Much improved multiple monitor support for Linux guests now available in Fedora-18+

Hi all,

So far if you wanted to configure a Linux guest with multiple monitors this required adding multiple qxl cards to the vm and manually putting an xorg.conf in place.

Since Fedora-18 however Spice supports having multiple monitors on a single qxl device, so with any Linux vm you can now easily add / remove / resize monitors on the fly, depending on your configuration you may need some small tweaks to enable this on the guest and host side.

  1. On the guest side F-19 should work out of the box, in F-18 the xorg-x11-drv-qxl driver was build against an older spice-protocol package, causing it to not have support for this new feature enabled, this is fixed in this build: http://koji.fedoraproject.org/koji/buildinfo?buildID=422914 , which will hit updates-testing soon: https://admin.fedoraproject.org/updates/xorg-x11-drv-qxl-0.1.0-2.fc18?_csrf_token=bef3ee718fbf6ddde4d40197a7f4c9c83a5d5110 in the mean time you can install it inside your Fedora-18 guest from koji if you want to test this feature

  2. On the host side the qxl device in vms created in F-18 report itself with a pci-revision of 3, where as a revision of 4 indicates support for this new feature. But qemu in F-18+ does support this feature, we simply need to tell it to advertise this to the guest. Do to this do "virsh edit <vm-name>" and then at the top of the xml change the "<domain type='...  >" line to:

        <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>

          and add the following at the end, above the "</domain>" line:

              <qemu:arg value='-global'/>
              <qemu:arg value='qxl-vga.revision=4'/>


          Note this is not necessary for vms created in F-19

To use this new feature, shut off and then power on the vm, then connect to the vm using remote-viewer. ie: "remote-viewer spice://localhost:5900", and log into an X-session. Once logged into the X-session, go to the "View -> Displays" menu, you can now enable additional monitors there. Also note that you can freely resize all the client windows and the guest monitors will be adjusted to match the client window size(s).

Enjoy! And please let us know about any issues you find.
Tags: fedora, qemu, spice

  • Post a new comment


    Comments allowed for friends only

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened