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

Option to run in recovery mode #91

Merged
merged 5 commits into from
May 19, 2022
Merged

Option to run in recovery mode #91

merged 5 commits into from
May 19, 2022

Conversation

fkorotkov
Copy link
Contributor

@fkorotkov fkorotkov commented May 18, 2022

Fixes #25

@trodemaster pointed out that @saagarjha found out the private API to start a VM in recovery mode. I kindly looked at VirtualApple implementation.

@fkorotkov fkorotkov requested a review from edigaryev May 18, 2022 21:30
@fkorotkov
Copy link
Contributor Author

The only problem that VirtualApple doesn't have a LICENCE file and I'm not sure if we can use it as a reference. @saagarjha, could you please clarify if it's OK by you that we used your finding. I've added a comment in VM+Recovery.swift to reflect our appreciation.

@saagarjha
Copy link

I went ahead and licensed VirtualApple under GPLv3, so you are free to use it under the terms of that license.

As a side note, I'm not a lawyer but I don't think I could claim copyright on the technique of booting into recovery, since it's morally just one line of code and unlikely to be considered large enough to be a work by itself. This isn't quite relevant here since you are using my specific way of calling that SPI, but had you done it yourself it probably would've been fine. Credit is always nice, though, regardless of whether it's required :)

As another side note, you may wish to look into using MainActor to execute your calls ;)

@fkorotkov
Copy link
Contributor Author

@saagarjha thank you for your response! Reworked the invocation method in f2de926. Kudos for finding out about the _VZVirtualMachineStartOptions! 🙌

@fkorotkov fkorotkov marked this pull request as ready for review May 19, 2022 11:08
@fkorotkov fkorotkov merged commit 0a257a1 into main May 19, 2022
@fkorotkov fkorotkov deleted the recovery branch May 19, 2022 12:17
@dan-snelson
Copy link

Confirmed working in 0.5.0:

tart run 12.4_21F79-base-clone-2022-05-20-164841 --recovery

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

Successfully merging this pull request may close these issues.

Option to boot in recovery mode
4 participants