Re: qemu redirecting guest output in terminal
- Date: Sun, 28 Oct 2018 20:13:56 +0100
- From: john doe <johndoe65534@xxxxxxxx>
- Subject: Re: qemu redirecting guest output in terminal
On 10/28/2018 6:37 PM, Reco wrote:
> 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
>>> 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
>> 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.
It is indeed, in Cygwin and in cmd.exe but not in powershell.
>> 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.
Nevermind, I can install/run the guest using telnet if using 'cmd.exe'.
I'm a happy camper!
Thanks for your help.