virtualbox

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2013 License: MPL-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GuestAdditionsModeDisable string = "disable"
	GuestAdditionsModeAttach         = "attach"
	GuestAdditionsModeUpload         = "upload"
)

These are the different valid mode values for "guest_additions_mode" which determine how guest additions are delivered to the guest.

View Source
const BuilderId = "mitchellh.virtualbox"
View Source
const KeyLeftShift uint32 = 0xFFE1

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

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

Artifact is the result of running the VirtualBox builder, namely a set of files associated with the resulting machine.

func (*Artifact) BuilderId

func (*Artifact) BuilderId() string

func (*Artifact) Destroy

func (a *Artifact) Destroy() error

func (*Artifact) Files

func (a *Artifact) Files() []string

func (*Artifact) Id

func (*Artifact) Id() string

func (*Artifact) String

func (a *Artifact) String() string

type Builder

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

func (*Builder) Cancel

func (b *Builder) Cancel()

func (*Builder) Prepare

func (b *Builder) Prepare(raws ...interface{}) ([]string, error)

func (*Builder) Run

func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packer.Artifact, error)

type Driver

type Driver interface {
	// Create a SATA controller.
	CreateSATAController(vm string, controller string) error

	// Checks if the VM with the given name is running.
	IsRunning(string) (bool, error)

	// Stop stops a running machine, forcefully.
	Stop(string) error

	// SuppressMessages should do what needs to be done in order to
	// suppress any annoying popups from VirtualBox.
	SuppressMessages() error

	// VBoxManage executes the given VBoxManage command
	VBoxManage(...string) error

	// Verify checks to make sure that this driver should function
	// properly. If there is any indication the driver can't function,
	// this will return an error.
	Verify() error

	// Version reads the version of VirtualBox that is installed.
	Version() (string, error)
}

A driver is able to talk to VirtualBox and perform certain operations with it. Some of the operations on here may seem overly specific, but they were built specifically in mind to handle features of the VirtualBox builder for Packer, and to abstract differences in versions out of the builder steps, so sometimes the methods are extremely specific.

type VBox42Driver

type VBox42Driver struct {
	// This is the path to the "VBoxManage" application.
	VBoxManagePath string
}

func (*VBox42Driver) CreateSATAController added in v0.3.10

func (d *VBox42Driver) CreateSATAController(vmName string, name string) error

func (*VBox42Driver) IsRunning

func (d *VBox42Driver) IsRunning(name string) (bool, error)

func (*VBox42Driver) Stop

func (d *VBox42Driver) Stop(name string) error

func (*VBox42Driver) SuppressMessages

func (d *VBox42Driver) SuppressMessages() error

func (*VBox42Driver) VBoxManage

func (d *VBox42Driver) VBoxManage(args ...string) error

func (*VBox42Driver) Verify

func (d *VBox42Driver) Verify() error

func (*VBox42Driver) Version

func (d *VBox42Driver) Version() (string, error)

Jump to

Keyboard shortcuts

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