Fix the FS error when using Virtualization (#1041)

- Fixes #614.
- Use VZ cached mode instead of auto.

Signed-off-by: jwhur <jaewon_hur@apple.com>
This commit is contained in:
jwhur
2026-01-12 14:36:10 -08:00
committed by GitHub
parent e465b109b2
commit 837aa5eb83
@@ -84,9 +84,13 @@ public struct Filesystem: Sendable, Codable {
self.options = options
}
// Defaulting to CachedMode = .on (i.e., cached mode) to fix Linux FS issue when using Virtualization
// * https://github.com/apple/container/issues/614
// * https://github.com/utmapp/UTM/pull/5919
/// A block based filesystem.
public static func block(
format: String, source: String, destination: String, options: MountOptions, cache: CacheMode = .auto,
format: String, source: String, destination: String, options: MountOptions, cache: CacheMode = .on,
sync: SyncMode = .fsync
) -> Filesystem {
.init(
@@ -100,7 +104,7 @@ public struct Filesystem: Sendable, Codable {
/// A named volume filesystem.
public static func volume(
name: String, format: String, source: String, destination: String, options: MountOptions,
cache: CacheMode = .auto, sync: SyncMode = .fsync
cache: CacheMode = .on, sync: SyncMode = .fsync
) -> Filesystem {
.init(
type: .volume(name: name, format: format, cache: cache, sync: sync),