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

Support booting into recovery mode / 1TR? #3526

Closed
Naville opened this issue Jan 23, 2022 · 16 comments
Closed

Support booting into recovery mode / 1TR? #3526

Naville opened this issue Jan 23, 2022 · 16 comments
Labels
enhancement New feature or request macOS macOS issues
Milestone

Comments

@Naville
Copy link

Naville commented Jan 23, 2022

Hi:

Is it possible for me to boot into recovery mode when running macOS using Virtualization.framework on Apple Silicon Mac?
Otherwise SIP can't be disabled?

EDIT:
To be clear, we are talking about 1TR which is possible only with a physical press on the TouchID sensor for a physical AppleSilicon Mac

Configuration

  • UTM Version: v3.0.4
  • OS Version: macOS 12.1
  • Apple Silicon
@osy osy added the macOS macOS issues label Jan 24, 2022
@osy
Copy link
Contributor

osy commented Jan 24, 2022

Currently this isn’t possible without private framework calls. See https://github.com/saagarjha/VirtualApple for an example of how if can be implemented.

@osy osy added the enhancement New feature or request label Jan 24, 2022
@osy
Copy link
Contributor

osy commented Jan 24, 2022

I would be curious if you can take VirtualApple’s aux files and copy it to the .utm and if that would work.

@Naville
Copy link
Author

Naville commented Jan 24, 2022

@osy I saw that yesterday and implemented my little tool based off UTM.
I wonder if that should be added to UTM upstream though🤔

@anoane
Copy link

anoane commented Feb 21, 2022

Currently this isn’t possible without private framework calls. See https://github.com/saagarjha/VirtualApple for an example of how if can be implemented.

Using virt framework recovery works fine, csrutil/bputil work fine, nvram can be set, but I still have some extra issues with spctl (some settings are not sticky)
saagarjha/VirtualApple#2
Any idea? @osy @Naville

@Naville
Copy link
Author

Naville commented Feb 22, 2022

@anoane From what I heard, they are just not supported in current version of the VM Kernel. I mean you can set them but

@Naville
Copy link
Author

Naville commented Feb 22, 2022

@anoane To be clear, vmapple uses a much stripped down version of the macOS kernel and lacks a bunch of critical features, I ended up just dual-booting another macOS install

@steven-michaud
Copy link

I've found a workaround for this bug.

@kFYatek
Copy link

kFYatek commented Jun 8, 2022

I would be curious if you can take VirtualApple’s aux files and copy it to the .utm and if that would work.

@osy This is quite an old issue, so I'm not entirely sure if this is still relevant, but when the disk image and AUX image are shared between UTM and VirtualApple (e.g. the relevant paths hard-link to the same files; UTM's disk0.img is VirtualApple's disk.img; UTM's AuxiliaryStorage is VirtualApple's aux.img), and the hardwareModel and machineIdentifier metadata are set to the same base64 values in UTM's config.plist and VirtualApple's metadata.json, the same VM can indeed be booted both under UTM and VirtualApple.

However, VirtualApple's way of booting into recovery seems to be applied at runtime, so it does not cause UTM to boot into recovery. But any changes made in VirtualApple, to either the disk or NVRAM, are reflected in UTM. And vice versa of course.

Also, just an observation: @steven-michaud's workaround mentioned above boots in to the "Fallback recoveryOS" as Apple calls it (1TR located on the backup recovery partition, i.e. disk0s3) while the private API used by VirtualApple boots into the "Paired recoveryOS" (located on the Recovery volume on the main system partition).

@kFYatek
Copy link

kFYatek commented Jun 9, 2022

I also just found out that there is a public API for booting into recovery in macOS Ventura beta, see https://developer.apple.com/documentation/virtualization/vzmacosvirtualmachinestartoptions/4013558-startupfrommacosrecovery

@pistachiomatt
Copy link

@osy It looks like this was fixed but it's not in the docs. How to boot into recovery mode?

@osy
Copy link
Contributor

osy commented Dec 31, 2022

You should be able to right click on the VM and choose boot into recovery mode. I will make sure to update the docs.

@mig8447
Copy link

mig8447 commented Feb 19, 2023

I do not get the "Boot into recovery mode button" on the latest UTM

@kFYatek
Copy link

kFYatek commented Feb 20, 2023

I do not get the "Boot into recovery mode button" on the latest UTM

Which version of macOS are you running? I'm pretty sure this is only available in Ventura.

@mig8447
Copy link

mig8447 commented Feb 22, 2023

I was trying on macOS Monterey, then upgraded to Ventura and the button still didn't show, I ended up following this workaround #3904 (comment) and left a 128MB disk in my vm so I can access this again.

@kFYatek
Copy link

kFYatek commented Feb 22, 2023

Sierra? So you're probably running on an Intel Mac? I'm pretty sure that this functionality only applies to Apple Silicon.

@mig8447
Copy link

mig8447 commented Feb 22, 2023

Not Sierra, sorry, Monterey on an M1 Mac. Upgraded Monterey to Ventura and this menu isn't showing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request macOS macOS issues
Projects
None yet
Development

No branches or pull requests

7 participants