Make KVM use the QXL vga driver with SPICE
authorAndrea Spadaccini <spadaccio@google.com>
Wed, 7 Sep 2011 12:25:14 +0000 (13:25 +0100)
committerAndrea Spadaccini <spadaccio@google.com>
Wed, 7 Sep 2011 13:14:42 +0000 (14:14 +0100)
Enable by default the QXL paravirtualized graphic card if SPICE is
enabled. The QXL driver is VESA compatible, so it degrades gracefully if
the guest OS does not have QXL drivers.

Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

lib/hypervisor/hv_kvm.py

index 5546ac0..19a9bf9 100644 (file)
@@ -1026,6 +1026,9 @@ class KVMHypervisor(hv_base.BaseHypervisor):
       logging.info("KVM: SPICE will listen on port %s", instance.network_port)
       kvm_cmd.extend(["-spice", spice_arg])
 
+      # Tell kvm to use the paravirtualized graphic card, optimized for SPICE
+      kvm_cmd.extend(["-vga", "qxl"])
+
     if hvp[constants.HV_USE_LOCALTIME]:
       kvm_cmd.extend(["-localtime"])