You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Request]: Disk size is missing from resources, only cpus and memory #518
It seems that there is a parameter missing for storage, always 512GiB?
-c, --cpus <cpus> Number of CPUs to allocate to the container -m, --memory <memory> Amount of memory in bytes, kilobytes (K), megabytes
/// Resources like cpu, memory, and storage quota.
public struct Resources: Sendable, Codable {
/// Number of CPU cores allocated.
public var cpus: Int = 4
/// Memory in bytes allocated.
public var memoryInBytes: UInt64 = 1024.mib()
/// Storage quota/size in bytes.
public var storage: UInt64?
public init() {}
}
var resource = ContainerConfiguration.Resources()
if let cpus {
resource.cpus = Int(cpus)
}
if let memory {
resource.memoryInBytes = try Parser.memoryString(memory).mib()
}
return resource
}
An approach we could take (that is completely feasible and I know works) for storage size is we can create a "dummy" ext4 blockdev and attach it to the vm and do an overlayfs with that dummy filesystem and the real one. The amount of space would be bound by however large the fs on the dummy block is (so you could choose much less or much more than 512GiB).
Activity
afbjorklund commentedon Aug 18, 2025
Also it is parsed as "mib" (which is a good thing, but not as documented):
jglogan commentedon Aug 19, 2025
@afbjorklund You can have any disk size you want as long as it is 512GB (today).
We're working on getting more storage features into the backlog, this will be one issue less to create. Thanks!
afbjorklund commentedon Aug 20, 2025
It is not a big deal ("512 GiB ought to be enough"), just noticed it was missing...
Setting storage size is also missing from the Docker and Kata containers, though.
dcantah commentedon Aug 20, 2025
An approach we could take (that is completely feasible and I know works) for storage size is we can create a "dummy" ext4 blockdev and attach it to the vm and do an overlayfs with that dummy filesystem and the real one. The amount of space would be bound by however large the fs on the dummy block is (so you could choose much less or much more than 512GiB).
afbjorklund commentedon Sep 28, 2025
I don't think this option will be needed, we will be using Docker for the Kata Containers and it doesn't have it either...