From 963858a361b9462a2d3fde8e96407ac7fa58067d Mon Sep 17 00:00:00 2001 From: "Bryan T. Richardson" Date: Mon, 11 Sep 2023 09:32:40 -0600 Subject: [PATCH] Use VM name when listing tunnels in case multiple VMs have same hostname --- cmd/minimega/cc_cli.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmd/minimega/cc_cli.go b/cmd/minimega/cc_cli.go index abb0fb5b6..e7b1636ee 100644 --- a/cmd/minimega/cc_cli.go +++ b/cmd/minimega/cc_cli.go @@ -272,7 +272,12 @@ func cliCCTunnel(ns *Namespace, c *minicli.Command, resp *minicli.Response) erro clients := ns.ccServer.GetClients() for _, client := range clients { - vms[client.Hostname] = client.UUID + vm := ns.FindVM(client.UUID) + if vm == nil { + return vmNotFound(client.UUID) + } + + vms[vm.GetName()] = client.UUID } } else { vm := ns.FindVM(v)