diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-04-26 08:38:33 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-26 08:38:33 -0400 |
commit | ace6672bf1a9b011a3c414783496668b5f27f3eb (patch) | |
tree | 90dc8797ae609979958867f6ac2ede95e2d46e4f /pkg/machine | |
parent | b3416d3292691788097389b8f41a632c56a926fa (diff) | |
parent | b0d36f63513ee64fa1c1eff4d1045a7633804f12 (diff) | |
download | podman-ace6672bf1a9b011a3c414783496668b5f27f3eb.tar.gz podman-ace6672bf1a9b011a3c414783496668b5f27f3eb.tar.bz2 podman-ace6672bf1a9b011a3c414783496668b5f27f3eb.zip |
Merge pull request #13908 from n1hility/win-mounts
Implement Windows volume/mount support
Diffstat (limited to 'pkg/machine')
-rw-r--r-- | pkg/machine/ignition.go | 20 | ||||
-rw-r--r-- | pkg/machine/wsl/machine.go | 4 |
2 files changed, 23 insertions, 1 deletions
diff --git a/pkg/machine/ignition.go b/pkg/machine/ignition.go index fe47437e3..35a9a30cb 100644 --- a/pkg/machine/ignition.go +++ b/pkg/machine/ignition.go @@ -304,6 +304,8 @@ ExecStart=/usr/bin/sleep infinity containers := `[containers] netns="bridge" ` + // Set deprecated machine_enabled until podman package on fcos is + // current enough to no longer require it rootContainers := `[engine] machine_enabled=true ` @@ -392,7 +394,7 @@ Delegate=memory pids cpu io FileEmbedded1: FileEmbedded1{Mode: intToPtr(0644)}, }) - // Set machine_enabled to true to indicate we're in a VM + // Set deprecated machine_enabled to true to indicate we're in a VM files = append(files, File{ Node: Node{ Group: getNodeGrp("root"), @@ -408,6 +410,22 @@ Delegate=memory pids cpu io }, }) + // Set machine marker file to indicate podman is in a qemu based machine + files = append(files, File{ + Node: Node{ + Group: getNodeGrp("root"), + Path: "/etc/containers/podman-machine", + User: getNodeUsr("root"), + }, + FileEmbedded1: FileEmbedded1{ + Append: nil, + Contents: Resource{ + Source: encodeDataURLPtr("qemu\n"), + }, + Mode: intToPtr(0644), + }, + }) + // Issue #11489: make sure that we can inject a custom registries.conf // file on the system level to force a single search registry. // The remote client does not yet support prompting for short-name diff --git a/pkg/machine/wsl/machine.go b/pkg/machine/wsl/machine.go index dff7bfef9..38bd4e96d 100644 --- a/pkg/machine/wsl/machine.go +++ b/pkg/machine/wsl/machine.go @@ -448,6 +448,10 @@ func configureSystem(v *MachineVM, dist string) error { return errors.Wrap(err, "could not create containers.conf for guest OS") } + if err := runCmdPassThrough("wsl", "-d", dist, "sh", "-c", "echo wsl > /etc/containers/podman-machine"); err != nil { + return errors.Wrap(err, "could not create podman-machine file for guest OS") + } + return nil } |