Skip to contentSkip to conversation

"info chardev" not showing the real port in use

Qemu-devel Prem Anand 1 participant 4 messages Feb 11, 2016 – Apr 16, 2019

lore
Share & tools
lore

Prem Anand

author
#0 lore raw

Public bug reported:

With Qemu 2.1.2
===============

pharidos@uks2:~$ qemu-system-x86_64 -hda Disk.qcow2 -serial telnet::0,server,nowait -nographic
QEMU 2.1.2 monitor - type 'help' for more information
(qemu) info chardev
parallel0: filename=null
serial0: filename=telnet:0.0.0.0:44189,server
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^ serial console is using port 44189
compat_monitor0: filename=stdio
(qemu)

With Qemu 2.5.0
===============

pharidos@uks2:~$ qemu-system-x86_64 -hda Disk.qcow2 -serial  telnet::0,server,nowait -nographic
QEMU 2.5.0 monitor - type 'help' for more information
(qemu) info chardev
parallel0: filename=null
serial0: filename=disconnected:telnet::0,server
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ serial console port not shown
compat_monitor0: filename=stdio
(qemu)

** Affects: qemu
Importance: Undecided
Status: New

** Description changed:

With Qemu 2.1.2
- ==============
+ ===============
pharidos@uks2:~/work/tplaf/☸ qemu-system-x86_64 -hda /space/pharidos/Disks/Blank_disk.qcow2 -serial telnet::0,server,nowait -nographic QEMU 2.1.2 monitor - type 'help' for more information
(qemu) info chardev
parallel0: filename=null
- serial0: filename=telnet:0.0.0.0:44189,server <====<<< serial console is using port 44189
+ serial0: filename=telnet:0.0.0.0:44189,server
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ serial console is using port 44189
compat_monitor0: filename=stdio
- (qemu)
-
+ (qemu)

With Qemu 2.5.0
- ==============
+ ===============

  pharidos@kvm:~/$ qemu-system-x86_64 -hda /space/pharidos/Disks/Blank_disk.qcow2 -serial telnet::0,server,nowait -nographic
  QEMU 2.5.0 monitor - type 'help' for more information
  (qemu) info chardev
  parallel0: filename=null
- serial0: filename=disconnected:telnet::0,server <====<<< serial console port not shown
+ serial0: filename=disconnected:telnet::0,server 
+                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ serial console port not shown
  compat_monitor0: filename=stdio
  (qemu)

** Description changed:

With Qemu 2.1.2
===============
- pharidos@uks2:~/work/tplaf/☸ qemu-system-x86_64 -hda /space/pharidos/Disks/Blank_disk.qcow2 -serial telnet::0,server,nowait -nographic
+ pharidos@uks2:~$ qemu-system-x86_64 -hda Disk.qcow2 -serial telnet::0,server,nowait -nographic
QEMU 2.1.2 monitor - type 'help' for more information
(qemu) info chardev
parallel0: filename=null
serial0: filename=telnet:0.0.0.0:44189,server
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^ serial console is using port 44189
+                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^ serial console is using port 44189
compat_monitor0: filename=stdio
(qemu)

With Qemu 2.5.0
===============
- pharidos@kvm:~/$ qemu-system-x86_64 -hda /space/pharidos/Disks/Blank_disk.qcow2 -serial telnet::0,server,nowait -nographic
+ pharidos@uks2:~$ qemu-system-x86_64 -hda Disk.qcow2 -serial telnet::0,server,nowait -nographic
QEMU 2.5.0 monitor - type 'help' for more information
(qemu) info chardev
parallel0: filename=null
- serial0: filename=disconnected:telnet::0,server
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ serial console port not shown
+ serial0: filename=disconnected:telnet::0,server
+                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ serial console port not shown
compat_monitor0: filename=stdio
(qemu)

Signature · 35 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1544524

Title:
  "info chardev" not showing the real port in use

Status in QEMU:
  New

Bug description:
  With Qemu 2.1.2
  ===============
  pharidos@uks2:~$ qemu-system-x86_64 -hda Disk.qcow2 -serial telnet::0,server,nowait -nographic
  QEMU 2.1.2 monitor - type 'help' for more information
  (qemu) info chardev
  parallel0: filename=null
  serial0: filename=telnet:0.0.0.0:44189,server
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^ serial console is using port 44189
  compat_monitor0: filename=stdio
  (qemu)

  With Qemu 2.5.0
  ===============
  pharidos@uks2:~$ qemu-system-x86_64 -hda Disk.qcow2 -serial  telnet::0,server,nowait -nographic
  QEMU 2.5.0 monitor - type 'help' for more information
  (qemu) info chardev
  parallel0: filename=null
  serial0: filename=disconnected:telnet::0,server
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ serial console port not shown
  compat_monitor0: filename=stdio
  (qemu)

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1544524/+subscriptions
author
#1 lore raw

Also on quickly connecting to the ports via the netcat tool (hoping that it would make qemu to change its state from disconnected) I see the following error "Error in getpeername: Transport endpoint is not connected"

