Documentation
¶
Index ¶
- Constants
- func DialQemu(ctx context.Context, unixSock string) (*os.File, error)
- func PassFDToUnix(unixSock string) (*os.File, error)
- type LimaVzDriver
- func (l *LimaVzDriver) AdditionalSetupForSSH(_ context.Context) error
- func (l *LimaVzDriver) ApplySnapshot(_ context.Context, _ string) error
- func (l *LimaVzDriver) BootScripts(_ context.Context) (map[string][]byte, error)
- func (l *LimaVzDriver) CaptureScreenshot(format string) ([]byte, error)
- func (l *LimaVzDriver) ChangeDisplayPassword(_ context.Context, _ string) error
- func (l *LimaVzDriver) Configure(_ context.Context, inst *limatype.Instance) (*driver.ConfiguredDriver, error)
- func (l *LimaVzDriver) Create(_ context.Context) error
- func (l *LimaVzDriver) CreateDisk(ctx context.Context) error
- func (l *LimaVzDriver) CreateSnapshot(_ context.Context, _ string) error
- func (l *LimaVzDriver) Delete(_ context.Context) error
- func (l *LimaVzDriver) DeleteSnapshot(_ context.Context, _ string) error
- func (l *LimaVzDriver) DisplayConnection(_ context.Context) (string, error)
- func (l *LimaVzDriver) ForwardGuestAgent(_ context.Context) bool
- func (l *LimaVzDriver) GuestAgentConn(_ context.Context) (net.Conn, string, error)
- func (l *LimaVzDriver) Info(_ context.Context) driver.Info
- func (l *LimaVzDriver) InspectStatus(_ context.Context, _ *limatype.Instance) string
- func (l *LimaVzDriver) ListSnapshots(_ context.Context) ([]driver.Snapshot, error)
- func (l *LimaVzDriver) Register(_ context.Context) error
- func (l *LimaVzDriver) RunGUI(_ context.Context) error
- func (l *LimaVzDriver) SSHAddress(_ context.Context) (string, error)
- func (l *LimaVzDriver) SetVsockEventCallback(callback func(*events.VsockEvent))
- func (l *LimaVzDriver) Start(ctx context.Context) (chan error, error)
- func (l *LimaVzDriver) Stop(ctx context.Context) error
- func (l *LimaVzDriver) Unregister(_ context.Context) error
- func (l *LimaVzDriver) Validate(_ context.Context) error
Constants ¶
const Enabled = true
Variables ¶
This section is empty.
Functions ¶
func DialQemu ¶
DialQemu connects to a QEMU-compatible network stack via Unix socket and returns a datagram connection file for VZ. VZ VM setup uses dialQemu instead to retain Virtualization.framework-owned descriptors for the VM lifetime.
func PassFDToUnix ¶
PassFDToUnix sends one side of a socketpair to unixSock and returns the other side to the caller. VZ VM setup uses passFDToUnix instead so descriptors that Virtualization.framework keeps using can be retained for exactly one VM.
Types ¶
type LimaVzDriver ¶
type LimaVzDriver struct {
Instance *limatype.Instance
SSHLocalPort int
// contains filtered or unexported fields
}
func New ¶
func New() *LimaVzDriver
func (*LimaVzDriver) AdditionalSetupForSSH ¶
func (l *LimaVzDriver) AdditionalSetupForSSH(_ context.Context) error
func (*LimaVzDriver) ApplySnapshot ¶
func (l *LimaVzDriver) ApplySnapshot(_ context.Context, _ string) error
func (*LimaVzDriver) BootScripts ¶
func (*LimaVzDriver) CaptureScreenshot ¶ added in v2.2.0
func (l *LimaVzDriver) CaptureScreenshot(format string) ([]byte, error)
CaptureScreenshot captures the VM display window. format is "png" or "bmp"; anything else defaults to PNG. Implements driver.Screenshotter. Requires the GUI app bundle to be running.
func (*LimaVzDriver) ChangeDisplayPassword ¶
func (l *LimaVzDriver) ChangeDisplayPassword(_ context.Context, _ string) error
func (*LimaVzDriver) Configure ¶
func (l *LimaVzDriver) Configure(_ context.Context, inst *limatype.Instance) (*driver.ConfiguredDriver, error)
func (*LimaVzDriver) CreateDisk ¶
func (l *LimaVzDriver) CreateDisk(ctx context.Context) error
func (*LimaVzDriver) CreateSnapshot ¶
func (l *LimaVzDriver) CreateSnapshot(_ context.Context, _ string) error
func (*LimaVzDriver) DeleteSnapshot ¶
func (l *LimaVzDriver) DeleteSnapshot(_ context.Context, _ string) error
func (*LimaVzDriver) DisplayConnection ¶
func (l *LimaVzDriver) DisplayConnection(_ context.Context) (string, error)
func (*LimaVzDriver) ForwardGuestAgent ¶
func (l *LimaVzDriver) ForwardGuestAgent(_ context.Context) bool
func (*LimaVzDriver) GuestAgentConn ¶
func (*LimaVzDriver) InspectStatus ¶
func (*LimaVzDriver) ListSnapshots ¶
func (*LimaVzDriver) SSHAddress ¶
func (l *LimaVzDriver) SSHAddress(_ context.Context) (string, error)
func (*LimaVzDriver) SetVsockEventCallback ¶ added in v2.1.0
func (l *LimaVzDriver) SetVsockEventCallback(callback func(*events.VsockEvent))
SetVsockEventCallback implements driver.VsockEventEmitter.
func (*LimaVzDriver) Unregister ¶
func (l *LimaVzDriver) Unregister(_ context.Context) error