Skip to content

Commit ca14033

Browse files
committed
Add defaults for machine-image
Fixes: https://issues.redhat.com/browse/RUN-3578 Signed-off-by: Nicola Sella <[email protected]>
1 parent 89c55a3 commit ca14033

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
@@ -305,14 +305,11 @@ func defaultMachineConfig() MachineConfig {
305305
return MachineConfig{
306306
CPUs: uint64(cpus),
307307
DiskSize: 100,
308-
// TODO: Set machine image default here
309-
// Currently the default is set in Podman as we need time to stabilize
310-
// VM images and locations between different providers.
311-
Image: "",
312-
Memory: 2048,
313-
User: getDefaultMachineUser(),
314-
Volumes: attributedstring.NewSlice(getDefaultMachineVolumes()),
315-
Rosetta: true,
308+
Image: "docker://quay.io/podman/machine-os",
309+
Memory: 2048,
310+
User: getDefaultMachineUser(),
311+
Volumes: attributedstring.NewSlice(getDefaultMachineVolumes()),
312+
Rosetta: true,
316313
}
317314
}
318315

0 commit comments

Comments
 (0)