Documentation
¶
Index ¶
- Constants
- func CommHost(host string) func(multistep.StateBag) (string, error)
- func NewArtifact(dir string) (packer.Artifact, error)
- func SSHPort(state multistep.StateBag) (int, error)
- type Driver
- type DriverMock
- func (d *DriverMock) CreateSATAController(vm string, controller string, portcount int) error
- func (d *DriverMock) CreateSCSIController(vm string, controller string) error
- func (d *DriverMock) CreateSnapshot(vmName string, snapshotName string) error
- func (d *DriverMock) Delete(name string) error
- func (d *DriverMock) DeleteSnapshot(vmName string, snapshot *VBoxSnapshot) error
- func (d *DriverMock) GetCurrentSnapshot(vmName string) (*VBoxSnapshot, error)
- func (d *DriverMock) HasSnapshots(vmName string) (bool, error)
- func (d *DriverMock) Import(name string, path string, flags []string) error
- func (d *DriverMock) IsRunning(name string) (bool, error)
- func (d *DriverMock) Iso() (string, error)
- func (d *DriverMock) LoadSnapshots(vmName string) (*VBoxSnapshot, error)
- func (d *DriverMock) SetSnapshot(vmName string, snapshot *VBoxSnapshot) error
- func (d *DriverMock) Stop(name string) error
- func (d *DriverMock) SuppressMessages() error
- func (d *DriverMock) VBoxManage(args ...string) error
- func (d *DriverMock) Verify() error
- func (d *DriverMock) Version() (string, error)
- type ExportConfig
- type ExportOpts
- type GuestAdditionsConfig
- type HWConfig
- type OutputConfig
- type RunConfig
- type SSHConfig
- type ShutdownConfig
- type StepAttachFloppy
- type StepAttachGuestAdditions
- type StepConfigureVRDP
- type StepDownloadGuestAdditions
- type StepExport
- type StepForwardSSH
- type StepRemoveDevices
- type StepRun
- type StepShutdown
- type StepSshKeyPair
- type StepSuppressMessages
- type StepTypeBootCommand
- type StepUploadGuestAdditions
- type StepUploadVersion
- type StepVBoxManage
- type VBox42Driver
- func (d *VBox42Driver) CreateSATAController(vmName string, name string, portcount int) error
- func (d *VBox42Driver) CreateSCSIController(vmName string, name string) error
- func (d *VBox42Driver) CreateSnapshot(vmname string, snapshotName string) error
- func (d *VBox42Driver) Delete(name string) error
- func (d *VBox42Driver) DeleteSnapshot(vmname string, sn *VBoxSnapshot) error
- func (d *VBox42Driver) GetCurrentSnapshot(vmname string) (*VBoxSnapshot, error)
- func (d *VBox42Driver) HasSnapshots(vmname string) (bool, error)
- func (d *VBox42Driver) Import(name string, path string, flags []string) error
- func (d *VBox42Driver) IsRunning(name string) (bool, error)
- func (d *VBox42Driver) Iso() (string, error)
- func (d *VBox42Driver) LoadSnapshots(vmName string) (*VBoxSnapshot, error)
- func (d *VBox42Driver) SetSnapshot(vmname string, sn *VBoxSnapshot) error
- func (d *VBox42Driver) Stop(name string) error
- func (d *VBox42Driver) SuppressMessages() error
- func (d *VBox42Driver) VBoxManage(args ...string) error
- func (d *VBox42Driver) VBoxManageWithOutput(args ...string) (string, error)
- func (d *VBox42Driver) Verify() error
- func (d *VBox42Driver) Version() (string, error)
- type VBoxBundleConfig
- type VBoxManageConfig
- type VBoxManagePostConfig
- type VBoxSnapshot
- func (sn *VBoxSnapshot) GetChildWithName(name string) *VBoxSnapshot
- func (sn *VBoxSnapshot) GetCurrentSnapshot() *VBoxSnapshot
- func (sn *VBoxSnapshot) GetRoot() *VBoxSnapshot
- func (sn *VBoxSnapshot) GetSnapshotByUUID(uuid string) *VBoxSnapshot
- func (sn *VBoxSnapshot) GetSnapshots() []*VBoxSnapshot
- func (sn *VBoxSnapshot) GetSnapshotsByName(name string) []*VBoxSnapshot
- func (sn *VBoxSnapshot) IsChildOf(candidate *VBoxSnapshot) bool
- type VBoxVersionConfig
Constants ¶
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.
const BuilderId = "mitchellh.virtualbox"
This is the common builder ID to all of these artifacts.
const KeyLeftShift uint32 = 0xFFE1
Variables ¶
This section is empty.
Functions ¶
func NewArtifact ¶
NewArtifact returns a VirtualBox artifact containing the files in the given directory.
Types ¶
type Driver ¶
type Driver interface {
// Create a SATA controller.
CreateSATAController(vm string, controller string, portcount int) error
// Create a SCSI controller.
CreateSCSIController(vm string, controller string) error
// Delete a VM by name
Delete(string) error
// Import a VM
Import(string, string, []string) error
// The complete path to the Guest Additions ISO
Iso() (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
// and returns the stdout channel as string
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)
// LoadSnapshots Loads all defined snapshots for a vm.
// if no snapshots are defined nil will be returned
LoadSnapshots(string) (*VBoxSnapshot, error)
// CreateSnapshot Creates a snapshot for a vm with a given name
CreateSnapshot(string, string) error
// HasSnapshots tests if a vm has snapshots
HasSnapshots(string) (bool, error)
// GetCurrentSnapshot Returns the current snapshot for a vm
GetCurrentSnapshot(string) (*VBoxSnapshot, error)
// SetSnapshot sets the for a vm
SetSnapshot(string, *VBoxSnapshot) error
// DeleteSnapshot deletes the specified snapshot from a vm
DeleteSnapshot(string, *VBoxSnapshot) 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 DriverMock ¶
type DriverMock struct {
sync.Mutex
CreateSATAControllerVM string
CreateSATAControllerController string
CreateSATAControllerErr error
CreateSCSIControllerVM string
CreateSCSIControllerController string
CreateSCSIControllerErr error
DeleteCalled bool
DeleteName string
DeleteErr error
ImportCalled bool
ImportName string
ImportPath string
ImportFlags []string
ImportErr error
IsoCalled bool
IsoErr error
IsRunningName string
IsRunningReturn bool
IsRunningErr error
StopName string
StopErr error
SuppressMessagesCalled bool
SuppressMessagesErr error
VBoxManageCalls [][]string
VBoxManageErrs []error
VerifyCalled bool
VerifyErr error
VersionCalled bool
VersionResult string
VersionErr error
LoadSnapshotsCalled []string
LoadSnapshotsResult *VBoxSnapshot
CreateSnapshotCalled []string
CreateSnapshotError error
HasSnapshotsCalled []string
HasSnapshotsResult bool
GetCurrentSnapshotCalled []string
GetCurrentSnapshotResult *VBoxSnapshot
SetSnapshotCalled []*VBoxSnapshot
DeleteSnapshotCalled []*VBoxSnapshot
}
func (*DriverMock) CreateSATAController ¶
func (d *DriverMock) CreateSATAController(vm string, controller string, portcount int) error
func (*DriverMock) CreateSCSIController ¶ added in v0.8.0
func (d *DriverMock) CreateSCSIController(vm string, controller string) error
func (*DriverMock) CreateSnapshot ¶ added in v1.4.3
func (d *DriverMock) CreateSnapshot(vmName string, snapshotName string) error
func (*DriverMock) Delete ¶
func (d *DriverMock) Delete(name string) error
func (*DriverMock) DeleteSnapshot ¶ added in v1.4.3
func (d *DriverMock) DeleteSnapshot(vmName string, snapshot *VBoxSnapshot) error
func (*DriverMock) GetCurrentSnapshot ¶ added in v1.4.3
func (d *DriverMock) GetCurrentSnapshot(vmName string) (*VBoxSnapshot, error)
func (*DriverMock) HasSnapshots ¶ added in v1.4.3
func (d *DriverMock) HasSnapshots(vmName string) (bool, error)
func (*DriverMock) Import ¶
func (d *DriverMock) Import(name string, path string, flags []string) error
func (*DriverMock) Iso ¶ added in v0.6.1
func (d *DriverMock) Iso() (string, error)
func (*DriverMock) LoadSnapshots ¶ added in v1.4.3
func (d *DriverMock) LoadSnapshots(vmName string) (*VBoxSnapshot, error)
func (*DriverMock) SetSnapshot ¶ added in v1.4.3
func (d *DriverMock) SetSnapshot(vmName string, snapshot *VBoxSnapshot) error
func (*DriverMock) Stop ¶
func (d *DriverMock) Stop(name string) error
func (*DriverMock) SuppressMessages ¶
func (d *DriverMock) SuppressMessages() error
func (*DriverMock) VBoxManage ¶
func (d *DriverMock) VBoxManage(args ...string) error
func (*DriverMock) Verify ¶
func (d *DriverMock) Verify() error
func (*DriverMock) Version ¶
func (d *DriverMock) Version() (string, error)
type ExportConfig ¶
type ExportConfig struct {
Format string `mapstructure:"format"`
}
func (*ExportConfig) Prepare ¶
func (c *ExportConfig) Prepare(ctx *interpolate.Context) []error
type ExportOpts ¶ added in v0.6.0
type ExportOpts struct {
ExportOpts []string `mapstructure:"export_opts"`
}
func (*ExportOpts) Prepare ¶ added in v0.6.0
func (c *ExportOpts) Prepare(ctx *interpolate.Context) []error
type GuestAdditionsConfig ¶ added in v1.4.0
type GuestAdditionsConfig struct {
Communicator string `mapstructure:"communicator"`
GuestAdditionsMode string `mapstructure:"guest_additions_mode"`
}
func (*GuestAdditionsConfig) Prepare ¶ added in v1.4.0
func (c *GuestAdditionsConfig) Prepare(ctx *interpolate.Context) []error
type HWConfig ¶ added in v1.3.3
type OutputConfig ¶
type OutputConfig struct {
OutputDir string `mapstructure:"output_directory"`
}
func (*OutputConfig) Prepare ¶
func (c *OutputConfig) Prepare(ctx *interpolate.Context, pc *common.PackerConfig) []error
type RunConfig ¶
type SSHConfig ¶
type SSHConfig struct {
Comm communicator.Config `mapstructure:",squash"`
SSHHostPortMin int `mapstructure:"ssh_host_port_min"`
SSHHostPortMax int `mapstructure:"ssh_host_port_max"`
SSHSkipNatMapping bool `mapstructure:"ssh_skip_nat_mapping"`
// These are deprecated, but we keep them around for BC
// TODO(@mitchellh): remove
SSHWaitTimeout time.Duration `mapstructure:"ssh_wait_timeout"`
}
type ShutdownConfig ¶
type ShutdownConfig struct {
ShutdownCommand string `mapstructure:"shutdown_command"`
RawShutdownTimeout string `mapstructure:"shutdown_timeout"`
RawPostShutdownDelay string `mapstructure:"post_shutdown_delay"`
ShutdownTimeout time.Duration ``
PostShutdownDelay time.Duration ``
}
func (*ShutdownConfig) Prepare ¶
func (c *ShutdownConfig) Prepare(ctx *interpolate.Context) []error
type StepAttachFloppy ¶
type StepAttachFloppy struct {
// contains filtered or unexported fields
}
This step attaches the ISO to the virtual machine.
Uses:
driver Driver ui packer.Ui vmName string
Produces:
func (*StepAttachFloppy) Cleanup ¶
func (s *StepAttachFloppy) Cleanup(state multistep.StateBag)
func (*StepAttachFloppy) Run ¶
func (s *StepAttachFloppy) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepAttachGuestAdditions ¶ added in v0.6.1
type StepAttachGuestAdditions struct {
GuestAdditionsMode string
GuestAdditionsInterface string
// contains filtered or unexported fields
}
This step attaches the VirtualBox guest additions as a inserted CD onto the virtual machine.
Uses:
config *config driver Driver guest_additions_path string ui packer.Ui vmName string
Produces:
func (*StepAttachGuestAdditions) Cleanup ¶ added in v0.6.1
func (s *StepAttachGuestAdditions) Cleanup(state multistep.StateBag)
func (*StepAttachGuestAdditions) Run ¶ added in v0.6.1
func (s *StepAttachGuestAdditions) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepConfigureVRDP ¶ added in v0.9.0
type StepConfigureVRDP struct {
VRDPBindAddress string
VRDPPortMin int
VRDPPortMax int
// contains filtered or unexported fields
}
This step configures the VM to enable the VRDP server on the guest machine.
Uses:
driver Driver ui packer.Ui vmName string
Produces: vrdp_port unit - The port that VRDP is configured to listen on.
func (*StepConfigureVRDP) Cleanup ¶ added in v0.9.0
func (s *StepConfigureVRDP) Cleanup(state multistep.StateBag)
func (*StepConfigureVRDP) Run ¶ added in v0.9.0
func (s *StepConfigureVRDP) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepDownloadGuestAdditions ¶ added in v0.6.1
type StepDownloadGuestAdditions struct {
GuestAdditionsMode string
GuestAdditionsURL string
GuestAdditionsSHA256 string
Ctx interpolate.Context
}
This step uploads a file containing the VirtualBox version, which can be useful for various provisioning reasons.
Produces:
guest_additions_path string - Path to the guest additions.
func (*StepDownloadGuestAdditions) Cleanup ¶ added in v0.6.1
func (s *StepDownloadGuestAdditions) Cleanup(state multistep.StateBag)
func (*StepDownloadGuestAdditions) Run ¶ added in v0.6.1
func (s *StepDownloadGuestAdditions) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepExport ¶
type StepExport struct {
Format string
OutputDir string
ExportOpts []string
Bundling VBoxBundleConfig
SkipNatMapping bool
SkipExport bool
}
This step cleans up forwarded ports and exports the VM to an OVF.
Uses:
Produces:
exportPath string - The path to the resulting export.
func (*StepExport) Cleanup ¶
func (s *StepExport) Cleanup(state multistep.StateBag)
func (*StepExport) Run ¶
func (s *StepExport) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepForwardSSH ¶
type StepForwardSSH struct {
CommConfig *communicator.Config
HostPortMin int
HostPortMax int
SkipNatMapping bool
// contains filtered or unexported fields
}
This step adds a NAT port forwarding definition so that SSH is available on the guest machine.
Uses:
driver Driver ui packer.Ui vmName string
Produces:
func (*StepForwardSSH) Cleanup ¶
func (s *StepForwardSSH) Cleanup(state multistep.StateBag)
func (*StepForwardSSH) Run ¶
func (s *StepForwardSSH) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepRemoveDevices ¶
type StepRemoveDevices struct {
Bundling VBoxBundleConfig
GuestAdditionsInterface string
}
This step removes any devices (floppy disks, ISOs, etc.) from the machine that we may have added.
Uses:
driver Driver ui packer.Ui vmName string
Produces:
func (*StepRemoveDevices) Cleanup ¶
func (s *StepRemoveDevices) Cleanup(state multistep.StateBag)
func (*StepRemoveDevices) Run ¶
func (s *StepRemoveDevices) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepRun ¶
type StepRun struct {
Headless bool
// contains filtered or unexported fields
}
This step starts the virtual machine.
Uses:
driver Driver ui packer.Ui vmName string
Produces:
type StepShutdown ¶
This step shuts down the machine. It first attempts to do so gracefully, but ultimately forcefully shuts it down if that fails.
Uses:
communicator packer.Communicator driver Driver ui packer.Ui vmName string
Produces:
<nothing>
func (*StepShutdown) Cleanup ¶
func (s *StepShutdown) Cleanup(state multistep.StateBag)
func (*StepShutdown) Run ¶
func (s *StepShutdown) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepSshKeyPair ¶ added in v1.4.0
type StepSshKeyPair struct {
Debug bool
DebugKeyPath string
Comm *communicator.Config
}
StepSshKeyPair executes the business logic for setting the SSH key pair in the specified communicator.Config.
func (*StepSshKeyPair) Cleanup ¶ added in v1.4.0
func (s *StepSshKeyPair) Cleanup(state multistep.StateBag)
func (*StepSshKeyPair) Run ¶ added in v1.4.0
func (s *StepSshKeyPair) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepSuppressMessages ¶
type StepSuppressMessages struct{}
This step sets some variables in VirtualBox so that annoying pop-up messages don't exist.
func (StepSuppressMessages) Cleanup ¶
func (StepSuppressMessages) Cleanup(multistep.StateBag)
func (StepSuppressMessages) Run ¶
func (StepSuppressMessages) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepTypeBootCommand ¶ added in v0.7.0
type StepTypeBootCommand struct {
BootCommand string
BootWait time.Duration
VMName string
Ctx interpolate.Context
GroupInterval time.Duration
Comm *communicator.Config
}
func (*StepTypeBootCommand) Cleanup ¶ added in v0.7.0
func (*StepTypeBootCommand) Cleanup(multistep.StateBag)
func (*StepTypeBootCommand) Run ¶ added in v0.7.0
func (s *StepTypeBootCommand) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepUploadGuestAdditions ¶ added in v0.6.1
type StepUploadGuestAdditions struct {
GuestAdditionsMode string
GuestAdditionsPath string
Ctx interpolate.Context
}
This step uploads the guest additions ISO to the VM.
func (*StepUploadGuestAdditions) Cleanup ¶ added in v0.6.1
func (s *StepUploadGuestAdditions) Cleanup(state multistep.StateBag)
func (*StepUploadGuestAdditions) Run ¶ added in v0.6.1
func (s *StepUploadGuestAdditions) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepUploadVersion ¶
type StepUploadVersion struct {
Path string
}
This step uploads a file containing the VirtualBox version, which can be useful for various provisioning reasons.
func (*StepUploadVersion) Cleanup ¶
func (s *StepUploadVersion) Cleanup(state multistep.StateBag)
func (*StepUploadVersion) Run ¶
func (s *StepUploadVersion) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepVBoxManage ¶
type StepVBoxManage struct {
Commands [][]string
Ctx interpolate.Context
}
This step executes additional VBoxManage commands as specified by the template.
Uses:
driver Driver ui packer.Ui vmName string
Produces:
func (*StepVBoxManage) Cleanup ¶
func (s *StepVBoxManage) Cleanup(state multistep.StateBag)
func (*StepVBoxManage) Run ¶
func (s *StepVBoxManage) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type VBox42Driver ¶
type VBox42Driver struct {
// This is the path to the "VBoxManage" application.
VBoxManagePath string
}
func (*VBox42Driver) CreateSATAController ¶
func (d *VBox42Driver) CreateSATAController(vmName string, name string, portcount int) error
func (*VBox42Driver) CreateSCSIController ¶ added in v0.8.0
func (d *VBox42Driver) CreateSCSIController(vmName string, name string) error
func (*VBox42Driver) CreateSnapshot ¶ added in v1.4.3
func (d *VBox42Driver) CreateSnapshot(vmname string, snapshotName string) error
func (*VBox42Driver) Delete ¶
func (d *VBox42Driver) Delete(name string) error
func (*VBox42Driver) DeleteSnapshot ¶ added in v1.4.3
func (d *VBox42Driver) DeleteSnapshot(vmname string, sn *VBoxSnapshot) error
func (*VBox42Driver) GetCurrentSnapshot ¶ added in v1.4.3
func (d *VBox42Driver) GetCurrentSnapshot(vmname string) (*VBoxSnapshot, error)
func (*VBox42Driver) HasSnapshots ¶ added in v1.4.3
func (d *VBox42Driver) HasSnapshots(vmname string) (bool, error)
func (*VBox42Driver) Import ¶
func (d *VBox42Driver) Import(name string, path string, flags []string) error
func (*VBox42Driver) Iso ¶ added in v0.6.1
func (d *VBox42Driver) Iso() (string, error)
func (*VBox42Driver) LoadSnapshots ¶ added in v1.4.3
func (d *VBox42Driver) LoadSnapshots(vmName string) (*VBoxSnapshot, error)
LoadSnapshots load the snapshots for a VM instance
func (*VBox42Driver) SetSnapshot ¶ added in v1.4.3
func (d *VBox42Driver) SetSnapshot(vmname string, sn *VBoxSnapshot) 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) VBoxManageWithOutput ¶ added in v1.4.3
func (d *VBox42Driver) VBoxManageWithOutput(args ...string) (string, error)
func (*VBox42Driver) Verify ¶
func (d *VBox42Driver) Verify() error
func (*VBox42Driver) Version ¶
func (d *VBox42Driver) Version() (string, error)
type VBoxBundleConfig ¶ added in v1.3.3
type VBoxBundleConfig struct {
BundleISO bool `mapstructure:"bundle_iso"`
}
func (*VBoxBundleConfig) Prepare ¶ added in v1.3.3
func (c *VBoxBundleConfig) Prepare(ctx *interpolate.Context) []error
type VBoxManageConfig ¶
type VBoxManageConfig struct {
VBoxManage [][]string `mapstructure:"vboxmanage"`
}
func (*VBoxManageConfig) Prepare ¶
func (c *VBoxManageConfig) Prepare(ctx *interpolate.Context) []error
type VBoxManagePostConfig ¶ added in v0.6.0
type VBoxManagePostConfig struct {
VBoxManagePost [][]string `mapstructure:"vboxmanage_post"`
}
func (*VBoxManagePostConfig) Prepare ¶ added in v0.6.0
func (c *VBoxManagePostConfig) Prepare(ctx *interpolate.Context) []error
type VBoxSnapshot ¶ added in v1.4.3
type VBoxSnapshot struct {
Name string
UUID string
IsCurrent bool
Parent *VBoxSnapshot // nil if topmost (root) snapshot
Children []*VBoxSnapshot
}
VBoxSnapshot stores the hierarchy of snapshots for a VM instance
func ParseSnapshotData ¶ added in v1.4.3
func ParseSnapshotData(snapshotData string) (*VBoxSnapshot, error)
ParseSnapshotData parses the machinereadable representation of a virtualbox snapshot tree
func (*VBoxSnapshot) GetChildWithName ¶ added in v1.4.3
func (sn *VBoxSnapshot) GetChildWithName(name string) *VBoxSnapshot
func (*VBoxSnapshot) GetCurrentSnapshot ¶ added in v1.4.3
func (sn *VBoxSnapshot) GetCurrentSnapshot() *VBoxSnapshot
GetCurrentSnapshot returns the currently attached snapshot
func (*VBoxSnapshot) GetRoot ¶ added in v1.4.3
func (sn *VBoxSnapshot) GetRoot() *VBoxSnapshot
GetRoot returns the top-most (root) snapshot for a given snapshot
func (*VBoxSnapshot) GetSnapshotByUUID ¶ added in v1.4.3
func (sn *VBoxSnapshot) GetSnapshotByUUID(uuid string) *VBoxSnapshot
GetSnapshotByUUID returns a snapshot by it's UUID
func (*VBoxSnapshot) GetSnapshots ¶ added in v1.4.3
func (sn *VBoxSnapshot) GetSnapshots() []*VBoxSnapshot
GetSnapshots returns an array of all snapshots defined
func (*VBoxSnapshot) GetSnapshotsByName ¶ added in v1.4.3
func (sn *VBoxSnapshot) GetSnapshotsByName(name string) []*VBoxSnapshot
GetSnapshotsByName find all snapshots with a given name
func (*VBoxSnapshot) IsChildOf ¶ added in v1.4.3
func (sn *VBoxSnapshot) IsChildOf(candidate *VBoxSnapshot) bool
IsChildOf verifies if the current snaphot is a child of the passed as argument
type VBoxVersionConfig ¶
type VBoxVersionConfig struct {
Communicator string `mapstructure:"communicator"`
VBoxVersionFile *string `mapstructure:"virtualbox_version_file"`
}
func (*VBoxVersionConfig) Prepare ¶
func (c *VBoxVersionConfig) Prepare(ctx *interpolate.Context) []error
Source Files
¶
- artifact.go
- driver.go
- driver_4_2.go
- driver_mock.go
- export_config.go
- export_opts.go
- guest_additions_config.go
- hw_config.go
- output_config.go
- run_config.go
- shutdown_config.go
- snapshot.go
- ssh.go
- ssh_config.go
- step_attach_floppy.go
- step_attach_guest_additions.go
- step_configure_vrdp.go
- step_download_guest_additions.go
- step_export.go
- step_forward_ssh.go
- step_remove_devices.go
- step_run.go
- step_shutdown.go
- step_ssh_key_pair.go
- step_suppress_messages.go
- step_type_boot_command.go
- step_upload_guest_additions.go
- step_upload_version.go
- step_vboxmanage.go
- vbox_version_config.go
- vboxbundle_config.go
- vboxmanage_config.go
- vboxmanage_post_config.go