On Mon, Apr 9, 2018 at 1:33 PM, Thomas Huth <th...@redhat.com> wrote:
> On 08.04.2018 12:39, Ciro Santilli wrote:
>> 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:
>> 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
>> 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
I tried that and Ctrl+C does get passed to the guest as I wanted.
However, when I do this, I noticed that I can't pass Ctrl+A X to
easily quit QEMU (I know I can do quit on the monitor).
Is there a way to also keep Ctrl+A X working, in addition to having
Ctrl+C passed to the guest?