Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems booting on macOS #25

Open
brainrecursion opened this issue Jan 9, 2020 · 2 comments
Open

Problems booting on macOS #25

brainrecursion opened this issue Jan 9, 2020 · 2 comments

Comments

@brainrecursion
Copy link

Has anyone got this working with the latest macOS?

I have found to run macOS on QEMU I need to add several CPU feature flags including the invtsc flag, however this flag makes the VM non-migratable so the savevm command no longer works.

@r-ld
Copy link

r-ld commented Oct 11, 2021

Hello,

I'm also looking for information about the creation of macOS Virtual Machine.

With the help of the kholia/OSX-KVM project I've manage to create VM on macOS Big Sur or Monterey beta.

In order to create a snapshot I've removed the several options (CPU: invtsc ...)that were making the VM non-migratable.

I'm 'able' to create the snapshot but there are several issues with this approach:

  • I cant use ram and overlay files, only overlay file is used for snapshot storing.

  • On qemu-2.9.0 the savevm command is not stopping, I need to use the qemu-img info overlay.qcow2 command and kill qemu when the snapshot is shown with that command. (the problem is not present with qemu-4.2.0 btw)

  • Before using the savevm command I need to remove the OpenCoreBoot, drive used by the kholia/OSX-KVM project, to prevent qemu for writing the snapshot in it.

My snapshot seems to be valid, as I'm able to load it, but I guess there is one problem:

  1. when I'm trying to send the vuln_test agent to crash the vulnerable_driver I'm always getting the phys_addr == -1 errors in read_virtual_memory and write_virtual_memory in memory_access.c.

  2. when I'm sending the info agent the error is not reproduced as I'm able to get the several informations written to the info_buffer.

  3. I have the same issue between the several tested macOS version (HighSierra and BigSur)

So it's possible to read/write at virtual address in userland but it's not possible when the address is in kernelland ?

I bet the way I'm creating the VM, and the snapshot, is not good (or incomplete):

  • Does anyone have any idea why I'm encountering this problem ?
  • Does anyone could share a better way to create the macOS VM, and snapshot ?

Thank you

@r-ld
Copy link

r-ld commented Oct 25, 2021

@brainrecursion have you resolved your problems ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants