vmx

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	VmrunPath        string `json:"vmrun_path"`        // '/Applications/VMware Fusion.app/Contents/Library/vmrun'
	VdiskmanagerPath string `json:"vdiskmanager_path"` // '/Applications/VMware Fusion.app/Contents/Library/vmware-vdiskmanager'

	ImagesPath    string `json:"images_path"`    // Where to look/store VM images
	WorkspacePath string `json:"workspace_path"` // Where to place the cloned VM and disks

	DownloadUser     string `json:"download_user"`     // The user will be used in download operations
	DownloadPassword string `json:"download_password"` // The password will be used in download operations

	LogMonitor bool `json:"log_monitor"` // Actively monitor the vmware.log of VM and reset it on halt
}

func (*Config) Apply

func (c *Config) Apply(config []byte) error

func (*Config) Validate

func (c *Config) Validate() (err error)

type Definition

type Definition struct {
	Image        string               `json:"image"`        // Main image to use as reference
	Images       map[string]string    `json:"images"`       // List of image dependencies
	Requirements drivers.Requirements `json:"requirements"` // Required resources to allocate
}

*

func (*Definition) Apply

func (d *Definition) Apply(definition string) error

func (*Definition) Validate

func (d *Definition) Validate() error

type Driver

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

Implements drivers.ResourceDriver interface

func (*Driver) Allocate

func (d *Driver) Allocate(definition string, metadata map[string]interface{}) (string, string, error)

*

  • Allocate VM with provided images *
  • It automatically download the required images, unpack them and runs the VM.
  • Not using metadata because there is no good interfaces to pass it to VM.

func (*Driver) Deallocate

func (d *Driver) Deallocate(hwaddr string) error

func (*Driver) Name

func (d *Driver) Name() string

func (*Driver) Prepare

func (d *Driver) Prepare(config []byte) error

func (*Driver) Snapshot

func (d *Driver) Snapshot(hwaddr string, full bool) (string, error)

func (*Driver) Status

func (d *Driver) Status(hwaddr string) string

func (*Driver) ValidateDefinition

func (d *Driver) ValidateDefinition(definition string) error

Jump to

Keyboard shortcuts

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