在KVM Guest虚拟机中添加串行端口时出现错误-只有第一个控制台可以是串行端口

时间:2019-05-20 11:29:16

标签: linux vmware qemu kvm xen

我遇到错误(3月19日20:19:22 SDP-2初始化:串行(ttyS0)主进程结束,重新生成 Mar 19 20:19:22 SDP-2 init:initLogger主进程(608793)终止,状态为1)。为了解决此问题,我从来宾xml文件的节中删除了该行:

<controller type='virtio-serial' index='0' ports='16'>
      <alias name='ua-9452f44a-2df1-41ea-b037-60c777eb21c4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </controller>

我现在如何在访客xml文件中添加串行端口?我试图在访客xml中添加以下内容:

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

下面是我的来宾xml中的代码。如何添加串行端口以消除错误“ 5月8日15:02:51 SDP-A sudo:apache:TTY =未知; PWD = / var / public; USER = root; COMMAND = / bin / rpm -q Duser” 。

<boot order='1'/>
      <alias name='ua-9b49b213-d605-4444-9d78-3858cb1a860b'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </disk>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <controller type='scsi' index='0' model='virtio-scsi'>
      <alias name='ua-2557f2fd-374a-4fc2-8414-58123b984e56'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    <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='6'/>
      <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='6'/>
      <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>
    <serial type='unix'>
      <source mode='bind' path='/var/run/ovirt-vmconsole-console/125f6f93-d3d9-42b5-968d-a0f8b9346320.sock'/>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
      </target>
    </serial>
    <console type='unix'>
      <source mode='bind' path='/var/run/ovirt-vmconsole-console/125f6f93-d3d9-42b5-968d-a0f8b9346320.sock'/>
      <target type='serial' port='0'/>
    </console>
    <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>

我想添加串行端口,但是在添加时出现错误“只有第一个控制台可以是串行端口”。

0 个答案:

没有答案