Extend VM Service Linux Support
Nucleic-Session: 44D29355-D1D8-4327-97B6-B1AEBD5EDE57 Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
@@ -1034,6 +1034,33 @@ private struct MacVMSettingsTab: View {
|
||||
}
|
||||
}
|
||||
|
||||
/// Kick off the Linux base build. `linuxBuilding` routes the shared progress bar to the Linux
|
||||
/// section (only one base builds at a time).
|
||||
private func runLinuxBaseBuild() async {
|
||||
linuxBuilding = true
|
||||
linuxBuildError = nil
|
||||
defer { linuxBuilding = false }
|
||||
do {
|
||||
try await store.buildLinuxVMBaseImage()
|
||||
} catch {
|
||||
linuxBuildError = "\(error)"
|
||||
}
|
||||
linuxBaseStatus = await store.linuxVMBaseStatus()
|
||||
}
|
||||
|
||||
/// Delete the installed Linux base so the next build rebuilds from scratch.
|
||||
private func deleteLinuxBaseImage() async {
|
||||
linuxDeleting = true
|
||||
linuxBuildError = nil
|
||||
defer { linuxDeleting = false }
|
||||
do {
|
||||
try await store.deleteLinuxVMBaseImage()
|
||||
linuxBaseStatus = await store.linuxVMBaseStatus()
|
||||
} catch {
|
||||
linuxBuildError = "\(error)"
|
||||
}
|
||||
}
|
||||
|
||||
/// Delete the installed base (and cached restore image) so the next build reinstalls macOS from
|
||||
/// scratch. Refreshes status immediately so the panel flips back to "Build base image".
|
||||
private func deleteBaseImage(includingRestoreImages: Bool) async {
|
||||
|
||||
Reference in New Issue
Block a user