MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / ExecuteLXCShellWithVM

Function ExecuteLXCShellWithVM

internal/ssh/client.go:184–186  ·  view source on GitHub ↗

ExecuteLXCShellWithVM opens an interactive session to an LXC container with automatic OS detection. This function automatically detects NixOS containers and uses the appropriate command to properly initialize the container environment. For NixOS containers, it uses 'pct exec' with environment setup

(user, nodeIP string, vm *api.VM, jumphost config.SSHJumpHost)

Source from the content-addressed store, hash-verified

182//
183// Returns an error if the connection fails.
184func ExecuteLXCShellWithVM(user, nodeIP string, vm *api.VM, jumphost config.SSHJumpHost) error {
185 return ExecuteLXCShellWith(context.Background(), NewDefaultExecutor(), user, nodeIP, vm.ID, vm, jumphost)
186}
187
188// ExecuteLXCShellWith opens an interactive session to an LXC container with full control options.
189//

Callers 1

openVMShellMethod · 0.92

Calls 2

ExecuteLXCShellWithFunction · 0.85
NewDefaultExecutorFunction · 0.85

Tested by

no test coverage detected