Skip to content

Commit

Permalink
fix disk size unit
Browse files Browse the repository at this point in the history
  • Loading branch information
cfergeau committed Jul 12, 2024
1 parent 43c9819 commit 6997207
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/machinedriver/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6997207

Please sign in to comment.