Documentation
¶
Index ¶
- Constants
- func CheckUDFTools() error
- func CommHost(configuredHost string) func(multistep.StateBag) (string, error)
- type Artifact
- type BootCommandConfig
- type BootCommandFromVM
- type BootConfig
- type CatalogConfig
- type ConnectConfig
- type Driver
- type ExportConfig
- type ExportToCatalogConfig
- type FlatBootCommandConfig
- type FlatCatalogConfig
- type FlatExportConfig
- type FlatExportToCatalogConfig
- type FlatOutputConfig
- type FlatWaitIpConfig
- type HardwareConfig
- type ISOModifier
- func (m *ISOModifier) AddContent(path string, content []byte)
- func (m *ISOModifier) AddFile(isoPath, localPath string) error
- func (m *ISOModifier) CreateModifiedISO(outputPath string) (string, error)
- func (m *ISOModifier) DetectBootConfig() (*BootConfig, error)
- func (m *ISOModifier) IsUDF() (bool, error)
- type LocationConfig
- type OutputConfig
- type RemoveNetworkAdapterConfig
- type RunConfig
- type ShutdownConfig
- type StepBootCommand
- type StepConfigureBootOptions
- type StepConfigureTPM
- type StepConnect
- type StepCreateTempCatalog
- type StepExportToCatalog
- type StepHTTPIPDiscover
- type StepModifyISO
- type StepMountISO
- type StepQueryVMIP
- type StepRemoveNetworkAdapter
- type StepResolveVApp
- type StepRun
- type StepSetManualIP
- type StepShutdown
- type StepUploadISO
- type StepWaitForIP
- type WaitIpConfig
Constants ¶
const BuilderId = "vcd"
Variables ¶
This section is empty.
Functions ¶
func CheckUDFTools ¶ added in v0.0.4
func CheckUDFTools() error
CheckUDFTools verifies that the required external tools for UDF ISO modification are available. Returns an error with installation instructions if tools are missing. Required tools: 7z (p7zip-full), mkisofs or genisoimage
Types ¶
type Artifact ¶
type Artifact struct {
Name string
Location LocationConfig
VM driver.VirtualMachine
StateData map[string]interface{}
Outconfig *string
}
type BootCommandConfig ¶
type BootCommandConfig struct {
bootcommand.BootConfig `mapstructure:",squash"`
// Time in ms to wait between each key press. Defaults to 100ms.
BootKeyInterval time.Duration `mapstructure:"boot_key_interval"`
}
BootCommandConfig contains configuration for sending boot commands to the VM.
func (*BootCommandConfig) FlatMapstructure ¶
func (*BootCommandConfig) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }
FlatMapstructure returns a new FlatBootCommandConfig. FlatBootCommandConfig is an auto-generated flat version of BootCommandConfig. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
func (*BootCommandConfig) Prepare ¶
func (c *BootCommandConfig) Prepare(ctx *interpolate.Context) []error
type BootCommandFromVM ¶
BootCommandFromVM provides context for acquiring console access
type BootConfig ¶ added in v0.0.4
type BootConfig struct {
// BIOS boot
HasBIOSBoot bool
BIOSBootImage string // Path to boot image (e.g., boot/etfsboot.com)
BIOSLoadSize uint16 // Load size in sectors (usually 4 for no-emulation)
NeedsBootInfoTbl bool // True for isolinux/syslinux (needs boot info table patch)
// UEFI boot
HasUEFIBoot bool
UEFIBootImage string // Path to EFI boot image (e.g., efi/microsoft/boot/efisys.bin)
// Volume info
VolumeID string
}
BootConfig holds boot configuration detected from an ISO
type CatalogConfig ¶
type CatalogConfig struct {
// The name of an existing catalog to use for ISO upload.
// If not set, a temporary catalog will be created and deleted after the build.
// Using an existing catalog enables ISO caching across builds.
// This catalog is separate from the output catalog where the final vApp template is exported.
ISOCatalog string `mapstructure:"iso_catalog"`
// Prefix for temporary catalog names when creating a new catalog.
// Only used when iso_catalog is not set.
// Defaults to "packer-".
TempCatalogPrefix string `mapstructure:"temp_catalog_prefix"`
// If true and using an existing catalog (iso_catalog), check if the ISO already exists
// before uploading. This enables reusing ISOs across multiple builds.
// Defaults to true when iso_catalog is specified.
CacheISO bool `mapstructure:"cache_iso"`
// If true, overwrite existing cached ISO even if it exists in the catalog.
// Defaults to false.
CacheOverwrite bool `mapstructure:"cache_overwrite"`
}
CatalogConfig defines configuration for the ISO source catalog during build. This catalog is used to upload and store the ISO image used to boot the VM. For the output catalog where the final vApp template is exported, see ExportToCatalogConfig.
func (*CatalogConfig) FlatMapstructure ¶ added in v0.0.4
func (*CatalogConfig) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }
FlatMapstructure returns a new FlatCatalogConfig. FlatCatalogConfig is an auto-generated flat version of CatalogConfig. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
func (*CatalogConfig) Prepare ¶
func (c *CatalogConfig) Prepare() []error
type ConnectConfig ¶
type ConnectConfig struct {
// The fully qualified domain name or IP address of the vCD Server instance.
Host string `mapstructure:"host"`
// The username to authenticate with the vCD Server instance.
Org string `mapstructure:"org"`
// The username to authenticate with the vCD Server instance.
Username string `mapstructure:"username"`
// The password to authenticate with the vCD Server instance.
Password string `mapstructure:"password"`
// The token to authenticate with the vCenter Server instance.
Token string `mapstructure:"token"`
// Do not validate the certificate of the vCD Server instance.
// Defaults to `false`.
//
// -> **Note:** This option is beneficial in scenarios where the certificate
// is self-signed or does not meet standard validation criteria.
InsecureConnection bool `mapstructure:"insecure_connection"`
}
func (*ConnectConfig) Prepare ¶
func (c *ConnectConfig) Prepare() []error
type ExportConfig ¶
type ExportConfig struct {
// The name of the exported image in Open Virtualization Format (OVF).
//
// -> **Note:** The name of the virtual machine with the `.ovf` extension is
// used if this option is not specified.
Name string `mapstructure:"name"`
// Forces the export to overwrite existing files. Defaults to `false`.
// If set to `false`, an error is returned if the file(s) already exists.
Force bool `mapstructure:"force"`
// The path to the directory where the exported image will be saved.
OutputDir OutputConfig `mapstructure:",squash"`
}
func (*ExportConfig) FlatMapstructure ¶
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 ¶
func (c *ExportConfig) Prepare(ctx *interpolate.Context, lc *LocationConfig, pc *common.PackerConfig) []error
type ExportToCatalogConfig ¶
type ExportToCatalogConfig struct {
// The name of the catalog to export the vApp template to.
Catalog string `mapstructure:"catalog"`
// The name for the vApp template in the catalog.
// If not set, defaults to the VM name.
TemplateName string `mapstructure:"template_name"`
// Description for the vApp template.
Description string `mapstructure:"description"`
// If true, overwrite an existing template with the same name.
// Defaults to false.
Overwrite bool `mapstructure:"overwrite"`
// If true, create the catalog if it doesn't exist.
// Defaults to false.
CreateCatalog bool `mapstructure:"create_catalog"`
// Controls whether the sizing policy on the captured template is final
// (locked). When false, the template can be instantiated in VDCs that
// don't have the same sizing policy — the destination tenant can change
// or remove the policy. When true (or unset), VCD's default behavior
// applies (policies are final). Defaults to true.
SizingPolicyFinal *bool `mapstructure:"sizing_policy_final"`
}
ExportToCatalogConfig defines configuration for exporting the built VM as a vApp template. This is separate from the ISO catalog (CatalogConfig) which is used for ISO storage during build.
func (*ExportToCatalogConfig) FlatMapstructure ¶
func (*ExportToCatalogConfig) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }
FlatMapstructure returns a new FlatExportToCatalogConfig. FlatExportToCatalogConfig is an auto-generated flat version of ExportToCatalogConfig. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
func (*ExportToCatalogConfig) Prepare ¶
func (c *ExportToCatalogConfig) Prepare(lc *LocationConfig) []error
type FlatBootCommandConfig ¶
type FlatBootCommandConfig struct {
BootGroupInterval *string `mapstructure:"boot_keygroup_interval" cty:"boot_keygroup_interval" hcl:"boot_keygroup_interval"`
BootWait *string `mapstructure:"boot_wait" cty:"boot_wait" hcl:"boot_wait"`
BootCommand []string `mapstructure:"boot_command" cty:"boot_command" hcl:"boot_command"`
BootKeyInterval *string `mapstructure:"boot_key_interval" cty:"boot_key_interval" hcl:"boot_key_interval"`
}
FlatBootCommandConfig is an auto-generated flat version of BootCommandConfig. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
func (*FlatBootCommandConfig) HCL2Spec ¶
func (*FlatBootCommandConfig) HCL2Spec() map[string]hcldec.Spec
HCL2Spec returns the hcl spec of a BootCommandConfig. This spec is used by HCL to read the fields of BootCommandConfig. The decoded values from this spec will then be applied to a FlatBootCommandConfig.
type FlatCatalogConfig ¶ added in v0.0.4
type FlatCatalogConfig struct {
ISOCatalog *string `mapstructure:"iso_catalog" cty:"iso_catalog" hcl:"iso_catalog"`
TempCatalogPrefix *string `mapstructure:"temp_catalog_prefix" cty:"temp_catalog_prefix" hcl:"temp_catalog_prefix"`
CacheISO *bool `mapstructure:"cache_iso" cty:"cache_iso" hcl:"cache_iso"`
CacheOverwrite *bool `mapstructure:"cache_overwrite" cty:"cache_overwrite" hcl:"cache_overwrite"`
}
FlatCatalogConfig is an auto-generated flat version of CatalogConfig. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
func (*FlatCatalogConfig) HCL2Spec ¶ added in v0.0.4
func (*FlatCatalogConfig) HCL2Spec() map[string]hcldec.Spec
HCL2Spec returns the hcl spec of a CatalogConfig. This spec is used by HCL to read the fields of CatalogConfig. The decoded values from this spec will then be applied to a FlatCatalogConfig.
type FlatExportConfig ¶
type FlatExportConfig struct {
Name *string `mapstructure:"name" cty:"name" hcl:"name"`
Force *bool `mapstructure:"force" cty:"force" hcl:"force"`
OutputDir *string `mapstructure:"output_directory" required:"false" cty:"output_directory" hcl:"output_directory"`
DirPerm os.FileMode `mapstructure:"directory_permission" required:"false" cty:"directory_permission" hcl:"directory_permission"`
}
FlatExportConfig is an auto-generated flat version of ExportConfig. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
type FlatExportToCatalogConfig ¶
type FlatExportToCatalogConfig struct {
Catalog *string `mapstructure:"catalog" cty:"catalog" hcl:"catalog"`
TemplateName *string `mapstructure:"template_name" cty:"template_name" hcl:"template_name"`
Description *string `mapstructure:"description" cty:"description" hcl:"description"`
Overwrite *bool `mapstructure:"overwrite" cty:"overwrite" hcl:"overwrite"`
CreateCatalog *bool `mapstructure:"create_catalog" cty:"create_catalog" hcl:"create_catalog"`
SizingPolicyFinal *bool `mapstructure:"sizing_policy_final" cty:"sizing_policy_final" hcl:"sizing_policy_final"`
}
FlatExportToCatalogConfig is an auto-generated flat version of ExportToCatalogConfig. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
func (*FlatExportToCatalogConfig) HCL2Spec ¶
func (*FlatExportToCatalogConfig) HCL2Spec() map[string]hcldec.Spec
HCL2Spec returns the hcl spec of a ExportToCatalogConfig. This spec is used by HCL to read the fields of ExportToCatalogConfig. The decoded values from this spec will then be applied to a FlatExportToCatalogConfig.
type FlatOutputConfig ¶
type FlatOutputConfig struct {
OutputDir *string `mapstructure:"output_directory" required:"false" cty:"output_directory" hcl:"output_directory"`
DirPerm os.FileMode `mapstructure:"directory_permission" required:"false" cty:"directory_permission" hcl:"directory_permission"`
}
FlatOutputConfig is an auto-generated flat version of OutputConfig. 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"`
}
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 {
// The number of virtual CPUs cores for the virtual machine.
CPUs int32 `mapstructure:"CPUs"`
// The number of cores per CPU socket. This controls the CPU topology
// (sockets × cores_per_socket = total CPUs). For example, if CPUs is 8
// and cores_per_socket is 4, the VM will have 2 sockets with 4 cores each.
// Some software licenses are based on socket count rather than core count.
// If not specified, VCD uses its default topology (typically 1 socket).
CoresPerSocket int32 `mapstructure:"cores_per_socket"`
// Enable CPU hot plug setting for virtual machine. Defaults to `false`
CpuHotAddEnabled bool `mapstructure:"CPU_hot_plug"`
// The amount of memory for the virtual machine (MB)
Memory int64 `mapstructure:"memory"`
// Enable memory hot add setting for virtual machine. Defaults to `false`.
MemoryHotAddEnabled bool `mapstructure:"RAM_hot_plug"`
// Enable nested hardware virtualization for the virtual machine.
NestedHV bool `mapstructure:"NestedHV"`
// The firmware for the virtual machine.
//
// The available options for this setting are: 'bios', 'efi', and
// 'efi-secure'.
//
// -> **Note:** Use `efi-secure` for UEFI Secure Boot.
Firmware string `mapstructure:"firmware"`
// The VM hardware version. Defaults to vmx-21 (ESXi 8.0+).
// Examples: vmx-19 (ESXi 7.0 U2+), vmx-20 (ESXi 8.0), vmx-21 (ESXi 8.0 U2+)
HardwareVersion string `mapstructure:"hw_version"`
// Force entry into the BIOS setup screen during boot. Defaults to `false`.
ForceBIOSSetup bool `mapstructure:"force_bios_setup"`
// Enable virtual trusted platform module (TPM) device for the virtual
// machine. Defaults to `false`.
VTPMEnabled bool `mapstructure:"vTPM"`
// Boot delay in seconds. This adds a delay between power-on and boot,
// giving time for the "Press any key to boot from CD" prompt to appear.
// Useful for EFI boot with Windows ISOs. Defaults to 0 (no delay).
BootDelay int `mapstructure:"boot_delay"`
// VM sizing policy name. If specified, the VM will use this compute policy
// instead of manual CPU and memory configuration. Mutually exclusive with
// CPUs and memory settings.
VMSizingPolicy string `mapstructure:"vm_sizing_policy"`
}
func (*HardwareConfig) Prepare ¶
func (c *HardwareConfig) Prepare() []error
type ISOModifier ¶ added in v0.0.4
type ISOModifier struct {
// contains filtered or unexported fields
}
ISOModifier handles reading and modifying ISO images
func NewISOModifier ¶ added in v0.0.4
func NewISOModifier(sourcePath string) *ISOModifier
NewISOModifier creates a new ISO modifier for the given source ISO
func (*ISOModifier) AddContent ¶ added in v0.0.4
func (m *ISOModifier) AddContent(path string, content []byte)
AddContent adds content to be included in the modified ISO
func (*ISOModifier) AddFile ¶ added in v0.0.4
func (m *ISOModifier) AddFile(isoPath, localPath string) error
AddFile adds a file from disk to be included in the modified ISO
func (*ISOModifier) CreateModifiedISO ¶ added in v0.0.4
func (m *ISOModifier) CreateModifiedISO(outputPath string) (string, error)
CreateModifiedISO creates a new ISO with the added content Returns the SHA256 checksum of the new ISO
func (*ISOModifier) DetectBootConfig ¶ added in v0.0.4
func (m *ISOModifier) DetectBootConfig() (*BootConfig, error)
DetectBootConfig attempts to detect boot configuration from common ISO layouts
func (*ISOModifier) IsUDF ¶ added in v0.0.4
func (m *ISOModifier) IsUDF() (bool, error)
IsUDF checks if the ISO uses UDF filesystem (common for Windows ISOs)
type LocationConfig ¶
type LocationConfig struct {
// The name of the virtual machine.
VMName string `mapstructure:"vm_name"`
// The vApp where the virtual machine is created.
// If not specified and create_vapp is true, a new vApp will be created.
VApp string `mapstructure:"vapp"`
// The VDC where the virtual machine is created.
VDC string `mapstructure:"vdc"`
// If true, create a new vApp if the specified vApp does not exist.
// Defaults to true.
CreateVApp bool `mapstructure:"create_vapp"`
// The network to attach to the virtual machine.
Network string `mapstructure:"network"`
// The IP allocation mode for the network connection.
// Valid values are: POOL, DHCP, MANUAL, NONE.
// Defaults to POOL.
// - POOL: VCD assigns an IP from the network pool. The assigned IP is queried
// and made available as template variables for boot_command and cd_content.
// - MANUAL: User specifies the IP via vm_ip. This IP is used for templates.
// - DHCP: OS gets IP from DHCP server. No static IP injection.
IPAllocationMode string `mapstructure:"ip_allocation_mode"`
// The static IP address for the virtual machine.
// Required when ip_allocation_mode is MANUAL.
VMIPAddress string `mapstructure:"vm_ip"`
// Gateway address for the VM. Used for template variables ({{ .VMGateway }}).
// For POOL mode, if not set, discovered from network configuration.
VMGateway string `mapstructure:"vm_gateway"`
// DNS server for the VM. Used for template variables ({{ .VMDNS }}).
// For POOL mode, if not set, defaults to 8.8.8.8.
VMDNS string `mapstructure:"vm_dns"`
// The storage profile to use for the virtual machine.
// If not specified, the default storage profile for the VDC will be used.
StorageProfile string `mapstructure:"storage_profile"`
}
func (*LocationConfig) Prepare ¶
func (c *LocationConfig) Prepare() []error
type OutputConfig ¶
type OutputConfig struct {
// The directory where 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 run 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"`
// The permissions to apply to the "output_directory", and to any parent
// directories that get created for output_directory. By default, this is
// "0750". You should express the permission as quoted string with a
// leading zero such as "0755" in JSON file, because JSON does not support
// octal value. In Unix-like OS, the actual permission may differ from
// this value because of umask.
DirPerm os.FileMode `mapstructure:"directory_permission" required:"false"`
}
func (*OutputConfig) FlatMapstructure ¶
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 ¶
func (c *OutputConfig) ListFiles() ([]string, error)
ListFiles retrieves a list of all non-directory file paths within the configured output directory.
func (*OutputConfig) Prepare ¶
func (c *OutputConfig) Prepare(ctx *interpolate.Context, pc *common.PackerConfig) []error
type RemoveNetworkAdapterConfig ¶
type RemoveNetworkAdapterConfig struct {
// Remove all network adapters from the virtual machine image. Defaults to `false`.
RemoveNetworkAdapter bool `mapstructure:"remove_network_adapter"`
}
type RunConfig ¶
type RunConfig struct {
// The priority of boot devices. Defaults to `disk,cdrom`.
//
// The available boot devices are: `floppy`, `cdrom`, `ethernet`, and
// `disk`.
//
// -> **Note:** If not set, the boot order is temporarily set to
// `disk,cdrom` for the duration of the build and then cleared upon
// build completion.
BootOrder string `mapstructure:"boot_order"`
}
type ShutdownConfig ¶
type ShutdownConfig struct {
// Specify a virtual machine guest shutdown command. This command will be run using
// the `communicator`. Otherwise, the VMware Tools are used to gracefully shut down
// the virtual machine.
Command string `mapstructure:"shutdown_command"`
// Amount of time to wait for graceful shut down of the virtual machine.
// Defaults to `5m` (5 minutes).
// This will likely need to be modified if the `communicator` is 'none'.
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 a `preseed.cfg`, a script or the final provisioner.
// Packer will wait for a default of 5 minutes until the virtual machine is shutdown.
// The timeout can be changed using `shutdown_timeout` option.
DisableShutdown bool `mapstructure:"disable_shutdown"`
}
func (*ShutdownConfig) Prepare ¶
func (c *ShutdownConfig) Prepare(comm communicator.Config) (warnings []string, errs []error)
type StepBootCommand ¶
type StepBootCommand struct {
Config *BootCommandConfig
VMName string
Ctx interpolate.Context
}
StepBootCommand runs the boot command via WMKS console
func (*StepBootCommand) Cleanup ¶
func (s *StepBootCommand) Cleanup(state multistep.StateBag)
func (*StepBootCommand) Run ¶
func (s *StepBootCommand) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepConfigureBootOptions ¶ added in v0.0.4
type StepConfigureBootOptions struct {
// BootDelay in seconds (will be converted to milliseconds)
BootDelay int
// Firmware setting - if "efi-secure", enables EFI secure boot
Firmware string
}
StepConfigureBootOptions configures boot delay and EFI secure boot. This must run after VM creation but before the VM is powered on.
func (*StepConfigureBootOptions) Cleanup ¶ added in v0.0.4
func (s *StepConfigureBootOptions) Cleanup(state multistep.StateBag)
func (*StepConfigureBootOptions) Run ¶ added in v0.0.4
func (s *StepConfigureBootOptions) Run(_ context.Context, state multistep.StateBag) multistep.StepAction
type StepConfigureTPM ¶ added in v0.0.4
type StepConfigureTPM struct {
Enabled bool
}
StepConfigureTPM enables the virtual TPM on the VM if configured. This must run after VM creation but before the VM is powered on.
func (*StepConfigureTPM) Cleanup ¶ added in v0.0.4
func (s *StepConfigureTPM) Cleanup(state multistep.StateBag)
func (*StepConfigureTPM) Run ¶ added in v0.0.4
func (s *StepConfigureTPM) Run(_ context.Context, state multistep.StateBag) multistep.StepAction
type StepConnect ¶
type StepConnect struct {
Config *ConnectConfig
}
func (*StepConnect) Cleanup ¶
func (s *StepConnect) Cleanup(state multistep.StateBag)
func (*StepConnect) Run ¶
func (s *StepConnect) Run(_ context.Context, state multistep.StateBag) multistep.StepAction
type StepCreateTempCatalog ¶
type StepCreateTempCatalog struct {
Config *CatalogConfig
VDCName string // VDC name to get storage profile from for catalog storage
StorageProfile string // Optional storage profile name. If empty, uses VDC default.
}
func (*StepCreateTempCatalog) Cleanup ¶
func (s *StepCreateTempCatalog) Cleanup(state multistep.StateBag)
func (*StepCreateTempCatalog) Run ¶
func (s *StepCreateTempCatalog) Run(_ context.Context, state multistep.StateBag) multistep.StepAction
type StepExportToCatalog ¶
type StepExportToCatalog struct {
Config *ExportToCatalogConfig
}
func (*StepExportToCatalog) Cleanup ¶
func (s *StepExportToCatalog) Cleanup(state multistep.StateBag)
func (*StepExportToCatalog) Run ¶
func (s *StepExportToCatalog) Run(_ context.Context, state multistep.StateBag) multistep.StepAction
type StepHTTPIPDiscover ¶
type StepHTTPIPDiscover struct {
// HTTPIP is a manually specified IP address to use (overrides auto-discovery)
HTTPIP string
// HTTPInterface is a specific network interface to use
HTTPInterface string
// TargetHost is the host to use for route-based IP discovery (typically VCD host)
TargetHost string
}
StepHTTPIPDiscover discovers the host IP address to use for the HTTP server. This IP needs to be reachable from the VM for serving kickstart/preseed files.
func (*StepHTTPIPDiscover) Cleanup ¶
func (s *StepHTTPIPDiscover) Cleanup(state multistep.StateBag)
func (*StepHTTPIPDiscover) Run ¶
func (s *StepHTTPIPDiscover) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepModifyISO ¶ added in v0.0.4
type StepModifyISO struct {
Config *commonsteps.CDConfig
// contains filtered or unexported fields
}
StepModifyISO modifies the downloaded ISO to include cd_content and cd_files This is needed because VCD only has one media slot, so we can't attach a separate CD for additional content.
func (*StepModifyISO) Cleanup ¶ added in v0.0.4
func (s *StepModifyISO) Cleanup(state multistep.StateBag)
func (*StepModifyISO) Run ¶ added in v0.0.4
func (s *StepModifyISO) Run(_ context.Context, state multistep.StateBag) multistep.StepAction
type StepMountISO ¶
type StepMountISO struct{}
func (*StepMountISO) Cleanup ¶
func (s *StepMountISO) Cleanup(state multistep.StateBag)
func (*StepMountISO) Run ¶
func (s *StepMountISO) Run(_ context.Context, state multistep.StateBag) multistep.StepAction
type StepQueryVMIP ¶ added in v0.0.4
type StepQueryVMIP struct {
OverrideGateway string
OverrideDNS string
VDCName string
NetworkName string
}
StepQueryVMIP queries the IP address assigned to a VM by VCD. This is used when POOL allocation mode is used - VCD assigns the IP and we need to query it after VM creation for use in cd_content templates.
func (*StepQueryVMIP) Cleanup ¶ added in v0.0.4
func (s *StepQueryVMIP) Cleanup(state multistep.StateBag)
func (*StepQueryVMIP) Run ¶ added in v0.0.4
func (s *StepQueryVMIP) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepRemoveNetworkAdapter ¶
type StepRemoveNetworkAdapter struct {
Config *RemoveNetworkAdapterConfig
}
func (*StepRemoveNetworkAdapter) Run ¶
func (s *StepRemoveNetworkAdapter) Run(_ context.Context, state multistep.StateBag) multistep.StepAction
type StepResolveVApp ¶
func (*StepResolveVApp) Cleanup ¶
func (s *StepResolveVApp) Cleanup(state multistep.StateBag)
func (*StepResolveVApp) Run ¶
func (s *StepResolveVApp) Run(_ context.Context, state multistep.StateBag) multistep.StepAction
type StepRun ¶
type StepSetManualIP ¶ added in v0.0.4
type StepSetManualIP struct {
ManualIP string // The IP address to use
OverrideGateway string // Optional gateway
OverrideDNS string // Optional DNS
}
StepSetManualIP sets the manually configured IP address in state for use by boot_command and cd_content templates. Used for MANUAL allocation mode.
func (*StepSetManualIP) Cleanup ¶ added in v0.0.4
func (s *StepSetManualIP) Cleanup(state multistep.StateBag)
func (*StepSetManualIP) Run ¶ added in v0.0.4
func (s *StepSetManualIP) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepShutdown ¶
type StepShutdown struct {
Config *ShutdownConfig
CommType string // "none", "ssh", "winrm", etc.
}
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 StepUploadISO ¶
type StepUploadISO struct {
// CacheISO when true checks if ISO already exists in catalog before uploading.
CacheISO bool
// CacheOverwrite when true will delete and re-upload existing ISO.
CacheOverwrite bool
}
func (*StepUploadISO) Cleanup ¶
func (s *StepUploadISO) Cleanup(state multistep.StateBag)
func (*StepUploadISO) Run ¶
func (s *StepUploadISO) Run(_ context.Context, state multistep.StateBag) multistep.StepAction
type StepWaitForIP ¶
type StepWaitForIP struct {
Config *WaitIpConfig
}
StepWaitForIP waits for the VM to acquire an IP address. This is needed before the communicator can connect to the VM.
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 {
// Time to wait for the VM to get an IP address. Defaults to 30m.
WaitTimeout time.Duration `mapstructure:"ip_wait_timeout"`
// Time to wait after IP is discovered before considering it stable. Defaults to 5s.
SettleTimeout time.Duration `mapstructure:"ip_settle_timeout"`
}
WaitIpConfig contains configuration for waiting for VM IP address
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) Prepare ¶
func (c *WaitIpConfig) Prepare() []error
Source Files
¶
- artifact.go
- comm.go
- config_location.go
- driver.go
- iso_modifier.go
- output_config.go
- output_config.hcl2spec.go
- step_boot_command.go
- step_boot_command.hcl2spec.go
- step_boot_options.go
- step_connect.go
- step_create_temp_catalog.go
- step_create_temp_catalog.hcl2spec.go
- step_discover_ip.go
- step_export.go
- step_export.hcl2spec.go
- step_export_to_catalog.go
- step_export_to_catalog.hcl2spec.go
- step_hardware.go
- step_http_ip_discover.go
- step_modify_iso.go
- step_mount_iso.go
- step_query_vm_ip.go
- step_remove_network_adapter.go
- step_resolve_vapp.go
- step_run.go
- step_run.hcl2spec.go
- step_shutdown.go
- step_tpm.go
- step_upload_iso.go
- step_wait_for_ip.go
- step_wait_for_ip.hcl2spec.go