在 kvm 或 RHEV 中的 guest xml 中添加串行端口控制台

在 kvm 或 RHEV 中的 guest xml 中添加串行端口控制台

如何在下面的代码中添加串行控制台。尝试添加时,我收到错误“只有第一个控制台可以是串行端口”

</controller>
    <controller type='usb' index='0' model='piix3-uhci'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'/>
    <interface type='bridge'>
      <mac address='00:1a:4a:16:01:0f'/>
      <source bridge='XMI'/>
      <model type='virtio'/>
      <driver name='vhost' queues='5'/>
      <filterref filter='vdsm-no-mac-spoofing'/>
      <link state='up'/>
      <alias name='ua-07767369-9064-45ad-b79c-ec83f89c9141'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <interface type='bridge'>
      <mac address='00:1a:4a:16:01:10'/>
      <source bridge='IMI'/>
      <model type='virtio'/>
      <driver name='vhost' queues='5'/>
      <filterref filter='vdsm-no-mac-spoofing'/>
      <link state='up'/>
      <alias name='ua-b66ab5d7-d9e8-4d3c-81dc-c004b9be7b34'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </interface>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channels/125f6f93-d3d9-42b5-968d-a0f8b9346320.ovirt-guest-agent.0'/>
      <target type='virtio' name='ovirt-guest-agent.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channels/125f6f93-d3d9-42b5-968d-a0f8b9346320.org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='2'/>
    </channel>
    <channel type='spicevmc'>
      <target type='virtio' name='com.redhat.spice.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='3'/>
    </channel>

我试图在上面的 guest xml 文件中添加:

<console type='pty'>
<target type='serial' port='0'/>
<alias name='serial0' />
</console>

相关内容