Fedora Virtualization Guide - en to zh_CN translation catalogue (139 entries)

note: Tag: title
en: Troubleshooting Xen
zh_CN: 故障排除 Xen

note: Tag: para
en: This chapter covers essential concepts to assist you in troubleshooting problems in Xen. Troubleshooting topics covered in this chapter include:
zh_CN: 本章论述了帮助您在 Xen 中进行故障排除的主要概念。本章覆盖的故障排除命题包括：

note: Tag: para
en: troubleshooting tools for Linux and virtualization.
zh_CN: 如何为 Linux 和虚拟化进行故障排除。

note: Tag: para
en: troubleshooting techniques for identifying problems.
zh_CN: 识别问题的故障排除技巧。

note: Tag: para
en: The location of log files and explanations of the information in logs.
zh_CN: 日志文件位置以及对日志中信息的解释。

note: Tag: para
en: This chapter is to give you, the reader, a background to identify where problems with virtualization technologies are. Troubleshooting takes practice and experience which are difficult to learn from a book. It is recommended that you experiment and test virtualization on Red Hat Enterprise Linux to develop your troubleshooting skills.
zh_CN: 本章为您提供一些识别虚拟化技术问题的背景资料。故障排除依赖的是实践和经验，这些很难从书本中获得。建议您在红帽企业版 Linux 中实验并测试虚拟化以增进故障排除技能。

note: Tag: para
en: If you cannot find the answer in this document there may be an answer online from the virtualization community. Refer to <xref linkend="sect-Virtualization-Additional_resources-Online_resources"/> for a list of Linux virtualization websites.
zh_CN: 如果您在本文档中找不到答案，您可以尝试在线的虚拟化社区中提问。Linux 虚拟化网页列表请参考 <xref linkend="sect-Virtualization-Additional_resources-Online_resources"/>。

note: Tag: title
en: Debugging and troubleshooting Xen
zh_CN: Xen 调试和故障排除

note: Tag: para
en: This section summarizes the System Administrator applications, the networking utilities, and debugging tools. You can employ these standard System administration tools and logs to assist with troubleshooting:
zh_CN: 这部分总结了系统管理员程序、网络工具和调试工具。您可以使用这些标准系统管理员工具和日志来帮助进行故障排除：

note: Tag: title
en: Useful commands and applications for troubleshooting
zh_CN: 用于故障排除的命令和应用程序

note: Tag: para
en: <command>xentop</command> displays real-time information about a host system and the guest domains.
zh_CN: <command>xentop</command> 显示主机系统以及客户端域的实时信息。

note: Tag: para
en: Using the <command>dmesg</command> and <command>log</command>
zh_CN: 使用 <command>dmesg</command> 和 <command>log</command>

note: Tag: para
en: The <command>iostat</command>, <command>mpstat</command> and <command>sar</command> commands are all provided by the <filename>sysstat</filename> package.
zh_CN: <command>iostat</command>、<command>mpstat</command> 和 <command>sar</command> 命令都来自 <filename>sysstat</filename> 软件包。

note: Tag: para
en: You can employ these Advanced Debugging Tools and logs to assist with troubleshooting:
zh_CN: 您可以使用这些高级调试工具和日志来协助进行故障解除：

note: Tag: para
en: These networking tools can assist with troubleshooting virtualization networking problems:
zh_CN: 这些联网工具可帮助您解决虚拟化联网问题：

note: Tag: para
en: The <command>tcpdump</command> command &#39;sniffs&#39; network packets. <command>tcpdump</command> is useful for finding network abnormalities and problems with network authentication. There is a graphical version of <command>tcpdump</command> named <command>wireshark</command>.
zh_CN: <command>tcpdump</command> 命令“嗅探”网络软件包。<command>tcpdump</command> 在查找网络异常和网络授权问题时很有用。<command>tcpdump</command> 的图形版本名为 <command>wireshark</command>。

note: Tag: para
en: <command>brctl</command> is a networking tool that inspects and configures the Ethernet bridge configuration in the Virtualization linux kernel. You must have root access before performing these example commands:
zh_CN: <command>brctl</command> 是一个在虚拟化 Linux 内核中检查和配置以太网桥接的联网工具。在执行这些示例命令前，您必须拥有根用户权限：

note: Tag: para
en: Listed below are some other useful commands for troubleshooting virtualization on Red Hat Enterprise Linux 5. All utilities mentioned can be found in the <filename>Server</filename> repositories Red Hat Enterprise Linux 5.
zh_CN: 下面是其它一些可用于红帽企业版 Linux 5 虚拟化故障排除的工具。所有提到的工具都可以在红帽企业版 Linux 5 服务器发行本的 <filename>Server</filename> 库中找到。

note: Tag: para
en: <application>strace</application> is a command which traces system calls and events received and used by another process.
zh_CN: <application>strace</application> 是用来追踪系统调用以及接收的或者由其它进程使用事件的命令。

note: Tag: para
en: <application>vncviewer</application>: connect to a VNC server running on your server or a virtual machine. Install <application>vncviwer</application> using the <command> yum install vnc</command> command.
zh_CN: <application>vncviewer</application>：连接到在您的服务器或者虚拟机中运行的 VNC 服务器。请使用 <command> yum install vnc</command> 命令安装 <application>vncviewer</application>。

note: Tag: para
en: <application>vncserver</application>: start a remote desktop on your server. Gives you the ability to run graphical user interfaces such as virt-manager via a remote session. Install <application>vncserver</application> using the <command>yum install vnc-server</command> command.
zh_CN: <application>vncserver</application>：在您的服务器中启动远程桌面。可让您在远程会话中运行图形用户界面，比如 virt-manager。请使用 <command>yum install vnc-server</command> 命令安装 <application>vncserver</application>。

