Red Hat Training

A Red Hat training course is available for Red Hat Virtualization

6.15.2. 配置 Red Hat Enterprise Linux 5.4 和更高的虚拟机以使用 SPICE

SPICE 是专为虚拟环境设计的远程显示协议,使您可以查看虚拟桌面或服务器。SPICE 提供高品质的用户体验,保持 CPU 消耗较低,并支持高质量的视频流。
在 Linux 计算机上使用 SPICE 可显著改善鼠标光标在虚拟机的控制台上的移动。要使用 SPICE,X-Windows 系统需要额外的 QXL 驱动程序。QXL 驱动程序随 Red Hat Enterprise Linux 5.4 及更新版本一同提供。不支持旧版本。在运行 Red Hat Enterprise Linux 的虚拟机上安装 SPICE 可显著提高图形用户界面的性能。
注意
通常,这对用户需要使用图形用户界面的虚拟机最有用。如果要将图形用户界面的使用降至最低,则创建虚拟服务器的系统管理员可能不希望配置 SPICE。

6.15.2.1. 安装和配置 QXL 驱动程序

您必须在运行 Red Hat Enterprise Linux 5.4 或更高版本的虚拟机上手动安装 QXL 驱动程序。这对运行 Red Hat Enterprise Linux 6 或 Red Hat Enterprise Linux 7 的虚拟机来说是不必要的,因为默认安装了 QXL 驱动程序。

过程 6.35. 安装 QXL 驱动程序

  1. 登录到 Red Hat Enterprise Linux 虚拟机。
  2. 安装 QXL 驱动程序:
    # yum install xorg-x11-drv-qxl
您可以使用图形界面或命令行配置 QXL 驱动程序。只执行以下其中一个程序。

过程 6.36. 在 GNOME 中配置 QXL 驱动程序

  1. System
  2. 单击 Administration
  3. 单击 Display
  4. 单击 Hardware 选项卡。
  5. 单击 video Cards Configure
  6. 选择 qxl 并单击 OK
  7. 通过注销虚拟机并重新登录来重新启动 X-Windows。

过程 6.37. 在命令行中配置 QXL 驱动程序:

  1. 备份 /etc/X11/xorg.conf
    # cp /etc/X11/xorg.conf /etc/X11/xorg.conf.$$.backup
  2. /etc/X11/xorg.conf 的 Device 部分进行以下更改:
    Section 	"Device"
    Identifier	"Videocard0"
    Driver		"qxl"
    Endsection