Documentation ¶
Overview ¶
Code generated by "mapstructure-to-hcl2 -type LocationConfig"; DO NOT EDIT.
Code generated by "mapstructure-to-hcl2 -type OutputConfig"; DO NOT EDIT.
Code generated by "mapstructure-to-hcl2 -type ConfigParamsConfig"; DO NOT EDIT.
Code generated by "mapstructure-to-hcl2 -type ConnectConfig"; DO NOT EDIT.
Code generated by "mapstructure-to-hcl2 -type ExportConfig"; DO NOT EDIT.
Code generated by "mapstructure-to-hcl2 -type HardwareConfig"; DO NOT EDIT.
Code generated by "mapstructure-to-hcl2 -type ContentLibraryDestinationConfig"; DO NOT EDIT.
Code generated by "mapstructure-to-hcl2 -type RunConfig"; DO NOT EDIT.
Code generated by "mapstructure-to-hcl2 -type ShutdownConfig"; DO NOT EDIT.
Code generated by "mapstructure-to-hcl2 -type WaitIpConfig"; DO NOT EDIT.
Index ¶
- Constants
- func CommHost(host string) func(multistep.StateBag) (string, error)
- type Artifact
- type BootConfig
- type ConfigParamsConfig
- type ConnectConfig
- type ContentLibraryDestinationConfig
- type ExportConfig
- type FlatConfigParamsConfig
- type FlatConnectConfig
- type FlatContentLibraryDestinationConfig
- type FlatExportConfig
- type FlatHardwareConfig
- type FlatLocationConfig
- type FlatOutputConfig
- type FlatRunConfig
- type FlatShutdownConfig
- type FlatWaitIpConfig
- type HardwareConfig
- type LocationConfig
- type OutputConfig
- type RunConfig
- type ShutdownConfig
- type StepBootCommand
- type StepConfigParams
- type StepConfigureHardware
- type StepConnect
- type StepConvertToTemplate
- type StepCreateSnapshot
- type StepExport
- type StepHTTPIPDiscover
- type StepImportToContentLibrary
- type StepRun
- type StepShutdown
- type StepSshKeyPair
- type StepWaitForIp
- type WaitIpConfig
Constants ¶
const BuilderId = "jetbrains.vsphere"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Artifact ¶
type Artifact struct { Outconfig *OutputConfig Name string VM *driver.VirtualMachine // StateData should store data such as GeneratedData // to be shared with post-processors StateData map[string]interface{} }
type BootConfig ¶ added in v1.6.1
type BootConfig struct { bootcommand.BootConfig `mapstructure:",squash"` // The IP address to use for the HTTP server started to serve the `http_directory`. // If unset, Packer will automatically discover and assign an IP. HTTPIP string `mapstructure:"http_ip"` }
func (*BootConfig) Prepare ¶ added in v1.6.1
func (c *BootConfig) Prepare(ctx *interpolate.Context) []error
type ConfigParamsConfig ¶
type ConfigParamsConfig struct { // configuration_parameters is a direct passthrough to the VSphere API's // ConfigSpec: https://pubs.vmware.com/vi3/sdk/ReferenceGuide/vim.vm.ConfigSpec.html ConfigParams map[string]string `mapstructure:"configuration_parameters"` // Enables time synchronization with the host. Defaults to false. ToolsSyncTime bool `mapstructure:"tools_sync_time"` // If sets to true, vSphere will automatically check and upgrade VMware Tools upon a system power cycle. // If not set, defaults to manual upgrade. ToolsUpgradePolicy bool `mapstructure:"tools_upgrade_policy"` }
func (*ConfigParamsConfig) FlatMapstructure ¶
func (*ConfigParamsConfig) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }
FlatMapstructure returns a new FlatConfigParamsConfig. FlatConfigParamsConfig is an auto-generated flat version of ConfigParamsConfig. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
type ConnectConfig ¶
type ConnectConfig struct { // vCenter server hostname. VCenterServer string `mapstructure:"vcenter_server"` // vSphere username. Username string `mapstructure:"username"` // vSphere password. Password string `mapstructure:"password"` // Do not validate vCenter server's TLS certificate. Defaults to `false`. InsecureConnection bool `mapstructure:"insecure_connection"` // VMware datacenter name. Required if there is more than one datacenter in vCenter. Datacenter string `mapstructure:"datacenter"` }
func (*ConnectConfig) FlatMapstructure ¶
func (*ConnectConfig) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }
FlatMapstructure returns a new FlatConnectConfig. FlatConnectConfig is an auto-generated flat version of ConnectConfig. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
func (*ConnectConfig) Prepare ¶
func (c *ConnectConfig) Prepare() []error
type ContentLibraryDestinationConfig ¶ added in v1.6.1
type ContentLibraryDestinationConfig struct { // Name of the library in which the new library item containing the VM template should be created. // The Content Library should be of type Local to allow deploying virtual machines. Library string `mapstructure:"library"` // Name of the library item that will be created. The name of the item should be different from [vm_name](#vm_name). // Defaults to [vm_name](#vm_name) + timestamp. Name string `mapstructure:"name"` // Description of the library item that will be created. Defaults to "Packer imported [vm_name](#vm_name) VM template". Description string `mapstructure:"description"` // Cluster onto which the virtual machine template should be placed. // If cluster and resource_pool are both specified, resource_pool must belong to cluster. // If cluster and host are both specified, host must be a member of cluster. // Defaults to [cluster](#cluster). Cluster string `mapstructure:"cluster"` // Virtual machine folder into which the virtual machine template should be placed. // Defaults to the same folder as the source virtual machine. Folder string `mapstructure:"folder"` // Host onto which the virtual machine template should be placed. // If host and resource_pool are both specified, resource_pool must belong to host. // If host and cluster are both specified, host must be a member of cluster. // Defaults to [host](#host). Host string `mapstructure:"host"` // Resource pool into which the virtual machine template should be placed. // Defaults to [resource_pool](#resource_pool). if [resource_pool](#resource_pool) is also unset, // the system will attempt to choose a suitable resource pool for the virtual machine template. ResourcePool string `mapstructure:"resource_pool"` // The datastore for the virtual machine template's configuration and log files. // Defaults to the storage backing associated with the library specified by library. Datastore string `mapstructure:"datastore"` // If set to true, the VM will be destroyed after deploying the template to the Content Library. Defaults to `false`. Destroy bool `mapstructure:"destroy"` }
With this configuration Packer creates a library item in a content library whose content is a virtual machine template created from the just built VM. The virtual machine template is stored in a newly created library item.
func (*ContentLibraryDestinationConfig) FlatMapstructure ¶ added in v1.6.1
func (*ContentLibraryDestinationConfig) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }
FlatMapstructure returns a new FlatContentLibraryDestinationConfig. FlatContentLibraryDestinationConfig is an auto-generated flat version of ContentLibraryDestinationConfig. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
func (*ContentLibraryDestinationConfig) Prepare ¶ added in v1.6.1
func (c *ContentLibraryDestinationConfig) Prepare(lc *LocationConfig) []error
type ExportConfig ¶ added in v1.5.5
type ExportConfig struct { // name of the ovf. defaults to the name of the VM Name string `mapstructure:"name"` // overwrite ovf if it exists Force bool `mapstructure:"force"` // include iso and img image files that are attached to the VM Images bool `mapstructure:"images"` // generate manifest using sha1, sha256, sha512. Defaults to 'sha256'. Use 'none' for no manifest. Manifest string `mapstructure:"manifest"` // Directory on the computer running Packer to export files to OutputDir OutputConfig `mapstructure:",squash"` // Advanced ovf export options. Options can include: // * mac - MAC address is exported for all ethernet devices // * uuid - UUID is exported for all virtual machines // * extraconfig - all extra configuration options are exported for a virtual machine // * nodevicesubtypes - resource subtypes for CD/DVD drives, floppy drives, and serial and parallel ports are not exported // // For example, adding the following export config option would output the mac addresses for all Ethernet devices in the ovf file: // // “`json // ... // "export": { // "options": ["mac"] // }, // “` Options []string `mapstructure:"options"` }
You may optionally export an ovf from VSphere to the instance running Packer.
Example usage:
```json ...
"vm_name": "example-ubuntu",
...
"export": { "force": true, "output_directory": "./output_vsphere" },
``` The above configuration would create the following files:
```text ./output_vsphere/example-ubuntu-disk-0.vmdk ./output_vsphere/example-ubuntu.mf ./output_vsphere/example-ubuntu.ovf ```
func (*ExportConfig) FlatMapstructure ¶ added in v1.5.5
func (*ExportConfig) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }
FlatMapstructure returns a new FlatExportConfig. FlatExportConfig is an auto-generated flat version of ExportConfig. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
func (*ExportConfig) Prepare ¶ added in v1.5.5
func (c *ExportConfig) Prepare(ctx *interpolate.Context, lc *LocationConfig, pc *common.PackerConfig) []error
type FlatConfigParamsConfig ¶
type FlatConfigParamsConfig struct { ConfigParams map[string]string `mapstructure:"configuration_parameters" cty:"configuration_parameters" hcl:"configuration_parameters"` ToolsSyncTime *bool `mapstructure:"tools_sync_time" cty:"tools_sync_time" hcl:"tools_sync_time"` ToolsUpgradePolicy *bool `mapstructure:"tools_upgrade_policy" cty:"tools_upgrade_policy" hcl:"tools_upgrade_policy"` }
FlatConfigParamsConfig is an auto-generated flat version of ConfigParamsConfig. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
func (*FlatConfigParamsConfig) HCL2Spec ¶
func (*FlatConfigParamsConfig) HCL2Spec() map[string]hcldec.Spec
HCL2Spec returns the hcl spec of a ConfigParamsConfig. This spec is used by HCL to read the fields of ConfigParamsConfig. The decoded values from this spec will then be applied to a FlatConfigParamsConfig.
type FlatConnectConfig ¶
type FlatConnectConfig struct { VCenterServer *string `mapstructure:"vcenter_server" cty:"vcenter_server" hcl:"vcenter_server"` Username *string `mapstructure:"username" cty:"username" hcl:"username"` Password *string `mapstructure:"password" cty:"password" hcl:"password"` InsecureConnection *bool `mapstructure:"insecure_connection" cty:"insecure_connection" hcl:"insecure_connection"` Datacenter *string `mapstructure:"datacenter" cty:"datacenter" hcl:"datacenter"` }
FlatConnectConfig is an auto-generated flat version of ConnectConfig. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
type FlatContentLibraryDestinationConfig ¶ added in v1.6.1
type FlatContentLibraryDestinationConfig struct { Library *string `mapstructure:"library" cty:"library" hcl:"library"` Name *string `mapstructure:"name" cty:"name" hcl:"name"` Description *string `mapstructure:"description" cty:"description" hcl:"description"` Cluster *string `mapstructure:"cluster" cty:"cluster" hcl:"cluster"` Folder *string `mapstructure:"folder" cty:"folder" hcl:"folder"` Host *string `mapstructure:"host" cty:"host" hcl:"host"` ResourcePool *string `mapstructure:"resource_pool" cty:"resource_pool" hcl:"resource_pool"` Datastore *string `mapstructure:"datastore" cty:"datastore" hcl:"datastore"` Destroy *bool `mapstructure:"destroy" cty:"destroy" hcl:"destroy"` }
FlatContentLibraryDestinationConfig is an auto-generated flat version of ContentLibraryDestinationConfig. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
func (*FlatContentLibraryDestinationConfig) HCL2Spec ¶ added in v1.6.1
func (*FlatContentLibraryDestinationConfig) HCL2Spec() map[string]hcldec.Spec
HCL2Spec returns the hcl spec of a ContentLibraryDestinationConfig. This spec is used by HCL to read the fields of ContentLibraryDestinationConfig. The decoded values from this spec will then be applied to a FlatContentLibraryDestinationConfig.
type FlatExportConfig ¶ added in v1.5.5
type FlatExportConfig struct { Name *string `mapstructure:"name" cty:"name" hcl:"name"` Force *bool `mapstructure:"force" cty:"force" hcl:"force"` Images *bool `mapstructure:"images" cty:"images" hcl:"images"` Manifest *string `mapstructure:"manifest" cty:"manifest" hcl:"manifest"` OutputDir *string `mapstructure:"output_directory" required:"false" cty:"output_directory" hcl:"output_directory"` Options []string `mapstructure:"options" cty:"options" hcl:"options"` }
FlatExportConfig is an auto-generated flat version of ExportConfig. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
type FlatHardwareConfig ¶
type FlatHardwareConfig struct { CPUs *int32 `mapstructure:"CPUs" cty:"CPUs" hcl:"CPUs"` CpuCores *int32 `mapstructure:"cpu_cores" cty:"cpu_cores" hcl:"cpu_cores"` CPUReservation *int64 `mapstructure:"CPU_reservation" cty:"CPU_reservation" hcl:"CPU_reservation"` CPULimit *int64 `mapstructure:"CPU_limit" cty:"CPU_limit" hcl:"CPU_limit"` CpuHotAddEnabled *bool `mapstructure:"CPU_hot_plug" cty:"CPU_hot_plug" hcl:"CPU_hot_plug"` RAM *int64 `mapstructure:"RAM" cty:"RAM" hcl:"RAM"` RAMReservation *int64 `mapstructure:"RAM_reservation" cty:"RAM_reservation" hcl:"RAM_reservation"` RAMReserveAll *bool `mapstructure:"RAM_reserve_all" cty:"RAM_reserve_all" hcl:"RAM_reserve_all"` MemoryHotAddEnabled *bool `mapstructure:"RAM_hot_plug" cty:"RAM_hot_plug" hcl:"RAM_hot_plug"` VideoRAM *int64 `mapstructure:"video_ram" cty:"video_ram" hcl:"video_ram"` VGPUProfile *string `mapstructure:"vgpu_profile" cty:"vgpu_profile" hcl:"vgpu_profile"` NestedHV *bool `mapstructure:"NestedHV" cty:"NestedHV" hcl:"NestedHV"` Firmware *string `mapstructure:"firmware" cty:"firmware" hcl:"firmware"` ForceBIOSSetup *bool `mapstructure:"force_bios_setup" cty:"force_bios_setup" hcl:"force_bios_setup"` }
FlatHardwareConfig is an auto-generated flat version of HardwareConfig. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
type FlatLocationConfig ¶
type FlatLocationConfig struct { VMName *string `mapstructure:"vm_name" cty:"vm_name" hcl:"vm_name"` Folder *string `mapstructure:"folder" cty:"folder" hcl:"folder"` Cluster *string `mapstructure:"cluster" cty:"cluster" hcl:"cluster"` Host *string `mapstructure:"host" cty:"host" hcl:"host"` ResourcePool *string `mapstructure:"resource_pool" cty:"resource_pool" hcl:"resource_pool"` Datastore *string `mapstructure:"datastore" cty:"datastore" hcl:"datastore"` SetHostForDatastoreUploads *bool `mapstructure:"set_host_for_datastore_uploads" cty:"set_host_for_datastore_uploads" hcl:"set_host_for_datastore_uploads"` }
FlatLocationConfig is an auto-generated flat version of LocationConfig. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
type FlatOutputConfig ¶ added in v1.5.5
type FlatOutputConfig struct {
OutputDir *string `mapstructure:"output_directory" required:"false" cty:"output_directory" hcl:"output_directory"`
}
FlatOutputConfig is an auto-generated flat version of OutputConfig. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
type FlatRunConfig ¶
type FlatRunConfig struct {
BootOrder *string `mapstructure:"boot_order" cty:"boot_order" hcl:"boot_order"`
}
FlatRunConfig is an auto-generated flat version of RunConfig. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
type FlatShutdownConfig ¶
type FlatShutdownConfig struct { Command *string `mapstructure:"shutdown_command" cty:"shutdown_command" hcl:"shutdown_command"` Timeout *string `mapstructure:"shutdown_timeout" cty:"shutdown_timeout" hcl:"shutdown_timeout"` DisableShutdown *bool `mapstructure:"disable_shutdown" cty:"disable_shutdown" hcl:"disable_shutdown"` }
FlatShutdownConfig is an auto-generated flat version of ShutdownConfig. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
type FlatWaitIpConfig ¶
type FlatWaitIpConfig struct { WaitTimeout *string `mapstructure:"ip_wait_timeout" cty:"ip_wait_timeout" hcl:"ip_wait_timeout"` SettleTimeout *string `mapstructure:"ip_settle_timeout" cty:"ip_settle_timeout" hcl:"ip_settle_timeout"` WaitAddress *string `mapstructure:"ip_wait_address" cty:"ip_wait_address" hcl:"ip_wait_address"` }
FlatWaitIpConfig is an auto-generated flat version of WaitIpConfig. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
type HardwareConfig ¶
type HardwareConfig struct { // Number of CPU sockets. CPUs int32 `mapstructure:"CPUs"` // Number of CPU cores per socket. CpuCores int32 `mapstructure:"cpu_cores"` // Amount of reserved CPU resources in MHz. CPUReservation int64 `mapstructure:"CPU_reservation"` // Upper limit of available CPU resources in MHz. CPULimit int64 `mapstructure:"CPU_limit"` // Enable CPU hot plug setting for virtual machine. Defaults to `false`. CpuHotAddEnabled bool `mapstructure:"CPU_hot_plug"` // Amount of RAM in MB. RAM int64 `mapstructure:"RAM"` // Amount of reserved RAM in MB. RAMReservation int64 `mapstructure:"RAM_reservation"` // Reserve all available RAM. Defaults to `false`. Cannot be used together // with `RAM_reservation`. RAMReserveAll bool `mapstructure:"RAM_reserve_all"` // Enable RAM hot plug setting for virtual machine. Defaults to `false`. MemoryHotAddEnabled bool `mapstructure:"RAM_hot_plug"` // Amount of video memory in KB. VideoRAM int64 `mapstructure:"video_ram"` // vGPU profile for accelerated graphics. See [NVIDIA GRID vGPU documentation](https://docs.nvidia.com/grid/latest/grid-vgpu-user-guide/index.html#configure-vmware-vsphere-vm-with-vgpu) // for examples of profile names. Defaults to none. VGPUProfile string `mapstructure:"vgpu_profile"` // Enable nested hardware virtualization for VM. Defaults to `false`. NestedHV bool `mapstructure:"NestedHV"` // Set the Firmware for virtual machine. Supported values: `bios`, `efi` or `efi-secure`. Defaults to `bios`. Firmware string `mapstructure:"firmware"` // During the boot, force entry into the BIOS setup screen. Defaults to `false`. ForceBIOSSetup bool `mapstructure:"force_bios_setup"` }
func (*HardwareConfig) FlatMapstructure ¶
func (*HardwareConfig) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }
FlatMapstructure returns a new FlatHardwareConfig. FlatHardwareConfig is an auto-generated flat version of HardwareConfig. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
func (*HardwareConfig) Prepare ¶
func (c *HardwareConfig) Prepare() []error
type LocationConfig ¶
type LocationConfig struct { // Name of the new VM to create. VMName string `mapstructure:"vm_name"` // VM folder to create the VM in. Folder string `mapstructure:"folder"` // ESXi cluster where target VM is created. See // [Working with Clusters](#working-with-clusters). Cluster string `mapstructure:"cluster"` // ESXi host where target VM is created. A full path must be specified if // the host is in a folder. For example `folder/host`. See the // `Specifying Clusters and Hosts` section above for more details. Host string `mapstructure:"host"` // VMWare resource pool. Defaults to the root resource pool of the // `host` or `cluster`. ResourcePool string `mapstructure:"resource_pool"` // VMWare datastore. Required if `host` is a cluster, or if `host` has // multiple datastores. Datastore string `mapstructure:"datastore"` // Set this to true if packer should the host for uploading files // to the datastore. Defaults to false. SetHostForDatastoreUploads bool `mapstructure:"set_host_for_datastore_uploads"` }
func (*LocationConfig) FlatMapstructure ¶
func (*LocationConfig) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }
FlatMapstructure returns a new FlatLocationConfig. FlatLocationConfig is an auto-generated flat version of LocationConfig. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
func (*LocationConfig) Prepare ¶
func (c *LocationConfig) Prepare() []error
type OutputConfig ¶ added in v1.5.5
type OutputConfig struct { // This setting specifies the directory that // artifacts from the build, such as the virtual machine files and disks, // will be output to. The path to the directory may be relative or // absolute. If relative, the path is relative to the working directory // packer is executed from. This directory must not exist or, if // created, must be empty prior to running the builder. By default this is // "output-BUILDNAME" where "BUILDNAME" is the name of the build. OutputDir string `mapstructure:"output_directory" required:"false"` }
func (*OutputConfig) FlatMapstructure ¶ added in v1.5.5
func (*OutputConfig) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }
FlatMapstructure returns a new FlatOutputConfig. FlatOutputConfig is an auto-generated flat version of OutputConfig. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
func (*OutputConfig) ListFiles ¶ added in v1.5.6
func (c *OutputConfig) ListFiles() ([]string, error)
Stolen from output_dir_local.go in vmware builder.
func (*OutputConfig) Prepare ¶ added in v1.5.5
func (c *OutputConfig) Prepare(ctx *interpolate.Context, pc *common.PackerConfig) []error
type RunConfig ¶
type RunConfig struct { // Priority of boot devices. Defaults to `disk,cdrom` BootOrder string `mapstructure:"boot_order"` // example: "floppy,cdrom,ethernet,disk" }
func (*RunConfig) FlatMapstructure ¶
FlatMapstructure returns a new FlatRunConfig. FlatRunConfig is an auto-generated flat version of RunConfig. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
type ShutdownConfig ¶
type ShutdownConfig struct { // Specify a VM guest shutdown command. VMware guest tools are used by // default. Command string `mapstructure:"shutdown_command"` // Amount of time to wait for graceful VM shutdown. // Defaults to 5m or five minutes. Timeout time.Duration `mapstructure:"shutdown_timeout"` // Packer normally halts the virtual machine after all provisioners have // run when no `shutdown_command` is defined. If this is set to `true`, Packer // *will not* halt the virtual machine but will assume that you will send the stop // signal yourself through the preseed.cfg or your final provisioner. // Packer will wait for a default of five minutes until the virtual machine is shutdown. // The timeout can be changed using `shutdown_timeout` option. DisableShutdown bool `mapstructure:"disable_shutdown"` }
func (*ShutdownConfig) FlatMapstructure ¶
func (*ShutdownConfig) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }
FlatMapstructure returns a new FlatShutdownConfig. FlatShutdownConfig is an auto-generated flat version of ShutdownConfig. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
func (*ShutdownConfig) Prepare ¶
func (c *ShutdownConfig) Prepare() []error
type StepBootCommand ¶ added in v1.6.1
type StepBootCommand struct { Config *BootConfig VMName string Ctx interpolate.Context }
func (*StepBootCommand) Cleanup ¶ added in v1.6.1
func (s *StepBootCommand) Cleanup(_ multistep.StateBag)
func (*StepBootCommand) Run ¶ added in v1.6.1
func (s *StepBootCommand) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepConfigParams ¶
type StepConfigParams struct {
Config *ConfigParamsConfig
}
func (*StepConfigParams) Cleanup ¶
func (s *StepConfigParams) Cleanup(state multistep.StateBag)
func (*StepConfigParams) Run ¶
func (s *StepConfigParams) Run(_ context.Context, state multistep.StateBag) multistep.StepAction
type StepConfigureHardware ¶
type StepConfigureHardware struct {
Config *HardwareConfig
}
func (*StepConfigureHardware) Cleanup ¶
func (s *StepConfigureHardware) Cleanup(multistep.StateBag)
func (*StepConfigureHardware) Run ¶
func (s *StepConfigureHardware) Run(_ context.Context, state multistep.StateBag) multistep.StepAction
type StepConnect ¶
type StepConnect struct {
Config *ConnectConfig
}
func (*StepConnect) Cleanup ¶
func (s *StepConnect) Cleanup(multistep.StateBag)
func (*StepConnect) Run ¶
func (s *StepConnect) Run(_ context.Context, state multistep.StateBag) multistep.StepAction
type StepConvertToTemplate ¶
type StepConvertToTemplate struct {
ConvertToTemplate bool
}
func (*StepConvertToTemplate) Cleanup ¶
func (s *StepConvertToTemplate) Cleanup(state multistep.StateBag)
func (*StepConvertToTemplate) Run ¶
func (s *StepConvertToTemplate) Run(_ context.Context, state multistep.StateBag) multistep.StepAction
type StepCreateSnapshot ¶
type StepCreateSnapshot struct {
CreateSnapshot bool
}
func (*StepCreateSnapshot) Cleanup ¶
func (s *StepCreateSnapshot) Cleanup(state multistep.StateBag)
func (*StepCreateSnapshot) Run ¶
func (s *StepCreateSnapshot) Run(_ context.Context, state multistep.StateBag) multistep.StepAction
type StepExport ¶ added in v1.5.5
type StepExport struct { Name string Force bool Images bool Manifest string OutputDir string Options []string // contains filtered or unexported fields }
func (*StepExport) Cleanup ¶ added in v1.5.5
func (s *StepExport) Cleanup(multistep.StateBag)
func (*StepExport) Run ¶ added in v1.5.5
func (s *StepExport) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepHTTPIPDiscover ¶ added in v1.6.1
Step to discover the http ip which guests use to reach the vm host To make sure the IP is set before boot command and http server steps
func (*StepHTTPIPDiscover) Cleanup ¶ added in v1.6.1
func (s *StepHTTPIPDiscover) Cleanup(state multistep.StateBag)
func (*StepHTTPIPDiscover) Run ¶ added in v1.6.1
func (s *StepHTTPIPDiscover) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepImportToContentLibrary ¶ added in v1.6.1
type StepImportToContentLibrary struct {
ContentLibConfig *ContentLibraryDestinationConfig
}
func (*StepImportToContentLibrary) Cleanup ¶ added in v1.6.1
func (s *StepImportToContentLibrary) Cleanup(multistep.StateBag)
func (*StepImportToContentLibrary) Run ¶ added in v1.6.1
func (s *StepImportToContentLibrary) Run(_ context.Context, state multistep.StateBag) multistep.StepAction
type StepShutdown ¶
type StepShutdown struct {
Config *ShutdownConfig
}
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.6.1
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.6.1
func (s *StepSshKeyPair) Cleanup(state multistep.StateBag)
func (*StepSshKeyPair) Run ¶ added in v1.6.1
func (s *StepSshKeyPair) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepWaitForIp ¶
type StepWaitForIp struct {
Config *WaitIpConfig
}
func (*StepWaitForIp) Cleanup ¶
func (s *StepWaitForIp) Cleanup(state multistep.StateBag)
func (*StepWaitForIp) Run ¶
func (s *StepWaitForIp) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type WaitIpConfig ¶
type WaitIpConfig struct { // Amount of time to wait for VM's IP, similar to 'ssh_timeout'. // Defaults to 30m (30 minutes). See the Golang // [ParseDuration](https://golang.org/pkg/time/#ParseDuration) documentation // for full details. WaitTimeout time.Duration `mapstructure:"ip_wait_timeout"` // Amount of time to wait for VM's IP to settle down, sometimes VM may // report incorrect IP initially, then its recommended to set that // parameter to apx. 2 minutes. Examples 45s and 10m. Defaults to // 5s(5 seconds). See the Golang // [ParseDuration](https://golang.org/pkg/time/#ParseDuration) documentation // for full details. SettleTimeout time.Duration `mapstructure:"ip_settle_timeout"` // Set this to a CIDR address to cause the service to wait for an address that is contained in // this network range. Defaults to "0.0.0.0/0" for any ipv4 address. Examples include: // // * empty string ("") - remove all filters // * `0:0:0:0:0:0:0:0/0` - allow only ipv6 addresses // * `192.168.1.0/24` - only allow ipv4 addresses from 192.168.1.1 to 192.168.1.254 WaitAddress *string `mapstructure:"ip_wait_address"` // contains filtered or unexported fields }
func (*WaitIpConfig) FlatMapstructure ¶
func (*WaitIpConfig) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }
FlatMapstructure returns a new FlatWaitIpConfig. FlatWaitIpConfig is an auto-generated flat version of WaitIpConfig. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
func (*WaitIpConfig) GetIPNet ¶ added in v1.6.1
func (c *WaitIpConfig) GetIPNet() *net.IPNet
func (*WaitIpConfig) Prepare ¶
func (c *WaitIpConfig) Prepare() []error
Source Files ¶
- artifact.go
- config_location.go
- config_location.hcl2spec.go
- config_ssh.go
- output_config.go
- output_config.hcl2spec.go
- step_boot_command.go
- step_config_params.go
- step_config_params.hcl2spec.go
- step_connect.go
- step_connect.hcl2spec.go
- step_export.go
- step_export.hcl2spec.go
- step_hardware.go
- step_hardware.hcl2spec.go
- step_http_ip_discover.go
- step_import_to_content_library.go
- step_import_to_content_library.hcl2spec.go
- step_run.go
- step_run.hcl2spec.go
- step_shutdown.go
- step_shutdown.hcl2spec.go
- step_snapshot.go
- step_ssh_key_pair.go
- step_template.go
- step_wait_for_ip.go
- step_wait_for_ip.hcl2spec.go