From 8084c5ef241a7ced101454bc497d40f80e6ad840 Mon Sep 17 00:00:00 2001 From: Ashley Cui Date: Fri, 24 Sep 2021 15:41:57 -0400 Subject: Allow machine options to be set from containers.conf CPUS, memory, disk size, and image path defaults can be set from [machine] table in containers.conf [NO TESTS NEEDED] Signed-off-by: Ashley Cui --- cmd/podman/machine/init.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cmd/podman/machine') diff --git a/cmd/podman/machine/init.go b/cmd/podman/machine/init.go index ee32e6442..f6ce9956e 100644 --- a/cmd/podman/machine/init.go +++ b/cmd/podman/machine/init.go @@ -39,7 +39,7 @@ func init() { cpusFlagName := "cpus" flags.Uint64Var( &initOpts.CPUS, - cpusFlagName, 1, + cpusFlagName, cfg.Machine.CPUs, "Number of CPUs", ) _ = initCmd.RegisterFlagCompletionFunc(cpusFlagName, completion.AutocompleteNone) @@ -47,7 +47,7 @@ func init() { diskSizeFlagName := "disk-size" flags.Uint64Var( &initOpts.DiskSize, - diskSizeFlagName, 10, + diskSizeFlagName, cfg.Machine.DiskSize, "Disk size in GB", ) @@ -56,7 +56,7 @@ func init() { memoryFlagName := "memory" flags.Uint64VarP( &initOpts.Memory, - memoryFlagName, "m", 2048, + memoryFlagName, "m", cfg.Machine.Memory, "Memory in MB", ) _ = initCmd.RegisterFlagCompletionFunc(memoryFlagName, completion.AutocompleteNone) -- cgit v1.2.3-54-g00ecf