diff --git a/pkg/machinedriver/driver.go b/pkg/machinedriver/driver.go index c427b88c..0211d594 100644 --- a/pkg/machinedriver/driver.go +++ b/pkg/machinedriver/driver.go @@ -21,6 +21,7 @@ import ( "log/slog" "os" + "github.com/containers/common/pkg/strongunits" "github.com/containers/podman/v5/pkg/machine" "github.com/containers/podman/v5/pkg/machine/define" "github.com/containers/podman/v5/pkg/machine/env" @@ -121,7 +122,7 @@ func (d *Driver) initOpts() *define.InitOptions { initOpts.Name = d.MachineName initOpts.CPUS = uint64(d.VMDriver.CPU) - initOpts.DiskSize = d.VMDriver.DiskCapacity + initOpts.DiskSize = uint64(strongunits.ToGiB(strongunits.B(d.VMDriver.DiskCapacity))) initOpts.Memory = uint64(d.VMDriver.Memory) initOpts.TimeZone = "" initOpts.ReExec = false