Appendix B. Configuring Red Hat Enterprise Linux 5.4 or Higher Virtual Machines to Use SPICE

SPICE is a remote display protocol designed for virtual environments, which enables you to view a virtualized desktop or server. SPICE delivers a high quality user experience, keeps CPU consumption low, and supports high quality video streaming.
Using SPICE on a Linux machine significantly improves the movement of the mouse cursor on the console of the virtual machine. To use SPICE, the X-Windows system requires additional qxl drivers. The qxl drivers are provided with Red Hat Enterprise Linux 5.4 and higher. Older versions are not supported. Installing SPICE on a virtual machine running Red Hat Enterprise Linux significantly improves the performance of the GUI.

Note

Typically, this is most useful for virtual desktops where the user requires the use of the GUI. System administrators who are creating virtual servers may prefer not to configure SPICE if their use of the GUI is minimal.

Procedure B.1. How to install the qxl drivers

  1. Log in to the Red Hat Enterprise Linux Virtual Machine.
  2. Open a terminal.
  3. Run
    # yum install xorg-x11-drv-qxl
    This installs the qxl drivers. They must now be configured.

How to configure the qxl drivers

There are two ways to configure the qxl drivers. Perform only one of the following procedures:
  • Procedure B.2. How to configure qxl drivers in GNOME

    1. Click System.
    2. Click Administration.
    3. Click Display.
    4. Click the Hardware tab.
      1. Click Video Cards Configure.
    5. Select qxl and click OK.
    6. Restart X-Windows by logging out of the virtual machine and logging back in.
  • Procedure B.3. How to configure qxl drivers on the command line:

    1. Back up /etc/X11/xorg.conf:
      # cp /etc/X11/xorg.conf /etc/X11/xorg.conf.$$.backup
    2. Make the following change to the Device section of /etc/X11/xorg.conf:
      Section 	"Device"
      Identifier	"Videocard0"
      Driver		"qxl"
      Endsection
      

Procedure B.4. Configuring the tablet and mouse to use SPICE

  1. Verify that the tablet device is available on your guest:
    # /sbin/lsusb -v | grep 'QEMU USB Tablet'
    If there is no output from the command, do not continue configuring the tablet.
  2. Back up /etc/X11/xorg.conf by running this command:
    # cp /etc/X11/xorg.conf /etc/X11/xorg.conf.$$.backup
  3. Make the following changes to /etc/X11/xorg.conf:
    Section "ServerLayout"
    Identifier     "single head configuration"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Tablet" "SendCoreEvents"
    InputDevice    "Mouse" "CorePointer"
    EndSection
    							 
    Section "InputDevice"
    Identifier  "Mouse"
    Driver      "void"
    #Option      "Device" "/dev/input/mice"
    #Option      "Emulate3Buttons" "yes"
    EndSection
    							 
    Section "InputDevice"
    Identifier  "Tablet"
    Driver      "evdev"
    Option      "Device" "/dev/input/event2"
    Option "CorePointer" "true"
    EndSection
    
  4. Log out and log back into the virtual machine to restart X-Windows.