vmx

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2019 License: MPL-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

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

Builder implements packer.Builder and builds the actual VMware images.

func (*Builder) Prepare

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

Prepare processes the build configuration parameters.

func (*Builder) Run

func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (packer.Artifact, error)

Run executes a Packer build and returns a packer.Artifact representing a VMware image.

type Config

type Config struct {
	common.PackerConfig            `mapstructure:",squash"`
	common.HTTPConfig              `mapstructure:",squash"`
	common.FloppyConfig            `mapstructure:",squash"`
	bootcommand.VNCConfig          `mapstructure:",squash"`
	vmwcommon.DriverConfig         `mapstructure:",squash"`
	vmwcommon.OutputConfig         `mapstructure:",squash"`
	vmwcommon.RunConfig            `mapstructure:",squash"`
	shutdowncommand.ShutdownConfig `mapstructure:",squash"`
	vmwcommon.SSHConfig            `mapstructure:",squash"`
	vmwcommon.ToolsConfig          `mapstructure:",squash"`
	vmwcommon.VMXConfig            `mapstructure:",squash"`
	vmwcommon.ExportConfig         `mapstructure:",squash"`
	// By default Packer creates a 'full' clone of the virtual machine
	// specified in source_path. The resultant virtual machine is fully
	// independant from the parent it was cloned from.
	//
	// Setting linked to true instead causes Packer to create the virtual
	// machine as a 'linked' clone. Linked clones use and require ongoing
	// access to the disks of the parent virtual machine. The benefit of a
	// linked clone is that the clones virtual disk is typically very much
	// smaller than would be the case for a full clone. Additionally, the
	// cloned virtual machine can also be created much faster. Creating a
	// linked clone will typically only be of benefit in some advanced build
	// scenarios. Most users will wish to create a full clone instead. Defaults
	// to false.
	Linked bool `mapstructure:"linked" required:"false"`
	// The type of remote machine that will be used to
	// build this VM rather than a local desktop product. The only value accepted
	// for this currently is esx5. If this is not set, a desktop product will
	// be used. By default, this is not set.
	RemoteType string `mapstructure:"remote_type" required:"false"`
	// Path to the source VMX file to clone. If
	// remote_type is enabled then this specifies a path on the remote_host.
	SourcePath string `mapstructure:"source_path" required:"true"`
	// This is the name of the VMX file for the new virtual
	// machine, without the file extension. By default this is packer-BUILDNAME,
	// where "BUILDNAME" is the name of the build.
	VMName string `mapstructure:"vm_name" required:"false"`
	// contains filtered or unexported fields
}

Config is the configuration structure for the builder.

func NewConfig

func NewConfig(raws ...interface{}) (*Config, []string, error)

type StepCloneVMX

type StepCloneVMX struct {
	OutputDir string
	Path      string
	VMName    string
	Linked    bool
	// contains filtered or unexported fields
}

StepCloneVMX takes a VMX file and clones the VM into the output directory.

func (*StepCloneVMX) Cleanup

func (s *StepCloneVMX) Cleanup(state multistep.StateBag)

func (*StepCloneVMX) Run

Jump to

Keyboard shortcuts

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