Documentation ¶
Rendered for windows/amd64
Index ¶
- Constants
- Variables
- func GetVirtualizationProvider() machine.VirtProvider
- type HVSockPurpose
- type HVSockRegistryEntry
- type HyperVMachine
- func (m *HyperVMachine) Init(opts machine.InitOptions) (bool, error)
- func (m *HyperVMachine) Inspect() (*machine.InspectInfo, error)
- func (m *HyperVMachine) Remove(_ string, opts machine.RemoveOptions) (string, func() error, error)
- func (m *HyperVMachine) SSH(name string, opts machine.SSHOptions) error
- func (m *HyperVMachine) Set(name string, opts machine.SetOptions) ([]error, error)
- func (m *HyperVMachine) Start(name string, opts machine.StartOptions) error
- func (m *HyperVMachine) State(_ bool) (machine.Status, error)
- func (m *HyperVMachine) Stop(name string, opts machine.StopOptions) error
- type Virtualization
- func (v Virtualization) Artifact() machine.Artifact
- func (v Virtualization) CheckExclusiveActiveVM() (bool, string, error)
- func (v Virtualization) Compression() machine.ImageCompression
- func (v Virtualization) Format() machine.ImageFormat
- func (v Virtualization) IsValidVMName(name string) (bool, error)
- func (v Virtualization) List(opts machine.ListOptions) ([]*machine.ListResponse, error)
- func (v Virtualization) LoadVMByName(name string) (machine.VM, error)
- func (v Virtualization) NewMachine(opts machine.InitOptions) (machine.VM, error)
- func (v Virtualization) RemoveAndCleanMachines() error
- func (v Virtualization) VMType() machine.VMType
Constants ¶
View Source
const ( // Some of this will need to change when we are closer to having // working code. VolumeTypeVirtfs = "virtfs" MountType9p = "9p" )
View Source
const ( // HvsockMachineName is the string identifier for the machine name in a registry entry HvsockMachineName = "MachineName" // HvsockPurpose is the string identifier for the sock purpose in a registry entry HvsockPurpose = "Purpose" // VsockRegistryPath describes the registry path to where the hvsock registry entries live VsockRegistryPath = `SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\GuestCommunicationServices` // LinuxVm is the default guid for a Linux VM on Windows LinuxVm = "FACB-11E6-BD58-64006A7986D3" )
Variables ¶
View Source
var ErrVSockRegistryEntryExists = errors.New("registry entry already exists")
Functions ¶
func GetVirtualizationProvider ¶
func GetVirtualizationProvider() machine.VirtProvider
Types ¶
type HVSockPurpose ¶ added in v4.6.0
type HVSockPurpose int
HVSockPurpose describes what the hvsock is needed for
const ( // Network implies the sock is used for user-mode networking Network HVSockPurpose = iota // Events implies the sock is used for notification (like "Ready") Events )
func (HVSockPurpose) Equal ¶ added in v4.6.0
func (hv HVSockPurpose) Equal(purpose string) bool
type HVSockRegistryEntry ¶ added in v4.6.0
type HVSockRegistryEntry struct { KeyName string `json:"key_name"` Purpose HVSockPurpose `json:"purpose"` Port uint64 `json:"port"` MachineName string `json:"machineName"` Key registry.Key `json:"key,omitempty"` }
HVSockRegistryEntry describes a registry entry used in Windows for HVSOCK implementations
func LoadHVSockRegistryEntry ¶ added in v4.6.0
func LoadHVSockRegistryEntry(port uint64) (*HVSockRegistryEntry, error)
func NewHVSockRegistryEntry ¶ added in v4.6.0
func NewHVSockRegistryEntry(machineName string, purpose HVSockPurpose) (*HVSockRegistryEntry, error)
NewHVSockRegistryEntry is a constructor to make a new registry entry in Windows. After making the new object, you must call the add() method to *actually* add it to the Windows registry.
func (*HVSockRegistryEntry) Add ¶ added in v4.6.0
func (hv *HVSockRegistryEntry) Add() error
Add creates a new Windows registry entry with string values from the HVSockRegistryEntry.
func (*HVSockRegistryEntry) Listen ¶ added in v4.6.0
func (hv *HVSockRegistryEntry) Listen() error
Listen is used on the windows side to listen for anything to come over the hvsock as a signal the vm is booted
func (*HVSockRegistryEntry) Remove ¶ added in v4.6.0
func (hv *HVSockRegistryEntry) Remove() error
Remove deletes the registry key and its string values
type HyperVMachine ¶
type HyperVMachine struct { // ConfigPath is the fully qualified path to the configuration file ConfigPath machine.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 // NetworkVSock is for the user networking NetworkHVSock HVSockRegistryEntry // ReadySocket tells host when vm is booted ReadyHVSock HVSockRegistryEntry // 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 }
func (*HyperVMachine) Init ¶
func (m *HyperVMachine) Init(opts machine.InitOptions) (bool, error)
func (*HyperVMachine) Inspect ¶
func (m *HyperVMachine) Inspect() (*machine.InspectInfo, error)
func (*HyperVMachine) Remove ¶
func (m *HyperVMachine) Remove(_ string, opts machine.RemoveOptions) (string, func() error, error)
func (*HyperVMachine) SSH ¶
func (m *HyperVMachine) SSH(name string, opts machine.SSHOptions) error
func (*HyperVMachine) Set ¶
func (m *HyperVMachine) Set(name string, opts machine.SetOptions) ([]error, error)
func (*HyperVMachine) Start ¶
func (m *HyperVMachine) Start(name string, opts machine.StartOptions) error
func (*HyperVMachine) Stop ¶
func (m *HyperVMachine) Stop(name string, opts machine.StopOptions) error
type Virtualization ¶
type Virtualization struct {
// contains filtered or unexported fields
}
func (Virtualization) Artifact ¶
func (v Virtualization) Artifact() machine.Artifact
func (Virtualization) CheckExclusiveActiveVM ¶
func (v Virtualization) CheckExclusiveActiveVM() (bool, string, error)
func (Virtualization) Compression ¶
func (v Virtualization) Compression() machine.ImageCompression
func (Virtualization) Format ¶
func (v Virtualization) Format() machine.ImageFormat
func (Virtualization) IsValidVMName ¶
func (v Virtualization) IsValidVMName(name string) (bool, error)
func (Virtualization) List ¶
func (v Virtualization) List(opts machine.ListOptions) ([]*machine.ListResponse, error)
func (Virtualization) LoadVMByName ¶
func (v Virtualization) LoadVMByName(name string) (machine.VM, error)
func (Virtualization) NewMachine ¶
func (v Virtualization) NewMachine(opts machine.InitOptions) (machine.VM, error)
func (Virtualization) RemoveAndCleanMachines ¶
func (v Virtualization) RemoveAndCleanMachines() error
func (Virtualization) VMType ¶
func (v Virtualization) VMType() machine.VMType
Click to show internal directories.
Click to hide internal directories.