qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] How to run qemu with -nographic and -monitor but stil


From: Thomas Huth
Subject: Re: [Qemu-discuss] How to run qemu with -nographic and -monitor but still be able to send Ctrl+C to the guest?
Date: Mon, 9 Apr 2018 14:33:56 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 08.04.2018 12:39, Ciro Santilli wrote:
> https://stackoverflow.com/questions/49716931/how-to-run-qemu-with-nographic-and-monitor-but-still-be-able-to-send-ctrlc-to
> 
> I have just found out that if you run QEMU with `-monitor
> telnet::45454,server,nowait -nographic`, then Ctrl-C kills the QEMU VM
> instead of generating SIGINT on the guest:
> https://unix.stackexchange.com/questions/167165/how-to-pass-ctrl-c-to-the-guest-when-running-qemu-with-nographic/436321#436321
> 
> However, I don't want to remove `-monitor` because it is convenient to
> automate monitor commands, e.g. it allows me to create a helper script
> that does:
> 
>     echo 'savevm my_snap_id' |  telnet localhost 45454
> 
> Is there a way to both keep my `Ctrl-C` and `-monitor` working with
> `-nographic`?
> 
> Full QEMU command:
> 
>     qemu-system-x86_64 -append 'root=/dev/vda console=ttyS0' -kernel
> 'bzImage' -drive file='rootfs.ext2.qcow2,if=virtio,format=qcow2'
> -nographic -monitor telnet::45454,server,nowait

I think you need a chardev with signal=off for that. Try something like:

qemu-system-x86_64  -nographic -monitor telnet::45454,server,nowait \
  -chardev stdio,id=s1,signal=off \
  -serial none -device isa-serial,chardev=s1

 HTH,
  Thomas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]