vm

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2026 License: MPL-2.0 Imports: 18 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package vm is `openvicloud vm`: the VM lifecycle (lifecycle.go), and `vm ssh` with the tunnel it runs as ssh's ProxyCommand.

A VM has no public address: ssh reaches it through a websocket to the control plane, which runs nc to port 22 inside the guest (titan-ops features/vm/design.md#ssh-session). `vm ssh` starts the system ssh with that tunnel; the customer's key and known_hosts stay ssh's business.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(deps *command.Deps) *cobra.Command

func SshArgs

func SshArgs(self string, id string, name string, user string, extra []string) []string

SshArgs are the arguments of the system ssh: the tunnel as ProxyCommand, and a host key alias per VM so known_hosts tells VMs apart although every one is reached the same way. The destination comes before extra: ssh still reads options after it, and the first word that is not an option starts the remote command.

func Tunnel

func Tunnel(ctx context.Context, deps *command.Deps, vmId string, in io.Reader, out io.Writer) error

Tunnel copies in to the VM's port 22 and the VM's answer to out, until either side ends or ctx is done; then the websocket is closed normally, which ends the command in the guest at once.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL