virtualbox

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IDE    = "ide"
	SATA   = "sata"
	SCSI   = "scsi"
	SAS    = "sas"
	PCIE   = "pcie"
	Floppy = "floppy"
	USB    = "usb"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DHCPServer

type DHCPServer struct {
	NetworkName string
	IPv4        net.IPNet
	LowerIP     net.IP
	UpperIP     net.IP
	Enabled     bool
}

func GetDHCPServer

func GetDHCPServer(networkName string) (*DHCPServer, error)

func ListDHCPServers

func ListDHCPServers() ([]*DHCPServer, error)

func (*DHCPServer) Create

func (server *DHCPServer) Create() error

func (DHCPServer) Equal

func (server DHCPServer) Equal(other DHCPServer) bool

func (*DHCPServer) Remove

func (server *DHCPServer) Remove() error

type Disk

type Disk struct {
	Path string
	Size int64
}

func (*Disk) Create

func (disk *Disk) Create() error

type HostOnlyNetwork

type HostOnlyNetwork struct {
	Name        string
	DHCP        bool
	IPv4        net.IPNet
	NetworkName string
}

func ListHostOnlyNetworks

func ListHostOnlyNetworks() ([]*HostOnlyNetwork, error)

func NewHostOnlyNetwork

func NewHostOnlyNetwork(cidr string) (*HostOnlyNetwork, error)

func (*HostOnlyNetwork) ConnectVM

func (network *HostOnlyNetwork) ConnectVM(vm *VM) error

func (*HostOnlyNetwork) Create

func (network *HostOnlyNetwork) Create() error

func (HostOnlyNetwork) Equal

func (network HostOnlyNetwork) Equal(other HostOnlyNetwork) bool

type PortForwarding

type PortForwarding struct {
	VMName    string
	Interface int
	Name      string
	Protocol  string
	HostIP    string
	HostPort  int
	GuestIP   string
	GuestPort int
}

func (*PortForwarding) Create

func (forward *PortForwarding) Create() error

type StorageController

type StorageController struct {
	VMName    string
	Name      string
	Type      string
	Device    int
	PortCount int
	Disks     []Disk
}

func (*StorageController) AttachDisk

func (ctl *StorageController) AttachDisk(port int, disk *Disk) error

func (*StorageController) Create

func (ctl *StorageController) Create() error

func (*StorageController) Remove

func (ctl *StorageController) Remove() error

type USBFilter

type USBFilter struct {
	VMName    string
	Index     int
	Name      string
	VendorID  string
	ProductID string
}

func (*USBFilter) Create

func (filter *USBFilter) Create() error

func (*USBFilter) Remove

func (filter *USBFilter) Remove() error

type VM

type VM struct {
	Name string
}

func (*VM) Delete

func (vm *VM) Delete() error

func (*VM) GetStorageController

func (vm *VM) GetStorageController(busType string) (*StorageController, error)

func (*VM) Import

func (vm *VM) Import(args ...string) error

func (*VM) Info

func (vm *VM) Info() (map[string]string, error)

func (*VM) ListPortForwardings

func (vm *VM) ListPortForwardings() ([]*PortForwarding, error)

func (*VM) ListStorageControllers

func (vm *VM) ListStorageControllers() ([]*StorageController, error)

func (*VM) Modify

func (vm *VM) Modify(args ...string) error

func (*VM) NewPortForwarding

func (vm *VM) NewPortForwarding(name string) *PortForwarding

func (*VM) Start

func (vm *VM) Start() error

func (*VM) Stop

func (vm *VM) Stop(force bool) error

type VersionInfo

type VersionInfo struct {
	Major   int
	Minor   int
	Release string
}

func Version

func Version() (VersionInfo, error)

Jump to

Keyboard shortcuts

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