Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #201810

Re: qemu redirecting guest output in terminal

From Reco <recoverym4n@enotuniq.net>
Newsgroups linux.debian.user
Subject Re: qemu redirecting guest output in terminal
Date 2018-10-28 18:40 +0100
Message-ID <wNXcB-df-13@gated-at.bofh.it> (permalink)
References (1 earlier) <wMT1n-2o5-7@gated-at.bofh.it> <wN4zv-14X-1@gated-at.bofh.it> <wNavf-4uM-7@gated-at.bofh.it> <wNbB0-56Z-11@gated-at.bofh.it> <wNWzT-8cS-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


	Hi.


On Sun, Oct 28, 2018 at 05:51:13PM +0100, john doe wrote:
> On 10/26/2018 4:44 PM, Reco wrote:
> > Nah, we don't do Windows here. Way too many quirks for my personal
> > taste.
> > What you can try is to replace stdio with telnet:
> > 
> > qemu -hda debian.img -m 1024 \
> > 	-chardev socket,id=tty0,port=5555,server,telnet \
> > 	-serial chardev:tty0 -nographic \
> > 	-kernel vmlinux -append 'console=ttyS0,115200n8' \
> > 	-initrd initrd.gz
> > 
> > Port 5555 is just an example, obviously.
> > And you'll need telnet, but since you're using Cygwin you should got it
> > covered.
> > 
> 
> While trying the above command, I get an error probably because I didn't
> install the telnet package on Cygwin.

No, it was because I left out one argument that did not have a default
value. This should work (works for me at least):

qemu -hda debian.img -m 1024 \
	-chardev socket,id=tty0,host=127.0.0.1,port=5555,server,telnet \
	-serial chardev:tty0 -nographic \
	-kernel vmlinux -append 'console=ttyS0,115200n8' \
	-initrd initrd.gz

If you're seeing something like:

QEMU waiting for connection on: disconnected:telnet:127.0.0.1:5555,server

that means it works, connect with telnet, or netcat, or whatever.


> Qemu supports using COM port and I have install com0com (1) but when
> using '-serial COM25' I get the following error:
> 
> $ qemu-system-x86_64.exe -drive file=debian.img,format=raw -boot c -m
> 8192 -nographic -accel hax -machine q35 -serial COM25
> HAX is working and emulator runs in fast virt mode.
> QEMU 3.0.0 monitor - type 'help' for more information
> (qemu) C:\Program Files\qemu\qemu-system-x86_64.exe: -serial COM25:
> Failed CreateFile (2)
> C:\Program Files\qemu\qemu-system-x86_64.exe: -serial COM25: could not
> connect serial device to character backend 'COM25'
> 
> I guess I'm missing something in the above command?

-serial [dev] means:

Redirect the virtual serial port to host character device dev.

As I wrote earlier, we don't do Windows here, so I cannot produce a
Windows equivalent of /dev/com25.


> > 
> >> Using Cygwin the output is not mest up but during the installation I'm
> >> stuck at:
> >>
> >> "No disk drive was detected. If you know the name of the driver needed
> >> by your
> >> disk drive, you can select it from the list.
> >> Driver needed for your disk drive:
> >>   1: continue with no disk drive [*], 46: loop,"
> >>
> >> Should I select the default option (1) or what should I do?
> > 
> > No, that means that whatever you did with Cygwin denied QEMU read-write
> > access to a file that represents a disk drive. An installation is
> > impossible.
> > 
> 
> Yep, removing 'debian.img' an recreating it by doing the below command
> did it:
> 
> $ qemu-img create debian.img 25G

Reco

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

qemu redirecting guest output in terminal john doe <johndoe65534@mail.com> - 2018-10-25 17:30 +0200
  Re: qemu redirecting guest output in terminal Reco <recoverym4n@enotuniq.net> - 2018-10-25 21:00 +0200
    Re: qemu redirecting guest output in terminal john doe <johndoe65534@mail.com> - 2018-10-26 09:20 +0200
      Re: qemu redirecting guest output in terminal john doe <johndoe65534@mail.com> - 2018-10-26 15:40 +0200
        Re: qemu redirecting guest output in terminal Reco <recoverym4n@enotuniq.net> - 2018-10-26 16:50 +0200
          Re: qemu redirecting guest output in terminal john doe <johndoe65534@mail.com> - 2018-10-28 18:00 +0100
            Re: qemu redirecting guest output in terminal Reco <recoverym4n@enotuniq.net> - 2018-10-28 18:40 +0100
              Re: qemu redirecting guest output in terminal john doe <johndoe65534@mail.com> - 2018-10-28 20:20 +0100

csiph-web