note: Tag: title
en: Log files overview
zh_CN: 日志文件概述

note: Tag: para
en: When deploying Red Hat Enterprise Linux 5 with Virtualization into your network infrastructure, the host&#39;s Virtualization software uses many specific directories for important configuration, log files, and other utilities. All the Xen logs files are standard ASCII files, and accessible with a text editor:
zh_CN: 当在您的网络构架中部署带虚拟化的红帽企业版 Linux 5 时，主机的虚拟化软件使用许多特定的目录来保存重要配置、日志文件和其他程序。所有 Xen 日志文件都是标准 ASCII 文件，并可使用文本编辑器打开：

note: Tag: para
en: The Xen configuration directory is <filename>/etc/xen/</filename>. This directory contains the <command>xend</command> daemon and other virtual machine configuration files. The networking script files are found in the <filename>script</filename>s directory).
zh_CN: Xen 配置目录是 <filename>/etc/xen/</filename>。这个目录包含 <command>xend</command> 守护进程和其他虚拟机配置文件。网络脚本文件可以在<filename>script</filename> 目录中找到）。

note: Tag: para
en: All of actual log files themselves that you will consult for troubleshooting purposes reside in the <command>/var/log/xen</command> directory.
zh_CN: 所有关于故障排除的日志文件都在<command>/var/log/xen</command>目录中。

note: Tag: para
en: You should also know that the default directory for all virtual machine file based disk images resides in the <command>/var/lib/xen</command> directory.
zh_CN: 你也应该知道基于磁盘驻留的所有虚拟机文件的默认目录就在<command>/var/lib/xen</command>。

note: Tag: para
en: Xen kernel information is stored in the <command>/proc/xen/</command> directory.
zh_CN: Xen 内核信息保存在 <command>/proc/xen/</command> 目录中。

note: Tag: title
en: Log file descriptions
zh_CN: 日志文件描述

note: Tag: para
en: Xen features the <command>xend</command> daemon and <command>qemu-dm </command> process, two utilities that write the multiple log files to the <command>/var/log/xen/</command> directory:
zh_CN: Xen 拥有 <command>xend</command> 守护进程和 <command>qemu-dm</command> 进程，这两个程序在 <command>/var/log/xen/</command> 目录中写入多个日志文件：

note: Tag: para
en: <filename>xend.log</filename> is the log file that contains all the data collected by the <command>xend</command> daemon, whether it is a normal system event, or an operator initiated action. All virtual machine operations (such as create, shutdown, destroy and so on) appear in this log. The <command> xend.log</command> is usually the first place to look when you track down event or performance problems. It contains detailed entries and conditions of the error messages.
zh_CN: <filename>xend.log</filename> 是包含 <command>xend</command> 守护进程收集的所有数据的日志文件，不管这些数据是普通的系统事件，还是操作者启动的动作。所有虚拟机的操作（如创建、关闭、销毁等等）都在这里显示。<command>xend.log</command> 通常是您追踪事件或性能问题的第一个着手点。它包含出错信息的详细记录和情况。

note: Tag: para
en: <filename>xend-debug.log</filename> is the log file that contains records of event errors from <command>xend</command> and the Virtualization subsystems (such as framebuffer, Python scripts, and so on).
zh_CN: <filename>xend-debug.log</filename> 是包含来自 <command>xend</command> 和虚拟化子系统（如 framebuffer、Python 脚本等等）的事件出错记录的日志文件。

note: Tag: para
en: <filename>xen-hotplug-log</filename> is the log file that contains data from hotplug events. If a device or a network script does not come online, the event appears here.
zh_CN: <filename>xen-hotplug-log</filename> 是包含热插拔事件数据的日志文件。如果没有启动设备或网络脚本，该事件会在这里显示。

note: Tag: para
en: <filename>qemu-dm.[PID].log</filename> is the log file created by the <command>qemu-dm</command> process for each fully virtualized guest. When using this log file, you must retrieve the given <command>qemu-dm </command> process PID, by using the <command>ps</command> command to examine process arguments to isolate the <command>qemu-dm</command> process on the virtual machine. Note that you must replace the [PID] symbol with the actual PID <command>qemu-dm</command> process.
zh_CN: <filename>qemu-dm.[PID].log</filename> 是 <command>qemu-dm</command> 进程为每个完全虚拟化客户机创建的日志文件。当使用该日志文件时，您必须用 <command>ps</command> 命令检查进程参数以便分离出虚拟机中的 <command>qemu-dm</command> 进程，从而恢复给定的 <command>qemu-dm</command> 进程 PID。注意您必须用实际的 <command>qemu-dm</command> 进程的 PID 来替换 [PID]。

note: Tag: para
en: If you encounter any errors with the Virtual Machine Manager, you can review the generated data in the <command>virt-manager.log</command> file that resides in the <command>/.virt-manager </command> directory. Note that every time you start the Virtual Machine Manager, it overwrites the existing log file contents. Make sure to backup the <command> virt-manager.log </command> file, before you restart the Virtual Machine manager after a system error.
zh_CN: 如果在使用虚拟机管理者时您遇到任何错误，您可以查看 <command>/.virt-manager </command> 目录中 <command>virt-manager.log</command> 文件生成的数据。请注意每次您启动虚拟机管理者，它都会覆盖现有的日志文件内容。当出现系统错误后，在重启虚拟机管理者前，请确定备份了 <command> virt-manager.log </command> 文件。

note: Tag: title
en: Important directory locations
zh_CN: 重要目录的位置

