summaryrefslogtreecommitdiff
path: root/pkg/machine/qemu/machine.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-06-02 04:20:06 -0400
committerGitHub <noreply@github.com>2022-06-02 04:20:06 -0400
commitf27f9de5e668afb50073f125f25f8f61618a5742 (patch)
tree2f754256eec22b716dd74a34414fb7341833d8ca /pkg/machine/qemu/machine.go
parent516c95526ab68e4a6e13008d60d0156178c8571c (diff)
parent8291b51ceb50ca3230aeeeb27930111a27a31290 (diff)
downloadpodman-f27f9de5e668afb50073f125f25f8f61618a5742.tar.gz
podman-f27f9de5e668afb50073f125f25f8f61618a5742.tar.bz2
podman-f27f9de5e668afb50073f125f25f8f61618a5742.zip
Merge pull request #14448 from baude/issue14231
expose podman.sock in machine inspect
Diffstat (limited to 'pkg/machine/qemu/machine.go')
-rw-r--r--pkg/machine/qemu/machine.go24
1 files changed, 15 insertions, 9 deletions
diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go
index e3fb3b970..f9119af94 100644
--- a/pkg/machine/qemu/machine.go
+++ b/pkg/machine/qemu/machine.go
@@ -1471,16 +1471,22 @@ func (v *MachineVM) Inspect() (*machine.InspectInfo, error) {
if err != nil {
return nil, err
}
-
+ connInfo := new(machine.ConnectionConfig)
+ podmanSocket, err := v.forwardSocketPath()
+ if err != nil {
+ return nil, err
+ }
+ connInfo.PodmanSocket = podmanSocket
return &machine.InspectInfo{
- ConfigPath: v.ConfigPath,
- Created: v.Created,
- Image: v.ImageConfig,
- LastUp: v.LastUp,
- Name: v.Name,
- Resources: v.ResourceConfig,
- SSHConfig: v.SSHConfig,
- State: state,
+ ConfigPath: v.ConfigPath,
+ ConnectionInfo: *connInfo,
+ Created: v.Created,
+ Image: v.ImageConfig,
+ LastUp: v.LastUp,
+ Name: v.Name,
+ Resources: v.ResourceConfig,
+ SSHConfig: v.SSHConfig,
+ State: state,
}, nil
}