summaryrefslogtreecommitdiff
path: root/cmd/podman/machine/stop.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-12-26 13:26:07 +0100
committerGitHub <noreply@github.com>2021-12-26 13:26:07 +0100
commite06631d6c22f4d5b7a62f70ccdf623379a9d5fe7 (patch)
tree54fe3a08b58b9129f87e51cd1b8fcd938f582777 /cmd/podman/machine/stop.go
parent73a54ea54d0a1b4ccaa2a0e23c678e5b7c1d5c37 (diff)
parent803defbe509af1902a1fdc2ed7f41b49ebd241f6 (diff)
downloadpodman-e06631d6c22f4d5b7a62f70ccdf623379a9d5fe7.tar.gz
podman-e06631d6c22f4d5b7a62f70ccdf623379a9d5fe7.tar.bz2
podman-e06631d6c22f4d5b7a62f70ccdf623379a9d5fe7.zip
Merge pull request #12503 from n1hility/wsl-machine
Introduce Windows WSL implementation of podman machine
Diffstat (limited to 'cmd/podman/machine/stop.go')
-rw-r--r--cmd/podman/machine/stop.go15
1 files changed, 6 insertions, 9 deletions
diff --git a/cmd/podman/machine/stop.go b/cmd/podman/machine/stop.go
index 75666f734..17969298b 100644
--- a/cmd/podman/machine/stop.go
+++ b/cmd/podman/machine/stop.go
@@ -1,4 +1,5 @@
-// +build amd64,!windows arm64,!windows
+//go:build amd64 || arm64
+// +build amd64 arm64
package machine
@@ -7,7 +8,6 @@ import (
"github.com/containers/podman/v3/cmd/podman/registry"
"github.com/containers/podman/v3/pkg/machine"
- "github.com/containers/podman/v3/pkg/machine/qemu"
"github.com/spf13/cobra"
)
@@ -33,18 +33,15 @@ func init() {
// TODO Name shouldn't be required, need to create a default vm
func stop(cmd *cobra.Command, args []string) error {
var (
- err error
- vm machine.VM
- vmType string
+ err error
+ vm machine.VM
)
vmName := defaultMachineName
if len(args) > 0 && len(args[0]) > 0 {
vmName = args[0]
}
- switch vmType {
- default:
- vm, err = qemu.LoadVMByName(vmName)
- }
+ provider := getSystemDefaultProvider()
+ vm, err = provider.LoadVMByName(vmName)
if err != nil {
return err
}