QEMUI/KVM virtio-serial 没有主机到 VM 的连接

时间:2021-07-12 14:10:43

标签: linux virtual-machine kvm tty libvirt

我在我的 xml 中添加了一个虚拟串行以启用主机 -> vm 和 vm -> 通过串行的主机连接。

echo "a string" #on VM 

然后

cat < {pts-path} #on Host

按预期工作,我能够看到从 VM 回显的字符串。 但是,相反,例如从主机回显,然后在串行上执行 cat 以查看数据不会返回任何内容。

我的xml中的条目是

<channel type="pty">
  <source path="/dev/pts/{}"/>
  <target type="virtio" name="org.fedoraproject.port.1" state="disconnected"/>
  <alias name="channel0"/>
  <address type="virtio-serial" controller="0" bus="0" port="1"/>
</channel>

不知道为什么状态是“已断开连接”,我似乎无法将其设置为已连接。

0 个答案:

没有答案