0

The command I use on debian: qemu-system-x86_64 -smp cores=8 --enable-kvm -m 2048 -vga cirrus -hda freedos.img -full-screen

There are 3 ways to leave QEMU:

  1. Shortcut "ctrl+alt+2" will switch screen to QEMU monitor console and typing "quit" will go back to Debian.
  2. Shortcut "ctrl+alt+f" and "ctrl+alt+m" can show alt bar for exit.
  3. Typing "shutdown" in freedos will also go back to Debian.

Is there any way to modify the shortcut of QEMU monitor or detect if qemu is being shutdown to shutdown the whole PC?

0

What are you trying to achieve? If you want to prevent a locally seated user from leaving the VM and using the host OS, all you need is to log out from the host OS after starting the VM. Then, if the user shuts VM down and leaves, they will be presented with a login request, and be unable to do anything else.

If you want to prevent them from shutting down the VM at all, you need to achieve that with security measures of the guest OS.

The Ctrl+Alt+Fx combination has to be turned off separately - it is a feature of the kernel.

Overall, what you are trying to create is called a "kiosk mode". Try googling something on it. Usually it is set up for a browser, but there is no difference between a virtual machine window and any other app.

1
  • "ctrl+alt+f" and "ctrl+alt+m" are the shortcuts of qemu. One can toggle fullscreen and the other one can show menubar. It's not "Ctrl+Alt+Fx". I want to disable them.
    – Azreal
    May 18 '21 at 18:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.