Detect if in podman machine virtual vm

When in podman machine virtual machines, podman needs to be able to
detect as such.  One implementation for this is when creating networks,
the podman-machine cni plugin needs to be added to the configuration.

This PR also includes the latest containers-common.

[NO TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
This commit is contained in:
Brent Baude
2021-04-30 09:12:22 -05:00
parent d6ec38f2ee
commit d21c1aafe2
10 changed files with 65 additions and 9 deletions

View File

@ -278,6 +278,15 @@ func defaultConfigFromMemory() (*EngineConfig, error) {
"/usr/bin/kata-qemu",
"/usr/bin/kata-fc",
},
"runsc": {
"/usr/bin/runsc",
"/usr/sbin/runsc",
"/usr/local/bin/runsc",
"/usr/local/sbin/runsc",
"/bin/runsc",
"/sbin/runsc",
"/run/current-system/sw/bin/runsc",
},
}
// Needs to be called after populating c.OCIRuntimes
c.OCIRuntime = c.findRuntime()
@ -299,6 +308,8 @@ func defaultConfigFromMemory() (*EngineConfig, error) {
c.RuntimeSupportsJSON = []string{
"crun",
"runc",
"kata",
"runsc",
}
c.RuntimeSupportsNoCgroups = []string{"crun"}
c.RuntimeSupportsKVM = []string{"kata", "kata-runtime", "kata-qemu", "kata-fc"}
@ -314,6 +325,7 @@ func defaultConfigFromMemory() (*EngineConfig, error) {
// TODO - ideally we should expose a `type LockType string` along with
// constants.
c.LockType = "shm"
c.MachineEnabled = false
return c, nil
}
@ -524,3 +536,7 @@ func (c *Config) Umask() string {
func (c *Config) LogDriver() string {
return c.Containers.LogDriver
}
func (c *Config) MachineEnabled() bool {
return c.Engine.MachineEnabled
}