Link Search Menu Expand Document

VM Debugging

This page contains known issues students have encountered with virtual machine software. If you run into issues not on this page or still have issues after following the instructions on this page, feel free to post on Ed!

QEMU Issues

-accel hvf: Unknown Error on macOS

If you get an error if the form qemu-system-x86_64: -accel hvf: Unknown Error and QEMU immediately aborts and exits, this indicates that you have an issue with your Homebrew or QEMU installation. To confirm, run file $(which qemu-system-x86_64). If the output of this command indicates that QEMU is an x86_64 executable, then you have an issue with your Homebrew installation.

This usually happens because you migrated all the data from an Intel (x86-64) Mac to an Apple silicon (ARM) Mac. Homebrew functions differently on x86-64 and ARM devices, so copying over the Homebrew installation data from your old device causes the wrong version of QEMU to be installed—namely, the x86-64 version of QEMU rather than the ARM version of QEMU that can run natively on your Apple silicon Mac.

To fix this, you will need to reinstall your Homebrew installation. Follow the following instructions:

  1. Ensure that you are not running on an x86-64 terminal or shell. If you are using the native macOS Terminal and default shells zsh or Bash, this should not be an issue (though it would be good to verify).

    Run the arch command. If the output is i386, then you need to reinstall your custom terminal or custom shell. If the output is arm64, then you may proceed to the next step.

  2. Export your current Homebrew installed packages state by running

    $ brew bundle dump

    This will create a Brewfile in your current directory.

  3. Uninstall Homebrew by running the following command:

    $ /bin/bash -c "$(curl -fsSL" /bin/bash --path=/usr/local
  4. Reinstall Homebrew by running the following command:

    $ /bin/bash -c "$(curl -fsSL"

    Make sure you follow the instructions for adding Homebrew to your PATH. The installation prompts will provide you with information on how to do this specific to your shell.

  5. Reinstall your exported packages by running the following command:

    $ brew bundle --file Brewfile