Merge pull request #7886 from utmapp/feature/apple-secure-boot

config: add Secure Boot option for Apple UEFI guests
This commit is contained in:
osy
2026-09-21 09:05:59 -05:00
committed by GitHub
3 changed files with 46 additions and 2 deletions
@@ -76,6 +76,9 @@ struct VMConfigAppleBootView: View {
} else if newValue {
config.genericPlatform = UTMAppleConfigurationGenericPlatform()
}
if !newValue {
config.boot.hasSecureBoot = false
}
}.alert(item: $alertBootloaderSelection) { selection in
let okay = Alert.Button.default(Text("OK")) {
importBootloaderSelection = selection
@@ -93,6 +96,11 @@ struct VMConfigAppleBootView: View {
allowedContentTypes: [importBootloaderSelection == .ipsw ? .ipsw : .data],
onCompletion: selectImportedFile)
if #available(macOS 27, *), operatingSystem == .linux && config.boot.hasUefiBoot {
Toggle("Secure Boot", isOn: $config.boot.hasSecureBoot)
.help("Only boot operating systems signed by Microsoft or a trusted vendor. Most major Linux distributions are supported.")
}
if operatingSystem == .linux && !config.boot.hasUefiBoot {
Section(header: Text("Linux Settings")) {
FileBrowseField("Kernel Image", url: $config.boot.linuxKernelURL, isFileImporterPresented: $importFileShown, hasClearButton: false) {