pharidos@uks2:~/$ qemu-system-x86_64 --enable-kvm -hda Sisk.qcow2 -serial telnet::0,server,nowait -serial telnet::0,server,nowait -nographic 
QEMU 2.5.0 monitor - type 'help' for more information
(qemu) info chardev
parallel0: filename=null
serial1: filename=disconnected:telnet::0,server
serial0: filename=disconnected:telnet::0,server
compat_monitor0: filename=stdio
(qemu) 

# COnnect quickly to the serial ports via netcat

pharidos@kvm:~/$ netstat -tupan 2>/dev/null | grep "LISTEN.* $(pgrep -f qemu)/qemu" | cut -d: -f2 | cut -d' ' -f1
45814
42522
pharidos@kvm:~/$ ports=$(netstat -tupan 2>/dev/null | grep "LISTEN.* $(pgrep -f qemu)/qemu" | cut -d: -f2 | cut -d' ' -f1)
pharidos@kvm:~/$ for p in $ports; do echo | nc -w0 kvm $p >/dev/null; done

# Check the port status again. We see the the error "Error in getpeername: Transport endpoint is not connected" (qemu) info chardev
parallel0: filename=null
serial1: filename=Error in getpeername: Transport endpoint is not connected

serial0: filename=Error in getpeername: Transport endpoint is not connected

compat_monitor0: filename=stdio
(qemu)

Signature · 35 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1544524

Title:
  "info chardev" not showing the real port in use

Status in QEMU:
  New

Bug description:
  With Qemu 2.1.2
  ===============
  pharidos@uks2:~$ qemu-system-x86_64 -hda Disk.qcow2 -serial telnet::0,server,nowait -nographic
  QEMU 2.1.2 monitor - type 'help' for more information
  (qemu) info chardev
  parallel0: filename=null
  serial0: filename=telnet:0.0.0.0:44189,server
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^ serial console is using port 44189
  compat_monitor0: filename=stdio
  (qemu)

  With Qemu 2.5.0
  ===============
  pharidos@uks2:~$ qemu-system-x86_64 -hda Disk.qcow2 -serial  telnet::0,server,nowait -nographic
  QEMU 2.5.0 monitor - type 'help' for more information
  (qemu) info chardev
  parallel0: filename=null
  serial0: filename=disconnected:telnet::0,server
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ serial console port not shown
  compat_monitor0: filename=stdio
  (qemu)

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1544524/+subscriptions
#2 lore raw
In reply to Prem Anand

Seems like this has been fixed in recent versions of QEMU again:

$ qemu-system-x86_64 -serial telnet::0,server,nowait -nographic
QEMU 3.1.93 monitor - type 'help' for more information
(qemu) info chardev
parallel0: filename=null
serial0: filename=disconnected:telnet:0.0.0.0:41346,server
compat_monitor0: filename=stdio

** Changed in: qemu
Status: New => Fix Released

Signature · 35 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1544524

Title:
  "info chardev" not showing the real port in use

Status in QEMU:
  Fix Released

Bug description:
  With Qemu 2.1.2
  ===============
  pharidos@uks2:~$ qemu-system-x86_64 -hda Disk.qcow2 -serial telnet::0,server,nowait -nographic
  QEMU 2.1.2 monitor - type 'help' for more information
  (qemu) info chardev
  parallel0: filename=null
  serial0: filename=telnet:0.0.0.0:44189,server
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^ serial console is using port 44189
  compat_monitor0: filename=stdio
  (qemu)

  With Qemu 2.5.0
  ===============
  pharidos@uks2:~$ qemu-system-x86_64 -hda Disk.qcow2 -serial  telnet::0,server,nowait -nographic
  QEMU 2.5.0 monitor - type 'help' for more information
  (qemu) info chardev
  parallel0: filename=null
  serial0: filename=disconnected:telnet::0,server
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ serial console port not shown
  compat_monitor0: filename=stdio
  (qemu)

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1544524/+subscriptions
author
#3 lore raw
In reply to Prem Anand

Yes. This was fixed some time back and I can confirm it working with qemu 2.8

QEMU 2.8.1 monitor - type 'help' for more information (qemu) info chardev
parallel0: filename=vc
serial0: filename=telnet:127.0.0.1:35293,server <-> 127.0.0.1:52820
compat_monitor0: filename=stdio

Signature · 35 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1544524

Title:
  "info chardev" not showing the real port in use

Status in QEMU:
  Fix Released

Bug description:
  With Qemu 2.1.2
  ===============
  pharidos@uks2:~$ qemu-system-x86_64 -hda Disk.qcow2 -serial telnet::0,server,nowait -nographic
  QEMU 2.1.2 monitor - type 'help' for more information
  (qemu) info chardev
  parallel0: filename=null
  serial0: filename=telnet:0.0.0.0:44189,server
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^ serial console is using port 44189
  compat_monitor0: filename=stdio
  (qemu)

  With Qemu 2.5.0
  ===============
  pharidos@uks2:~$ qemu-system-x86_64 -hda Disk.qcow2 -serial  telnet::0,server,nowait -nographic
  QEMU 2.5.0 monitor - type 'help' for more information
  (qemu) info chardev
  parallel0: filename=null
  serial0: filename=disconnected:telnet::0,server
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ serial console port not shown
  compat_monitor0: filename=stdio
  (qemu)

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1544524/+subscriptions