diff options
author | Brent Baude <bbaude@redhat.com> | 2021-04-30 09:12:22 -0500 |
---|---|---|
committer | Brent Baude <bbaude@redhat.com> | 2021-04-30 13:11:05 -0500 |
commit | d21c1aafe28cf59143655c7646f6eec7f9496686 (patch) | |
tree | d4e4cef44d422f877354f9892873fcfef486f2cd /libpod/network/create.go | |
parent | d6ec38f2eec6c9ac9e11db5cbf949a357fa13f28 (diff) | |
download | podman-d21c1aafe28cf59143655c7646f6eec7f9496686.tar.gz podman-d21c1aafe28cf59143655c7646f6eec7f9496686.tar.bz2 podman-d21c1aafe28cf59143655c7646f6eec7f9496686.zip |
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>
Diffstat (limited to 'libpod/network/create.go')
-rw-r--r-- | libpod/network/create.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libpod/network/create.go b/libpod/network/create.go index 4fe9b445f..aca8150b5 100644 --- a/libpod/network/create.go +++ b/libpod/network/create.go @@ -231,6 +231,10 @@ func createBridge(name string, options entities.NetworkCreateOptions, runtimeCon plugins = append(plugins, NewDNSNamePlugin(DefaultPodmanDomainName)) } } + // Add the podman-machine CNI plugin if we are in a machine + if runtimeConfig.MachineEnabled() { // check if we are in a machine vm + plugins = append(plugins, NewPodmanMachinePlugin()) + } ncList["plugins"] = plugins b, err := json.MarshalIndent(ncList, "", " ") if err != nil { |