note: Tag: para
en: There are other utilities and log files you should be aware of for tracking errors and troubleshooting problems with Xen:
zh_CN: 当在 Xen 中追踪错误和进行故障排除时您还应该考虑的其它工具和日志文件：

note: Tag: para
en: Virtualized guest images reside in the <command>/var/lib/libvirt/images</command> directory.
zh_CN: 位于 <command>/var/lib/libvirt/images</command> 目录中的虚拟客户端映像。

note: Tag: para
en: When you restart the <command>xend</command> daemon, it updates the <command>xend-database</command> that resides in the <command>/var/lib/xen/xend-db</command> directory.
zh_CN: 当您重启 <command>xend</command> 守护进程时，它会更新位于 <command>/var/lib/xen/xend-db</command> 目录中的 <command>xend-database</command>。

note: Tag: para
en: Virtual machine dumps (that you perform with the <command>xm dump-core</command> command) resides in the <command>/var/lib/xen/dumps</command> directory.
zh_CN: 虚拟机转储（使用 <command>xm dump-core</command> 命令生成的）位于 <command>/var/lib/xen/dumps</command> 目录中。

note: Tag: para
en: The <command>/etc/xen</command> directory contains the configuration files that you use to manage system resources. The <command>xend</command> daemon configuration file is <command>/etc/xen/xend-config.sxp</command>. This file can be edited to implement system-wide changes and configure the networking. However, manually editing files in the <filename>/etc/xen/</filename> folder is not advised.
zh_CN: <command>/etc/xen</command> 目录包含您用来管理系统资源的配置文件。<command>xend</command> 守护进程的配置文件是 <command>/etc/xen/xend-config.sxp</command>。您可以使用这个文件来实施系统范围的修改并配置联网，但不建议手动编辑 <filename>/etc/xen/</filename> 文件夹中的文件。

note: Tag: para
en: The <command>proc</command> folders are another resource that allows you to gather system information. These proc entries reside in the <filename>/proc/xen</filename> directory:
zh_CN: <command>proc </command> 命令是另一个允许您收集系统信息的文件夹。这些 proc 条目位于 <filename>/proc/xen</filename> 目录。

note: Tag: title
en: Troubleshooting with the logs
zh_CN: 利用日志进行故障排除

note: Tag: para
en: When encountering installation issues with Xen, refer to the host system&#39;s two logs to assist with troubleshooting. The <command>xend.log</command> file contains the same basic information as when you run the <command>xm log</command> command. This log is found in the <filename>/var/log/</filename> directory. Here is an example log entry for when you create a domain running a kernel:
zh_CN: 如果在 Xen 中遇到安装问题，请参考主机系统的两个日志文件来帮助进行故障排除。<command>xend.log </command> 文件包含了与您运行 <command>xm log </command> 命令所获得相同的基本信息。它位于 <filename>/var/log/</filename> 目录中。这是一个当您创建运行内核的域时产生的日志示例项：

note: Tag: para
en: The other log file, <command> xend-debug.log</command>, is very useful to system administrators since it contains even more detailed information than <command> xend.log </command>. Here is the same error data for the same kernel domain creation problem:
zh_CN: 另一个日志文件 <command> xend-debug.log </command> 对于系统管理员也是非常有用的，因为它包含了比 <command> xend.log </command> 更为详细的信息。下面是创建同一个内核域所出现问题的出错信息数据：

note: Tag: para
en: When calling customer support, always include a copy of both these log files when contacting the technical support staff.
zh_CN: 当需要客户服务并和技术支持人员联系时，请记得附上这些日志文件的拷贝。

note: Tag: title
en: Troubleshooting with the serial console
zh_CN: 使用串口控制台进行故障排除

note: Tag: para
en: The serial console is helpful in troubleshooting difficult problems. If the Virtualization kernel crashes and the hypervisor generates an error, there is no way to track the error on a local host. However, the serial console allows you to capture it on a remote host. You must configure the host to output data to the serial console. Then you must configure the remote host to capture the data. To do this, you must modify these options in the <command>grub.conf</command> file to enable a 38400-bps serial console on <command>com1</command><filename>/dev/ttyS0</filename>:
zh_CN: 串口控制台在进行故障排除遇到困难时很有用。如果虚拟化内核崩溃了，且管理程序（hypervisor）生成了一个错误信息，您就无法在本地主机中追踪这个错误。然而，串行控制台允许您在远程主机上捕获它。您必须将 Xen 主机配置为将数据输出到串行控制台。然后您必须将远程主机配置为捕获这些数据。要做到这一点，您必须在 <command>grub.conf</command> 文件中修改这些选项以便在 <command>com1</command> <filename>/dev/ttyS0</filename> 中启用 38400-bps 的串口控制台：

note: Tag: para
en: The <command>sync_console</command> can help determine a problem that causes hangs with asynchronous hypervisor console output, and the <command>"pnpacpi=off"</command> works around a problem that breaks input on the serial console. The parameters <command>"console=ttyS0"</command> and <command> "console=tty" </command> means that kernel errors get logged with on both the normal VGA console and on the serial console. Then you can install and set up <command> ttywatch </command> to capture the data on a remote host connected by a standard null-modem cable. For example, on the remote host you could type:
zh_CN: <command>sync_console</command> 可以帮助您诊断导致异步的管理程序控制台输出挂起的问题，<command>"pnpacpi=off"</command> 可以解决中断串口控制台中输入的问题。参数 <command> "console=ttyS0" </command> 和 <command> "console=tty" </command> 表示内核错误将在普通的 VGA 控制台以及串口控制台上被记载。然后您可以通过标准的非调制解调器（null-modem）的电缆来安装并设置 <command>ttywatch</command>，捕获连接到非调制解调器电缆的远程主机中的数据。例如，在远程主机中，您可以输入：

