Documentation ¶
Index ¶
- Constants
- func DeleteVM(vmName string) error
- func DestroyVM(vmName string) error
- func GetVmIp(vminfo *VirtualboxVMInfo) (string, error)
- func InjectSSHKey(vmName, sshUser, sshKey string) error
- type NetworkType
- type VMBootType
- type VMStateType
- type VirtualboxVMInfo
- func CreateVM(imagePath, vmName string, memory, cpus int64) (*VirtualboxVMInfo, error)
- func ForwardLocalPort(vmName string, guestPort int) (*VirtualboxVMInfo, error)
- func GetVMInfo(vmName string) (*VirtualboxVMInfo, error)
- func StartVM(vmName string, vmType VMBootType) (*VirtualboxVMInfo, error)
- func StopVM(vmName string) (*VirtualboxVMInfo, error)
Constants ¶
View Source
const (
SshPortRuleName = "terraform_ssh_port_rule"
)
Variables ¶
This section is empty.
Functions ¶
func GetVmIp ¶
func GetVmIp(vminfo *VirtualboxVMInfo) (string, error)
func InjectSSHKey ¶
Types ¶
type NetworkType ¶
type NetworkType string
const ( Bridged NetworkType = "bridged" Nat NetworkType = "nat" Hostonly NetworkType = "nostonly" Hostonlynet NetworkType = "hostonlynet" Generic NetworkType = "generic" Natnetwork NetworkType = "natnetwork" )
type VMBootType ¶
type VMBootType string
const ( Gui VMBootType = "gui" Headless VMBootType = "headless" Sdl VMBootType = "sdl" Separate VMBootType = "separate" )
type VMStateType ¶ added in v0.0.2
type VMStateType string
const (
Poweroff VMStateType = "poweroff"
)
type VirtualboxVMInfo ¶
type VirtualboxVMInfo struct { ID string Name string State VMStateType VmdkPath string SSHPort string }
func CreateVM ¶
func CreateVM(imagePath, vmName string, memory, cpus int64) (*VirtualboxVMInfo, error)
func ForwardLocalPort ¶
func ForwardLocalPort(vmName string, guestPort int) (*VirtualboxVMInfo, error)
func GetVMInfo ¶
func GetVMInfo(vmName string) (*VirtualboxVMInfo, error)
func StartVM ¶
func StartVM(vmName string, vmType VMBootType) (*VirtualboxVMInfo, error)
func StopVM ¶
func StopVM(vmName string) (*VirtualboxVMInfo, error)
Click to show internal directories.
Click to hide internal directories.