I have a similar setup on a Windows 10 machine that doesn't have any such issues. This tread about macOS version 10.15.2.

If the QEMU window is not visible (hidden, minimized or another application is in full screen mode), the QEMU process gradually freezes: it still runs, but the VM does not respond to external requests such as Telnet or SSH until the QEMU window is visible on the desktop.

I need to run QEMU as a separate background process so i use additional stty command to prevent job suspending. Full command line looks like that:

(sudo sleep 1; sudo ifconfig bridge0 addm tap0) &!
sudo stty -tostop
sudo qemu-system-x86_64 -nodefaults \
-cpu host -accel hvf -smp 1 -m 384 \
-device virtio-blk-pci,drive=flash0 \
-drive file=vios-adventerprisek9-m.vmdk.SPA.156-1.T.vmdk,if=none,format=vmdk,id=flash0 \
-device e1000,netdev=local -netdev tap,id=local,ifname=tap0,script=no,downscript=no \
-serial vc &

I didn't use the -daemonize argument because nothing happens when QEMU starts with it: the process opens the TAP interface, but does not respond to external requests (when using -monitor telnet:<PORT>,server,nowait, the connection is not possible).

I have also tried playing around with other ways, with no success:

  • nohup
  • disown
  • -icount sleep=no
  • -rtc base=...,clock=...,driftfix=slew
  • -overcommit cpu-pm=on
  • -no-hpet
  • -no-acpi
  • -machine hmat=on

I think it's a feature of macOS desktop environment processes handling, somehow related to power consumption, but I don't know how to manage it.

Update: The problem is in App Nap mechanism, but methods like defaults write NSGlobalDomain NSAppSleepDisabled -bool YES now wokring, QEMU still goes to App Nap enabled state.

How to turn it off for selected terminal process?

Update: Only one method was able to solve this problem — start process without desktop window with -display none argument (and with output from serial line to STDIO with -serial stdio argument).

Your Answer

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

Browse other questions tagged or ask your own question.