note: Tag: title
en: Itanium serial console troubleshooting
zh_CN: Itanium 串口控制台故障排除

note: Tag: para
en: To access the hypervisor via a serial console on the <trademark class="registered">Itanium</trademark> architecture you must enable the console in ELILO. For more information on configuring ELILO, refer to <xref linkend="chap-Virtualization-Configuring_ELILO"/>.
zh_CN: 要在 <trademark class="registered">Itanium</trademark> 构架中通过串口控制台访问管理程序，您必须在 ELILO 中启用控制台。有关配置 ELILO 的详情请参考 <xref linkend="chap-Virtualization-Configuring_ELILO"/>。

note: Tag: para
en: This pipes the output from <command> /dev/ttyS0 </command> into the file <command> /var/log/ttywatch/myhost.log </command>.
zh_CN: 这样就将 <command> /dev/ttyS0 </command> 的输出导出至 <command> /var/log/ttywatch/myhost.log </command> 文件。

note: Tag: title
en: Para-virtualized guest console access
zh_CN: 对半虚拟客户端控制台的访问

note: Tag: para
en: Para-virtualized guest operating systems automatically has a virtual text console configured to transmit data to the host operating system. Connect to a guest&#39;s virtual console with the following command:
zh_CN: 半虚拟化客户端操作系统自动地配置有一个虚拟文本控制台将数据导入 dom0 操作系统。使用以下命令连接到客户端虚拟控制台：

note: Tag: para
en: You can also use <command>virt-manager</command> to display the virtual text console. In the Virtual Machine Details window, select <guilabel>Serial Console</guilabel> from the <guilabel>View</guilabel> menu.
zh_CN: 您还可以使用 <command>virt-manager</command> 显示虚拟文本控制台。在虚拟机详情窗口中的<guilabel>「查看」</guilabel>菜单中选择<guilabel>「串口控制台」</guilabel>。

note: Tag: title
en: Fully virtualized guest console access
zh_CN: 对全虚拟客户端控制台的访问

note: Tag: para
en: Fully virtualized guest operating systems automatically has a text console configured for use, but the difference is the kernel guest is not configured. To enable the guest virtual serial console to work with the Full Virtualized guest, you must modify the guest&#39;s <command>grub.conf</command> file, and include the <command>&#39;console =ttyS0 console=tty0&#39;</command> parameter. This ensures that the kernel messages are sent to the virtual serial console (and the normal graphical console). If you plan to use the virtual serial console in a full virtualized guest, you must edit the configuration file in the <command>/etc/xen/</command> directory. On the host domain, access the serial console with the following command:
zh_CN: 全虚拟化客户端操作系统自动使用一个配置好的文本控制台，区别在于没有配置内核客户端。要让客户端虚拟串口控制台在全虚拟客户端中工作，您必须修改客户端的 <command>grub.conf</command> 文件使其包含 <command>'console =ttyS0 console=tty0'</command> 参数。这确保了内核信息被送至虚拟串口控制台（和普通的图形化控制台）。如果您计划在全虚拟客户端中使用虚拟串口控制台，您必须编辑 <command>/etc/xen/</command> 目录中的配置文件。在主机域中，您可以键入下列命令来访问串口控制台：

note: Tag: title
en: Accessing data on guest disk image
zh_CN: 访问客户端磁盘映像中的数据

note: Tag: para
en: You can use two separate applications that assist you in accessing data from within a guest disk image. Before using these tools, you must shut down the guests. Accessing the file system from the guest and dom0 could potentially harm your system.
zh_CN: 您可以使用两个单独的程序来访问客户机磁盘映像里的数据。在使用这些工具之前，您必须关闭客户端。从客户端和 dom0 访问文件系统有可能损害您的系统。

note: Tag: para
en: You can use the kpartx application to handle partitioned disks or LVM volume groups:
zh_CN: 您可以使用 kpartx 程序来处理分区磁盘或 LVM 卷组：

note: Tag: para
en: To access LVM volumes on a second partition, you must rescan LVM with vgscan and activate the volume group on the partition (called <filename>VolGroup00</filename> by default) by using the <command>vgchange -ay</command> command:
zh_CN: 要访问第二个分区的 LVM 卷，您必须用 vgscan 重新扫描 LVM 并使用 <command>vgchange -ay</command> 命令激活该分区中的卷组（默认名称为 <filename>VolGroup00</filename>）：

note: Tag: para
en: You must remember to deactivate the logical volumes with <command> vgchange -an</command>, remove the partitions with<command> kpartx-d </command>, and delete the loop device with <command>losetup -d </command> when you finish.
zh_CN: 您必须记住用 <command> vgchange -an</command> 来使逻辑卷无效、用 <command> kpartx-d </command> 来删除分区且在完成后用 <command>losetup -d </command> 删除回路设备。

note: Tag: title
en: Common Xen problems
zh_CN: 一般 Xen 问题

note: Tag: para
en: When attempting to start the <command>xend</command> service, nothing happens. Type <command>virsh list</command> and receive the following:
zh_CN: 当您试图启动 <command>xend</command> 服务时，什么也没有发生。键入 <command>virsh list</command> 后可以看到下面的输出：

note: Tag: para
en: Try to run <command>xend start</command> manually and receive more errors:
zh_CN: 尝试手工运行 <command>xend start</command> 时并得到更多的出错信息：

