Documentation ¶
Index ¶
- Constants
- type DHCPServer
- type Disk
- type HostOnlyNetwork
- type PortForwarding
- type StorageController
- type USBFilter
- type VM
- func (vm *VM) Delete() error
- func (vm *VM) GetStorageController(busType string) (*StorageController, error)
- func (vm *VM) Import(args ...string) error
- func (vm *VM) Info() (map[string]string, error)
- func (vm *VM) ListPortForwardings() ([]*PortForwarding, error)
- func (vm *VM) ListStorageControllers() ([]*StorageController, error)
- func (vm *VM) Modify(args ...string) error
- func (vm *VM) NewPortForwarding(name string) *PortForwarding
- func (vm *VM) Start() error
- func (vm *VM) Stop(force bool) error
- type VersionInfo
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 HostOnlyNetwork ¶
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 VM ¶
type VM struct {
Name string
}
func (*VM) GetStorageController ¶
func (vm *VM) GetStorageController(busType string) (*StorageController, error)
func (*VM) ListPortForwardings ¶
func (vm *VM) ListPortForwardings() ([]*PortForwarding, error)
func (*VM) ListStorageControllers ¶
func (vm *VM) ListStorageControllers() ([]*StorageController, error)
func (*VM) NewPortForwarding ¶
func (vm *VM) NewPortForwarding(name string) *PortForwarding
type VersionInfo ¶
func Version ¶
func Version() (VersionInfo, error)
Click to show internal directories.
Click to hide internal directories.