Skip to content

Commit 019c0d3

Browse files
authored
Merge pull request #411 from inknos/run-3578
Add defaults for machine-image
2 parents 0443a77 + ca14033 commit 019c0d3

File tree

4 files changed

+8
-11
lines changed

4 files changed

+8
-11
lines changed

common/docs/containers.conf.5.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,7 @@ Number of CPU's a machine is created with.
992992

993993
The size of the disk in GB created when init-ing a podman-machine VM
994994

995-
**image**=""
995+
**image**="docker://quay.io/podman/machine-os"
996996

997997
Image used when creating a new VM using `podman machine init`.
998998
Can be specified as a registry with a bootable OCI artifact, download URL, or a local path.

common/pkg/config/config_local_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ var _ = Describe("Config Local", func() {
480480
// Given
481481
config, err := newLocked(&Options{}, &paths{})
482482
gomega.Expect(err).ToNot(gomega.HaveOccurred())
483-
gomega.Expect(config.Machine.Image).To(gomega.Equal(""))
483+
gomega.Expect(config.Machine.Image).To(gomega.Equal("docker://quay.io/podman/machine-os"))
484484
// When
485485
config2, err := newLocked(&Options{}, &paths{etc: "testdata/containers_default.conf"})
486486
// Then

common/pkg/config/containers.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,7 @@ default_sysctls = [
909909
# "https://example.com/linux/amd64/foobar.ami" on a Linux AMD machine.
910910
# If unspecified, the default Podman machine image will be used.
911911
#
912-
#image = ""
912+
#image = "docker://quay.io/podman/machine-os"
913913

914914
# Memory in MB a machine is created with.
915915
#

common/pkg/config/default.go

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -300,14 +300,11 @@ func defaultMachineConfig() MachineConfig {
300300
return MachineConfig{
301301
CPUs: uint64(cpus),
302302
DiskSize: 100,
303-
// TODO: Set machine image default here
304-
// Currently the default is set in Podman as we need time to stabilize
305-
// VM images and locations between different providers.
306-
Image: "",
307-
Memory: 2048,
308-
User: getDefaultMachineUser(),
309-
Volumes: attributedstring.NewSlice(getDefaultMachineVolumes()),
310-
Rosetta: true,
303+
Image: "docker://quay.io/podman/machine-os",
304+
Memory: 2048,
305+
User: getDefaultMachineUser(),
306+
Volumes: attributedstring.NewSlice(getDefaultMachineVolumes()),
307+
Rosetta: true,
311308
}
312309
}
313310

0 commit comments

Comments
 (0)