note: Tag: para
en: What has most likely happened here is that you rebooted your host into a kernel that is not a <command>kernel-xen</command> kernel. To correct this, you must select the <command>kernel-xen</command> kernel at boot time (or set the <command>kernel-xen</command> kernel to the default in the <command>grub.conf</command> file.
zh_CN: 产生这种问题的大多数原因是因为你重启机器进入内核而不是<command>kernel-xen</command>内核。解决这个问题必须在机器重启时选择<command>kernel-xen</command>内核或者在<command>grub.conf</command>文件中设置<command>kernel-xen</command> 为默认内核。

note: Tag: title
en: Guest creation errors
zh_CN: 客户端创建错误

note: Tag: para
en: When you attempt to create a guest, you receive an <command>"Invalid argument"</command> error message. This usually means that the kernel image you are trying to boot is incompatible with the hypervisor. An example of this would be if you were attempting to run a non-PAE FC5 kernel on a PAE only FC6 hypervisor.
zh_CN: 当您试图创建客户机时，您遇到 <command>"Invalid argument"</command> 错误信息。这通常是代表您试图引导的内核映像和管理程序（hypervisor）不兼容。例如，当您试图在支持 PAE 的 FC6 管理程序中运行 non-PAE FC5 内核时，就会出现这个问题。

note: Tag: para
en: You do a yum update and receive a new kernel, the <command>grub.conf</command> default kernel switches right back to a bare-metal kernel instead of the Virtualization kernel.
zh_CN: 当您用 yum update 来更新内核时，<command>grub.conf</command> 里的缺省内核选项切换回普通内核而不是虚拟化内核。

note: Tag: para
en: To correct this problem you must modify the default kernel RPM that resides in the <command>/etc/sysconfig/kernel/</command> directory. You must ensure that <command>kernel-xen</command> parameter is set as the default option in your <command>gb.conf</command> file.
zh_CN: 要解决这个问题，您必须修改位于 <command>/etc/sysconfig/kernel/ </command> 目录中的默认内核 RPM。您必须确保在 <command>gb.conf</command> 文件中将 <command>kernel-xen</command> 参数设置为默认选项。

note: Tag: title
en: Troubleshooting with serial consoles
zh_CN: 使用串口控制台进行故障排除

note: Tag: para
en: Linux kernels can output information to serial ports. This is useful for debugging kernel panics and hardware issues with video devices or headless servers. The subsections in this section cover setting up serial console output for machines running Red Hat Enterprise Linux virtualization kernels and their virtualized guests.
zh_CN: Linux 内核可将信息输出到串口中。这在进行内核 panic 调试和解决视频设备或者 headless 服务器的硬件问题时很有用。这部分论述了如何为运行红帽企业版 Linux 虚拟化内核的机器及其虚拟客户端设置串口控制台输出。

note: Tag: title
en: Serial console output for Xen
zh_CN: Xen 的串口控制台输出

note: Tag: para
en: By default, Xen&#39;s serial console is disabled and no data is output from serial ports.
zh_CN: 默认情况下，Xen 的串口控制台是禁用的，且不会从中输出数据。

note: Tag: para
en: To receive kernel information on a serial port modify the <filename>/boot/grub/grub.conf</filename> file by setting the appropriate serial device parameters.
zh_CN: 要接收串口控制台中的内核信息，请修改 <filename>/boot/grub/grub.conf</filename> 文件并设定恰当的串口设备参数。

note: Tag: para
en: If your serial console is on <systemitem>com1</systemitem>, modify <filename>/boot/grub/grub.conf</filename> by inserting the lines <parameter>com1=115200,8n1</parameter>, <parameter>console=tty0</parameter> and <parameter>console=ttyS0,115200</parameter> where shown.
zh_CN: 如果您的串口控制台位于 <systemitem>com1</systemitem>，请修改 <filename>/boot/grub/grub.conf</filename> 文件，插入行 <parameter>com1=115200,8n1</parameter>、<parameter>console=tty0</parameter> 和 <parameter>console=ttyS0,115200</parameter>。

note: Tag: para
en: If your serial console is on <systemitem>com2</systemitem>, modify <filename>/boot/grub/grub.conf</filename> by inserting the lines <parameter>com2=115200,8n1 console=com2L</parameter>, <parameter>console=tty0</parameter> and <parameter>console=ttyS0,115200</parameter> where shown.
zh_CN: 如果您的串口控制台位于 <systemitem>com2</systemitem>，请修改 <filename>/boot/grub/grub.conf</filename>，插入 <parameter>com2=115200,8n1 console=com2L</parameter>、<parameter>console=tty0</parameter> 和 <parameter>console=ttyS0,115200</parameter>。

note: Tag: para
en: Save the changes and reboot the host. The hypervisor outputs serial data on the serial (<systemitem>com1</systemitem>, <systemitem>com2</systemitem> and so on) you selected in the previous step.
zh_CN: 保存更改并重启主机。管理程序会在您上一步选择的串口（<systemitem>com1</systemitem>、<systemitem>com2</systemitem> 等等）中输出连续数据。

note: Tag: para
en: Note the example using the <systemitem>com2</systemitem> port, the parameter <parameter>console=ttyS0</parameter> on the <parameter>vmlinuz</parameter> line us used. The behavior of every port being used as <parameter>console=ttyS0</parameter> is not standard Linux behavior and is specific to the Xen environment.
zh_CN: 注意：这个示例中使用 <systemitem>com2</systemitem> 端口，在 <parameter>vmlinuz</parameter> 行中使用 <parameter>console=ttyS0</parameter> 参数。作为 <parameter>console=ttyS0</parameter> 使用的每个端口的行为都不是标准 Linux 行为，它们是为 Xen 环境特别指定的。

note: Tag: remark
en: ------------------------------------------------------------------------------- Next is setting up a "serial" console in a para-virtualized domain. This is vastly different from the domain-0, so you probably want to have a separate question/section for it: -------------------------------------------------------------------------------
zh_CN: ------------------------------------------------------------------------------- 下一步是在半虚拟域中设置一个“串口”控制台。这和 domain0 有很大不同，所以您可能想要另外论述这部分： -------------------------------------------------------------------------------

note: Tag: title
en: Xen serial console output from para-virtualized guests
zh_CN: 半虚拟客户端的 Xen 串口控制台输出结果

note: Tag: para
en: This section describes how to configure a virtualized serial console for Red Hat Enterprise Linux para-virtualized guests.
zh_CN: 本章论述了如何为红帽企业版 Linux 半虚拟客户端配置虚拟串口控制台。

note: Tag: para
en: Serial console output from para-virtualized guests can be received using the "<command>virsh console</command>" or in the "<guilabel>Serial Console</guilabel>" window of <command>virt-manager</command>. Set up the virtual serial console using this procedure:
zh_CN: 可使用 "<command>virsh console</command>" 或者 <command>virt-manager</command> 的"<guilabel>「串口控制台」</guilabel>"窗口获得来自半虚拟客户端的串口控制台输出。使用一下步骤配置虚拟串口控制台：

note: Tag: para
en: Log in to your para-virtualized guest.
zh_CN: 登录您的半虚拟控制台。

note: Tag: para
en: Edit <filename>/boot/grub/grub.conf</filename> as follows:
zh_CN: 按如下编辑 <filename>/boot/grub/grub.conf</filename>：

note: Tag: para
en: Reboot the para-virtualized guest.
zh_CN: 重启半虚拟客户端。

note: Tag: para
en: You should now get kernel messages on the virt-manager "Serial Console" and/or "virsh console".
zh_CN: 您现在应该得到的virt-manager的“串行控制台”和/或“virsh控制台”的内核消息。

note: Tag: remark
en: -------------------------------------------------------------------------------- Note that it is possible to set up "serial console" logging of your guests, although it requires a domain 0 reboot. ---------------------------------a ---------------------------------------------
zh_CN: -------------------------------------------------------------------------------- 注意：可以设置“串口控制台”记录您的客户端，但需要重启 domain 0。 ---------------------------------a ---------------------------------------------

note: Tag: title
en: Logging the para-virtualized domain serial console output
zh_CN: 记录半虚拟域串口控制台输出

note: Tag: para
en: The Xen daemon(<systemitem class="daemon">xend</systemitem>) can be configured to log the output from serial consoles of para-virtualized guests.
zh_CN: 可将 Xen 守护进程（<systemitem class="daemon">xend</systemitem>）配置为记录来自半虚拟客户端串口控制台的输出。

note: Tag: para
en: To configure <systemitem class="daemon">xend</systemitem> edit <filename>/etc/sysconfig/xend</filename>. Change the entry:
zh_CN: 要配置 <systemitem class="daemon">xend</systemitem>，请编辑 <filename>/etc/sysconfig/xend</filename>。更改条目：

note: Tag: para
en: <para>to:</para>
zh_CN: <para>至：</para>

note: Tag: para
en: Reboot the host to activate logging the guest serial console output.
zh_CN: 重启主机激活记录客户端串口控制台输出的功能

note: Tag: para
en: Logs from the guest serial consoles are stored in the <filename>/var/log/xen/console</filename> file.
zh_CN: 客户端串口控制台记录保存在 <filename>/var/log/xen/console</filename> 文件中。

note: Tag: remark
en: ------------------------------------------------------------------------------ Finally, it is possible to setup serial console in a fully virtualized domain, although it has some limitations. In particular, you can&#39;t do logging of the fully virtualized serial port, and it is much more likely to drop or garble output data. Nevertheless, I find it invaluable when I am logging into a remote machine (basically so I don&#39;t have to have X running somewhere to see the console). -------------------------------------------------------------------------------
zh_CN: ------------------------------------------------------------------------------ 最后，可以在全虚拟域中设置串口控制台，但有一些限制。特别是您无法记录全虚拟串口， 且很可能丢失或者损失数据。但是我发现它在我登录远程机器时很有用（就是说我不需要运行 X 就可以看到控制台）。 -------------------------------------------------------------------------------

note: Tag: title
en: Serial console output from fully virtualized guests
zh_CN: 全虚拟客户端的串口控制台输出

note: Tag: para
en: This section covers how to enable serial console output for fully virtualized guests.
zh_CN: 这部分论述了如何在全虚拟客户端中启用串口控制台输出。

note: Tag: para
en: Fully virtualized guest serial console output can be viewed with the "<command>virsh console</command>" command.
zh_CN: 使用 <command>virsh console</command> 命令查看全虚拟客户端查看控制台输出。

note: Tag: para
en: Be aware fully virtualized guest serial consoles have some limitations. Present limitations include:
zh_CN: 注意全虚拟客户端查看控制台有一些限制。目前限制有：

note: Tag: para
en: logging output with xend is unavailable.
zh_CN: 无法使用 xend 记录输出。

note: Tag: para
en: output data may be dropped or scrambled.
zh_CN: 输出数据可能会丢失或者损失。

note: Tag: para
en: The serial port is called <systemitem>ttyS0</systemitem> on Linux or <systemitem>COM1</systemitem> on Windows.
zh_CN: 串口在 Linux 中名为 <systemitem>ttyS0</systemitem>，在 Windows 中名为 <systemitem>COM1</systemitem>。

note: Tag: para
en: You must configure the virtualized operating system to output information to the virtual serial port.
zh_CN: 您必须将虚拟操作系统配置为将信息输出到虚拟串口中。

note: Tag: para
en: To output kernel information from a fully virtualized Linux guest into the domain modify the <filename>/boot/grub/grub.conf</filename> file by inserting the line "<parameter>console=tty0 console=ttys0,115200</parameter>".
zh_CN: 要将全虚拟 Linux 客户端信息输出到域中，请修改 <filename>/boot/grub/grub.conf</filename> 文件，插入行 "<parameter>console=tty0 console=ttys0,115200</parameter>"。

note: Tag: para
en: Reboot the guest.
zh_CN: 重启客户端。

note: Tag: para
en: View the serial console messages using the "<command>virsh console</command>" command.
zh_CN: 使用 "<command>virsh console</command>" 命令查看串口控制台信息。

note: Tag: title
en: Note
zh_CN: 注意

note: Tag: para
en: Serial console messages from fully virtualized domains are not logged in <filename>/var/log/xen/console</filename> as they are for para-virtualized guests.
zh_CN: 全虚拟域的串口控制台信息没有记录在 <filename>/var/log/xen/console</filename> 中，因为它们用于半虚拟客户端。

note: Tag: title
en: Guest configuration files
zh_CN: 客户端配置文件

note: Tag: para
en: When you create guests with the virt-manager or virt-install tools on Red Hat Enterprise Linux 5, the guests configuration files are created automatically in the <filename>/etc/xen</filename> directory. The example below is a typical a para-virtualized guest configuration file:
zh_CN: 当您用红帽企业版 Linux 5 中的 virt-manager 或 virt-install 安装新的客户端时，会在 <filename>/etc/xen</filename> 目录中自动生成客户机配置文件。下面是典型半虚拟化客户端的配置文件示例：

note: Tag: para
en: Note that the <command>serial="pty" </command> is the default for the configuration file. This configuration file example is for a fully-virtualized guest:
zh_CN: 注意，<command>serial="pty" </command> 是配置文件的缺省设置。下面是完全虚拟化客户端的一个配置文件示例：

note: Tag: title
en: Xen configuration files
zh_CN: Xen 配置文件

note: Tag: para
en: Editing Xen configuration files is unsupported. Use <command>virsh dumpxml</command> and <command>virsh create</command> (or <command>virsh edit</command>) to edit the <command>libvirt</command> configuration files (xml based) which have error checking and safety checks.
zh_CN: 不支持编辑 Xen 配置文件。请使用 <command>virsh dumpxml</command> 和 <command>virsh create</command>（或者 <command>virsh edit</command>）编辑 <command>libvirt</command> 配置文件（xml 文件），该文件有错误和安全检查功能。

note: Tag: title
en: Interpreting Xen error messages
zh_CN: 解读 Xen 出错信息

note: Tag: para
en: You receive the following error:
zh_CN: 您接收到下面的错误：

note: Tag: para
en: A domain can fail if there is not enough RAM available. Domain0 does not balloon down enough to provide space for the newly created guest. You can check the <filename>xend.log</filename> file for this error:
zh_CN: 如果没有足够的可用内存，域将不能运行。Domain0 没有足够的空间来容纳新创建的客户机。您可以检查 <filename>xend.log</filename> 里关于这个错误的内容：

note: Tag: para
en: You can check the amount of memory in use by domain0 by using the <command>xm list domain0</command> command. If dom0 is not ballooned down, you can use the command <command>virsh setmem dom0 NewMemSize</command> to check memory.
zh_CN: 您可以使用 <command>xm list Domain0</command> 命令检查 domain0 所使用的内存量。如果还有 domain0 内存可用，您可以用命令 <command>virsh setmem dom0 NewMemSize</command> 来查看内存。

note: Tag: para
en: This message indicates that you are trying to run an unsupported guest kernel image on your hypervisor. This happens when you try to boot a non-PAE, para-virtualized guest kernel on a Red Hat Enterprise Linux 5 host. The Red Hat <package>kernel-xen</package> package only supports guest kernels with PAE and 64 bit architectures.
zh_CN: 这个信息表示您试图在管理程序中运行不被支持的客户端内核映像。当您试图在红帽企业版 Linux 5 主机中引导一个非 PAE 的半虚拟客户端内核时会看到这个信息。红帽 <package>kernel-xen</package> 软件包只支持带有 PAE 和 64 位构架的客户端内核。

note: Tag: para
en: Type this command:
zh_CN: 键入这个命令：

note: Tag: para
en: If you need to run a 32 bit non-PAE kernel you will need to run your guest as a fully virtualized virtual machine. For para-virtualized guests, if you need to run a 32 bit PAE guest, then you must have a 32 bit PAE hypervisor. For para-virtualized guests, to run a 64 bit PAE guest, then you must have a 64 bit PAE hypervisor. For full virtualization guests you must run a 64 bit guest with a 64 bit hypervisor. The 32 bit PAE hypervisor that comes with Red Hat Enterprise Linux 5 i686 only supports running 32 bit PAE para virtualized and 32 bit fully virtualized guest OSes. The 64 bit hypervisor only supports 64 bit para-virtualized guests.
zh_CN: 如果您需要运行 32 位非 PAE 内核，则需要将客户端作为全虚拟的虚拟机运行。如果您要运行 32 位 PAE 客户端，那么您必须有 32 位 PAE 管理程序。对于半虚拟客户端，您必须有 64 位 PAE 管理程序才可以运行 64 位 PAE 客户端。对于全虚拟客户端，您必须用 64 位的管理程序方可运行 64 位客户端。RHEL 5 i686 中自带的 32 位 PAE 监控程序只支持运行 32 位的半行虚拟和 32 位的全虚拟客户端操作系统。64 位管理程序只支持 64 位的半行虚拟客户端。

note: Tag: para
en: This happens when you move the full virtualized HVM guest onto a Red Hat Enterprise Linux 5 system. Your guest may fail to boot and you will see an error in the console screen. Check the PAE entry in your configuration file and ensure that pae=1.You should use a 32 bit distribution.
zh_CN: 当您将全虚拟 HVM 客户端移动到红帽企业版 Linux 5.0 系统中时，就会出现这个问题。无法引导您的客户端且在控制台可以看到一个出错信息。检查配置文件中的 PAE 条目，确定 pae=1。您应该使用 32 位发行本。

note: Tag: para
en: This happens when the virt-manager application fails to launch. This error occurs when there is no localhost entry in the <command>/etc/hosts </command> configuration file. Check the file and verify if the localhost entry is enabled. Here is an example of an incorrect localhost entry:
zh_CN: 当 virt-manager 程序不能启动时，会出现这个问题。当 <command>/etc/hosts </command> 配置文件里没有 localhost 条目时会产生这个错误。请确认配置文件里是否启用了 localhost 条目。下面是一个错误的 localhost 条目示例：

note: Tag: para
en: Here is an example of a correct localhost entry:
zh_CN: 下面是一个正确的 localhost 条目示例：

note: Tag: para
en: You receive the following error (in the <command>xen-xend.logfile </command>):
zh_CN: 您会接收到以下出错信息（在 <command>xen-xend.log file </command> 文件中）：

note: Tag: para
en: This happens when the guest&#39;s bridge is incorrectly configured and this forces the Xen hotplug scripts to timeout. If you move configuration files between hosts, you must ensure that you update the guest configuration files to reflect network topology and configuration modifications. When you attempt to start a guest that has an incorrect or non-existent Xen bridge configuration, you will receive the following errors:
zh_CN: 当客户端的桥接没有正确配置时会出现这个问题，它会迫使 Xen 热插拔脚本超时。如果您在主机之间移动配置文件，您必须确保您更新了这些配置文件来体现对网络拓扑结构和配置的修改。当您试图启动含有不正确或不存在的 Xen 桥接配置的客户端时，您将收到如下的错误信息：

note: Tag: para
en: In addition, the <command>xend.log</command> displays the following errors:
zh_CN: 另外，<command>xend.log </command> 显示以下出错信息：

note: Tag: para
en: To resolve this problem, open the guest&#39;s configuration file found in the <filename>/etc/xen</filename> directory. For example, editing the guest <parameter>mySQL01</parameter> <screen># vim /etc/xen/<parameter>mySQL01</parameter>
    </screen> Locate the <command>vif</command> entry. Assuming you are using <command>xenbr0</command> as the default bridge, the proper entry should resemble the following:
zh_CN: 要解决这个问题，请打开 <filename>/etc/xen</filename> 目录中的客户端配置文件。例如：编辑客户端 <parameter>mySQL01</parameter> <screen># vim /etc/xen/<parameter>mySQL01</parameter>
    </screen> 找到 <command>vif</command> 条目。假设您正在使用 <command>xenbr0</command> 作为默认桥接，则正确的条目应该如下所示：

note: Tag: para
en: You receive these python deprecation errors:
zh_CN: 您接收到这些 python 过时的出错信息：

note: Tag: para
en: Python generates these messages when an invalid (or incorrect) configuration file. To resolve this problem, you must modify the incorrect configuration file, or you can generate a new one.
zh_CN: 当遇到无效的（或不正确的）配置文件时，Python 生成这些错误。要解决这个问题，您必须更正不正确的配置文件，或者生成一个新的文件。

note: Tag: title
en: The layout of the log directories
zh_CN: 日志目录布局

note: Tag: para
en: The basic directory structure in a Red Hat Enterprise Linux 5 Virtualization environment is as follows:
zh_CN: 红帽企业版 Linux 5 虚拟化环境的基本目录结构如下：

note: Tag: term
en: <filename>/etc/xen/</filename> directory contains
zh_CN: <filename>/etc/xen/</filename> 目录包含

note: Tag: para
en: configuration files used by the <systemitem class="daemon">xend</systemitem> daemon.
zh_CN: <systemitem class="daemon">xend</systemitem> 守护进程使用的配置文件。

note: Tag: para
en: the <filename>scripts</filename> directory which contains the scripts for Virtualization networking.
zh_CN: 包含用于虚拟化联网脚本的 <filename>scripts</filename> 目录。

note: Tag: title
en: <title>Tip</title>
zh_CN: <title>提示</title>

note: Tag: para
en: Before moving virtual machine configuration files to a different location, ensure you are not working off old or stale configuration files.
zh_CN: 在移动虚拟机配置文件到不同的位置之前，确保你没有在过旧的或过时的配置文件上工作。

note: Tag: para
en: directory holding all Xen related log files.
zh_CN: 保存所有与 Xen 相关日志文件的目录。

note: Tag: para
en: The default directory for virtual machine image files.
zh_CN: 虚拟机映像文件的默认目录。

note: Tag: para
en: If you are using a different directory for your virtual machine images make sure you add the directory to your SELinux policy and relabel it before starting the installation.
zh_CN: 如果您正在使用不同的目录保存您的虚拟机映像，请确定将其添加到您的 SELinux 策略中并在启动安装前重新标记。

note: Tag: para
en: The xen related information in the /proc file system.
zh_CN: /proc 文件系统中与 xen 相关的信息。
