Documentation ¶
Index ¶
- Variables
- func AddNIC(vm VM, nic NIC) error
- func DeleteNIC(vm VM, nic NIC) error
- func DeleteNICs(vm VM) error
- func GetBridgedDeviceName(macAddr string) (string, error)
- func GetBridgedDeviceNameIPMap() (map[string]string, error)
- func GetBridgedDevices() ([]string, error)
- type Backing
- type Config
- type NIC
- type Runner
- type VM
- func (vm *VM) Destroy() error
- func (vm *VM) GetIPs() ([]net.IP, error)
- func (vm *VM) GetInterfaces() ([]NIC, 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 ¶
var VBOXMANAGE = "/usr/bin/VBoxManage"
VBOXMANAGE is a hardcoded path to VBoxManage to fall back to when it is not in the $PATH.
Functions ¶
func DeleteNICs ¶
DeleteNICs disables all the network interfaces on the vm.
func GetBridgedDeviceName ¶
GetBridgedDeviceName takes the mac address of a network device as a string and returns the name of the network device corresponding to it as seen by Virtualbox
func GetBridgedDeviceNameIPMap ¶
GetBridgedDeviceNameIPMap returns a map of network device name and its IP address from the list of bridgedifs reported by VirtualBox manager.
func GetBridgedDevices ¶
GetBridgedDevices returns a slice of network devices that can be connected to VMs in bridged mode
Types ¶
type NIC ¶
type NIC struct { Idx int Backing Backing BackingDevice string // contains filtered or unexported fields }
NIC represents a Virtualbox NIC
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 { Src string Credentials libssh.Credentials Name string Config Config // contains filtered or unexported fields }
VM represents a VirtualBox VM
func (*VM) GetIPs ¶
GetIPs returns a list of ip addresses associated with the vm through VBox Guest Additions.
func (*VM) GetInterfaces ¶
GetInterfaces gets all the network cards attached to this VM