Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

9.2.2. 使用私有 libvirt 网络

过程 9.3. 使用私有 libvirt 网络

  1. 在 libvirt 上配置 PXE 引导,如 第 9.1.1 节 “在私有 libvirt 网络中设置 PXE 引导服务器” 所示。
  2. 使用 libvirt 引导客户机虚拟机,并启用 PXE 引导。您可以使用 virt-install 命令使用 PXE 创建/安装新虚拟机:
    virt-install --pxe --network network=default --prompt
另外,请确保客户端网络被配置为使用您的私有 libvirt 网络,并且 XML 客户机配置文件在 <boot dev='network'/> 元素中有一个 <os> 元素,如下例所示:
<os>
   <type arch='x86_64' machine='pc-i440fx-rhel7.0.0'>hvm</type>
   <boot dev='network'/>
   <boot dev='hd'/>
</os>
还要确保客户端虚拟机已连接到私有网络:
<interface type='network'>
   <mac address='52:54:00:66:79:14'/>
   <source network='default'/>
   <target dev='vnet0'/>
   <alias name='net0'/>
   <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>