Serial port QEMU没有';t创建第二个串行端口(Ubuntu x86-64来宾和主机)
我通过运行QEMU版本3.0.0:Serial port QEMU没有';t创建第二个串行端口(Ubuntu x86-64来宾和主机),serial-port,virtual-machine,qemu,Serial Port,Virtual Machine,Qemu,我通过运行QEMU版本3.0.0: x86_64-softmmu/qemu-system-x86_64-m 2560-hda img.qcow2-serial pty-serial pty 我的主机是Ubuntu桌面16.04,我的来宾是新的(即默认配置)Ubuntu服务器18.04。两者都是x86-64 启动后,QEMU立即打印: qemu-system-x86_64: -serial pty: char device redirected to /dev/pts/18 (label seri
x86_64-softmmu/qemu-system-x86_64-m 2560-hda img.qcow2-serial pty-serial pty
我的主机是Ubuntu桌面16.04,我的来宾是新的(即默认配置)Ubuntu服务器18.04。两者都是x86-64
启动后,QEMU立即打印:
qemu-system-x86_64: -serial pty: char device redirected to /dev/pts/18 (label serial0)
qemu-system-x86_64: -serial pty: char device redirected to /dev/pts/19 (label serial1)
此外,info qtree
(在QEMU的监视器中)的输出为:
所以看来serial0
和serial1
应该是完全相同的。根据,
/dev/ttyS1
应用于iobase为0x2f8
的串行端口,因此从上面的输出推断,serial1
应通过/dev/ttyS1
使用
我可以在来宾中使用/dev/ttyS0
,在主机中使用/dev/pts/18
而不会出现任何问题。
但是,我没有在来宾中使用/dev/ttyS1
,而且在我看来,serial1
在来宾中根本不存在
在客户机内部,dmesg|grep ttyS的输出(根据,它应该显示现有的串行端口):
[7.147289]00:05:ttyS0在I/O 0x3f8(irq=4,基本波特率=115200)是16550A
我错过了什么?为什么客人里面好像没有serial1
因为来宾启动需要花费很多时间(至少在我的机器上),所以我总是在启动后立即使用loadvm\u snapshot
我现在尝试让来宾通过启动,而/dev/ttyS1
的重定向工作得非常好
[...]
dev: isa-serial, id ""
index = 1 (0x1)
iobase = 760 (0x2f8)
irq = 3 (0x3)
chardev = "serial1"
wakeup = 0 (0x0)
isa irq 3
dev: isa-serial, id ""
index = 0 (0x0)
iobase = 1016 (0x3f8)
irq = 4 (0x4)
chardev = "serial0"
wakeup = 0 (0x0)
isa irq 4
[...]