applehv

package
v4.8.1 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Rendered for darwin/amd64

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToMachineStatus

func ToMachineStatus(val string) (machine.Status, error)

func VirtIOFsToVFKitVirtIODevice

func VirtIOFsToVFKitVirtIODevice(fs machine.VirtIoFs) vfConfig.VirtioFs

func VirtualizationProvider

func VirtualizationProvider() machine.VirtProvider

Types

type AppleHVVirtualization

type AppleHVVirtualization struct {
	machine.Virtualization
}

func (AppleHVVirtualization) CheckExclusiveActiveVM

func (v AppleHVVirtualization) CheckExclusiveActiveVM() (bool, string, error)

func (AppleHVVirtualization) IsValidVMName

func (v AppleHVVirtualization) IsValidVMName(name string) (bool, error)

func (AppleHVVirtualization) List

func (AppleHVVirtualization) LoadVMByName

func (v AppleHVVirtualization) LoadVMByName(name string) (machine.VM, error)

func (AppleHVVirtualization) NewMachine

func (v AppleHVVirtualization) NewMachine(opts machine.InitOptions) (machine.VM, error)

func (AppleHVVirtualization) RemoveAndCleanMachines

func (v AppleHVVirtualization) RemoveAndCleanMachines() error

func (AppleHVVirtualization) VMType

type Endpoint

type Endpoint string

type MMHardwareConfig

type MMHardwareConfig struct {
	CPUs     uint16
	DiskPath string
	DiskSize uint64
	Memory   int32
}

type MacMachine

type MacMachine struct {
	// ConfigPath is the fully qualified path to the configuration file
	ConfigPath define.VMFile
	// HostUser contains info about host user
	machine.HostUser
	// ImageConfig describes the bootable image
	machine.ImageConfig
	// Mounts is the list of remote filesystems to mount
	Mounts []machine.Mount
	// Name of VM
	Name string
	// ReadySocket tells host when vm is booted
	ReadySocket define.VMFile
	// ResourceConfig is physical attrs of the VM
	machine.ResourceConfig
	// SSHConfig for accessing the remote vm
	machine.SSHConfig
	// Starting tells us whether the machine is running or if we have just dialed it to start it
	Starting bool
	// Created contains the original created time instead of querying the file mod time
	Created time.Time
	// LastUp contains the last recorded uptime
	LastUp time.Time
	// The VFKit endpoint where we can interact with the VM
	Vfkit       VfkitHelper
	LogPath     define.VMFile
	GvProxyPid  define.VMFile
	GvProxySock define.VMFile
	// contains filtered or unexported fields
}

func (*MacMachine) Init

func (m *MacMachine) Init(opts machine.InitOptions) (bool, error)

func (*MacMachine) Inspect

func (m *MacMachine) Inspect() (*machine.InspectInfo, error)

func (*MacMachine) Remove

func (m *MacMachine) Remove(name string, opts machine.RemoveOptions) (string, func() error, error)

func (*MacMachine) SSH

func (m *MacMachine) SSH(name string, opts machine.SSHOptions) error

func (*MacMachine) Set

func (m *MacMachine) Set(name string, opts machine.SetOptions) ([]error, error)

func (*MacMachine) Start

func (m *MacMachine) Start(name string, opts machine.StartOptions) error

func (*MacMachine) State

func (m *MacMachine) State(_ bool) (machine.Status, error)

func (*MacMachine) Stop

func (m *MacMachine) Stop(name string, opts machine.StopOptions) error

type VZMachineState

type VZMachineState string

VZMachineState is what the restful service in vfkit will return

const (
	// Values that the machine can be in
	// "VirtualMachineStateStoppedVirtualMachineStateRunningVirtualMachineStatePausedVirtualMachineStateErrorVirtualMachineStateStartingVirtualMachineStatePausingVirtualMachineStateResumingVirtualMachineStateStopping"
	VZMachineStateStopped  VZMachineState = "VirtualMachineStateStopped"
	VZMachineStateRunning  VZMachineState = "VirtualMachineStateRunning"
	VZMachineStatePaused   VZMachineState = "VirtualMachineStatePaused"
	VZMachineStateError    VZMachineState = "VirtualMachineStateError"
	VZMachineStateStarting VZMachineState = "VirtualMachineStateStarting"
	VZMachineStatePausing  VZMachineState = "VirtualMachineStatePausing"
	VZMachineStateResuming VZMachineState = "VirtualMachineStateResuming"
	VZMachineStateStopping VZMachineState = "VirtualMachineStateStopping"
)

type VfkitHelper

type VfkitHelper struct {
	LogLevel        logrus.Level
	Endpoint        string
	VfkitBinaryPath *define.VMFile
	VirtualMachine  *vfConfig.VirtualMachine
}

VfkitHelper describes the use of vfkit: cmdline and endpoint

Jump to

Keyboard shortcuts

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