搜索

此内容没有您所选择的语言版本。

3.3. Post-installation host configuration

download PDF
This section covers the post-installation configuration processes required to utilize the para-virtualized drivers. Para-virtualized drivers must be installed on the guest before commencing this section.
Network devices available to guests automatically use the para-virtualized drivers when the guests are rebooted after installation of the drivers. Adding network devices requires special configuration steps, refer to Section 4.2, “Adding para-virtualized network devices”.
Block devices require additional configuration.
Block device configuration

This section covers the procedure for adding and modifying disk entries to enable the para-virtualized drivers. Each guest requires modification in order to utilize the drivers.

Para-virtualized drivers cannot be used for the disk containing the Windows system files. Only secondary disks can be used with the para-virtualized drivers at this time.

Warning

Only make changes to the configuration files in the /etc/xen directory with the libvirt based tools, virsh and virt-manager. Manually editing configuration files in the /etc/xen directory is not recommended and could render your guests inoperable.
Use virsh dumpxml to export the configuration of the virtual machine.
# virsh dumpxml virt-machine-name > guest.xml
Update the guest configuration to enable the para-virtualized drivers. Red Hat Enterprise Linux 5.2 automatically enables para-virtualized network drivers. Only the block and disk device drivers must be updated.
The guest.xml file locate the section containing the disk configuration should resemble this example. This example uses a hard disk partition called /dev/hda6.
<disk type='file' device='disk'>
  <driver name='file'/>
  <source file='/var/lib/xen/images/disk1.img'/>
  <target dev='hda'/>
</disk>
<disk type='file' device='disk'>
  <driver name='file'/>
  <source file='/dev/hda6'/>
  <target dev='hdb'/>
</disk>
In this example, the secondary disk updated to use the para-virtualized driver. Change the driver from “file” to “tap:aio” and change the target device from “hdb” to “xvdb”.
<disk type='file' device='disk'>
  <driver name='file'/>
  <source file='/var/lib/xen/images/disk1.img'/>
  <target dev='hda'/>
</disk>
<disk type='file' device='disk'>
  <driver name='tap' type='aio'/>
  <source file='/dev/hda6'/>
  <target dev='xvdb'/>
</disk>
Redefine the guest using the updated guest configuration file, guest.xml.
# virsh define guest.xml
The guest can now be restarted with virt-manager or virsh. To restart a guest named virt-machine-name:
# virsh reboot virt-machine-name
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.