Documentation ¶
Index ¶
- Variables
- type Backing
- type Config
- type NIC
- type Runner
- type VM
- func (vm *VM) Destroy() (err error)
- func (vm *VM) GetIPs() ([]net.IP, error)
- func (vm *VM) GetName() string
- func (vm *VM) GetSSH(options libssh.Options) (libssh.Client, error)
- func (vm *VM) GetState() (string, error)
- func (vm *VM) Halt() error
- func (vm *VM) Provision() error
- func (vm *VM) Resume() error
- func (vm *VM) Start() error
- func (vm *VM) Suspend() error
Constants ¶
This section is empty.
Variables ¶
View Source
var VMRunPath = "/usr/bin/vmrun"
VMRunPath is a hardcoded path to fall back to when vmrun is not in the $PATH.
Functions ¶
This section is empty.
Types ¶
type Backing ¶
type Backing int
Backing is the network card backing type for VMware virtual machines.
type Config ¶
type Config struct {
NICs []NIC
}
Config is a config struct that can be passed in to change the configuration of the vm being provisioned.
type NIC ¶
type NIC struct { Idx int // Which network card to change on the vm. Starts at 1 Backing Backing // What type of backing should the card have (Bridged vs NAT) BackingDevice string // BSD string for the network card (en0, en1) }
NIC is represents a network card on a VMware vm
type Runner ¶
type Runner interface { Run(args ...string) (string, string, error) RunCombinedError(args ...string) (string, error) }
Runner is an encapsulation around the vmrun utility.
type VM ¶
type VM struct { Name string Src string Dst string VmxFilePath string Credentials libssh.Credentials Config Config // contains filtered or unexported fields }
VM represents a single VMware VM and all the operations for provisioning that type
func (*VM) GetIPs ¶
GetIPs returns a list of ip addresses associated with the vm through VMware tools
Click to show internal directories.
Click to hide internal directories.