vix

package
v0.0.0-...-b289ced Latest Latest
Warning

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

Go to latest
Published: May 21, 2020 License: MPL-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

type Image struct {
	// Image URL where to download from
	URL string
	// Checksum of the image, used to check integrity after downloading it
	Checksum string
	// Algorithm use to check the checksum
	ChecksumType string
	// Password to decrypt the virtual machine if it is encrypted. This is used by
	// VIX to be able to open the virtual machine
	Password string
	// contains filtered or unexported fields
}

A virtual machine image definition

func (*Image) Download

func (img *Image) Download(destPath string) error

Downloads and a virtual machine image

type VM

type VM struct {
	// Which VMware VIX service provider to use. ie: fusion, workstation, server, etc
	Provider string
	// Whether to verify SSL or not for remote connections in ESXi
	VerifySSL bool
	// Name of the virtual machine
	Name string
	// Description for the virtual machine, it is created as an annotation in
	// VMware.
	Description string
	// Image to use during the creation of this virtual machine
	Image Image
	// Number of virtual cpus
	CPUs uint
	// Memory size in megabytes.
	Memory string
	// Switches to where this machine is going to be attach to
	VSwitches []string
	// Whether to upgrade the VM virtual hardware
	UpgradeVHardware bool
	// The timeout to wait for VMware Tools to be initialized inside the VM
	ToolsInitTimeout time.Duration
	// Whether to launch the VM with graphical environment
	LaunchGUI bool
	// Whether to enable or disable shared folders for this VM
	SharedFolders bool
	// Network adapters
	VNetworkAdapters []*govix.NetworkAdapter
	// CD/DVD drives
	CDDVDDrives []*govix.CDDVDDrive
	// VM IP address as reported by VIX
	IPAddress string
}

Virtual machine configuration

func (*VM) Create

func (v *VM) Create() (string, error)

Downloads, extracts and opens Gold virtual machine, then it creates a clone out of it.

func (*VM) Destroy

func (v *VM) Destroy(vmxFile string) error

Destroys a virtual machine resource

func (*VM) Refresh

func (v *VM) Refresh(vmxFile string) (bool, error)

Refreshes state with VMware

func (*VM) SetDefaults

func (v *VM) SetDefaults()

Sets default values for VM attributes

func (*VM) Update

func (v *VM) Update(vmxFile string) error

Opens and updates virtual machine resource

type VSwitch

type VSwitch struct {
	// Name for this switch
	Name string
	// Whether to allow machines in this switch to access outside of the nework
	// using Network Address Translations
	NAT bool
	// Whether to enable DHCP on this switch
	DHCP bool
	// CIDR block for the DHCP server
	Range string
	// Whether to attach the host machine to this switch
	HostAccess bool
}

func (*VSwitch) Create

func (v *VSwitch) Create()

func (*VSwitch) Destroy

func (v *VSwitch) Destroy()

func (*VSwitch) Refresh

func (v *VSwitch) Refresh()

func (*VSwitch) Update

func (v *VSwitch) Update()

Jump to

Keyboard shortcuts

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