virtualbox

package
v1.32.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMachineNotExist  = errors.New("machine does not exist")
	ErrSnapshotNotExist = errors.New("snapshot does not exist")
	ErrVBMNotFound      = errors.New("VBoxManage not found. Make sure VirtualBox is installed and VBoxManage is in the path")
)
View Source
var (
	ErrNetworkAddrCidr = errors.New("host-only CIDR must be specified with a host address, not a network address")
)

Functions

func DeleteSnapshot added in v1.17.0

func DeleteSnapshot(name string) error

func IsRunning added in v1.17.0

func IsRunning() (bool, error)

func Pause added in v1.8.0

func Pause() error

func ResetHostOnlyNetworkLeases added in v1.8.0

func ResetHostOnlyNetworkLeases(hostOnlyCIDR string, verbose bool) error

func RestoreSnapshot added in v1.16.1

func RestoreSnapshot(name string) error

func Resume added in v1.8.0

func Resume() error

func TakeSnapshot added in v1.16.1

func TakeSnapshot(name string) error

func Update added in v1.29.0

func Update(args ...string) error

Types

type VBoxCmdManager

type VBoxCmdManager struct {
	// contains filtered or unexported fields
}

VBoxCmdManager communicates with VirtualBox through the commandline using `VBoxManage`.

func NewVBoxManager

func NewVBoxManager() *VBoxCmdManager

NewVBoxManager creates a VBoxManager instance.

func (*VBoxCmdManager) AddSwapDisk added in v1.32.0

func (v *VBoxCmdManager) AddSwapDisk(swapsize int16) error

AddSwapDisk prepare, create, and attach swap disk to minikube VM

func (*VBoxCmdManager) AttachDisk added in v1.32.0

func (v *VBoxCmdManager) AttachDisk(vmName string, port int, device int, filePath string) error

AttachDisk attach the disk created for swap to the minikube VM

func (*VBoxCmdManager) CreateDisk added in v1.32.0

func (v *VBoxCmdManager) CreateDisk(sizeInMB int16, filePath string) error

CreateDisk create a disk in VBox to be used as swap

type VBoxManager

type VBoxManager interface {
	// contains filtered or unexported methods
}

VBoxManager defines the interface to communicate to VirtualBox.

Jump to

Keyboard shortcuts

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