parallels

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2021 License: MPL-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultDHCPLeasesFile = "/Library/Preferences/Parallels/parallels_dhcp_leases"

Variables

View Source
var ErrDHCPSnoopFailed = errors.New("failed to retrieve VM's DHCP address")
View Source
var (
	ErrFailed = errors.New("Parallels isolation failed")
)
View Source
var ErrParallelsCommandNotFound = errors.New("Parallels command not found")
View Source
var ErrVMFailed = errors.New("Parallels VM operation failed")

Functions

func CopyDir

func CopyDir(sourceDir string, destinationDir string) error

func Prlctl

func Prlctl(ctx context.Context, args ...string) (string, string, error)

func Prlsrvctl

func Prlsrvctl(ctx context.Context, args ...string) (string, string, error)

func SharedNetworkHostIP

func SharedNetworkHostIP(ctx context.Context) (string, error)

func TimeSyncCommand added in v0.31.1

func TimeSyncCommand(t time.Time) string

Types

type DHCPLease

type DHCPLease struct {
	MAC   []byte
	IP    string
	Start int64
}

type DHCPSnooper

type DHCPSnooper struct {
	DHCPLeasesFile string
}

func (*DHCPSnooper) FindNewestLease

func (snooper *DHCPSnooper) FindNewestLease(mac []byte) (*DHCPLease, error)

func (*DHCPSnooper) Leases

func (snooper *DHCPSnooper) Leases() ([]*DHCPLease, error)

type HardwareInfo

type HardwareInfo struct {
	Net0 NetworkAdapterInfo
}

type NetworkAdapterInfo

type NetworkAdapterInfo struct {
	MAC string
}

type Parallels

type Parallels struct {
	// contains filtered or unexported fields
}

func New

func New(vmImage, sshUser, sshPassword, agentOS string) (*Parallels, error)

func (*Parallels) Run

func (parallels *Parallels) Run(ctx context.Context, config *runconfig.RunConfig) (err error)

func (*Parallels) WorkingDirectory

func (parallels *Parallels) WorkingDirectory(projectDir string, dirtyMode bool) string

type ServerInfo

type ServerInfo struct {
	VMHome string `json:"VM home"`
}

func GetServerInfo

func GetServerInfo(ctx context.Context) (*ServerInfo, error)

type VM

type VM struct {
	// contains filtered or unexported fields
}

func NewVMClonedFrom

func NewVMClonedFrom(ctx context.Context, vmNameFrom string) (*VM, error)

func (*VM) Close

func (vm *VM) Close() error

func (*VM) Ident

func (vm *VM) Ident() string

Returns an identifier suitable for use in Parallels CLI commands.

func (*VM) RetrieveIP

func (vm *VM) RetrieveIP(ctx context.Context) (string, error)

type VirtualMachineInfo

type VirtualMachineInfo struct {
	ID       string
	Name     string
	State    string
	Home     string
	Hardware HardwareInfo
}

Jump to

Keyboard shortcuts

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