We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b78fa6b commit 96c89adCopy full SHA for 96c89ad
Sources/tart/Commands/Clone.swift
@@ -76,8 +76,10 @@ struct Clone: AsyncParsableCommand {
76
//
77
// So, once we clone the VM let's try to claim the rest of space for the VM to run without errors.
78
let unallocatedBytes = try sourceVM.sizeBytes() - sourceVM.allocatedSizeBytes()
79
- if unallocatedBytes > 0 {
80
- try Prune.reclaimIfNeeded(UInt64(unallocatedBytes), sourceVM)
+ // Avoid reclaiming an excessive amount of disk space.
+ let reclaimBytes = min(unallocatedBytes, 100 * 1024 * 1024 * 1024)
81
+ if reclaimBytes > 0 {
82
+ try Prune.reclaimIfNeeded(UInt64(reclaimBytes), sourceVM)
83
}
84
}, onCancel: {
85
try? FileManager.default.removeItem(at: tmpVMDir.baseURL)
0 commit comments