From d4d76479c1660c0e7018df31d1ba91aa28bf855b Mon Sep 17 00:00:00 2001 From: Brent Baude Date: Wed, 18 Oct 2023 12:12:23 -0500 Subject: [PATCH] Kill gvproxy when machine rm -f In applehv, we were not killing gvproxy when stopping via podman machine rm with force. [NO NEW TESTS NEEDED] Signed-off-by: Brent Baude --- pkg/machine/applehv/machine.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/machine/applehv/machine.go b/pkg/machine/applehv/machine.go index 1253b1c802..cb3b2243af 100644 --- a/pkg/machine/applehv/machine.go +++ b/pkg/machine/applehv/machine.go @@ -397,6 +397,11 @@ func (m *MacMachine) Remove(name string, opts machine.RemoveOptions) (string, fu if err := m.Vfkit.stop(true, true); err != nil { return "", nil, err } + defer func() { + if err := machine.CleanupGVProxy(m.GvProxyPid); err != nil { + logrus.Error(err) + } + }() } files = m.collectFilesToDestroy(opts)