Commit Graph

893 Commits (use_progress_bar)

Author SHA1 Message Date
Adrien Delorme 4bf6a56d71 split communitacor.SSH & communitacor.WinRM to facilitate documentation
7 years ago
Adrien Delorme 4399684372 make fmt autogenerated docs
7 years ago
Adrien Delorme e6cbb013ba add // go:generate struct-markdown to all previously edited files
7 years ago
Adrien Delorme f1917edd34 generate the comments for config struct of builders scraping doc website
7 years ago
aaronk1 4ffa1779f1
Correct typo in var name
7 years ago
Megan Marsh f7c1b5e940 add 30 minute timeout for destroying a VM
7 years ago
Adrien Delorme 56c7593725 fix panic in StepConfigureVNC
7 years ago
Adrien Delorme f555e7a9f2 allow a provisioner to timeout
7 years ago
Adrien Delorme c4f3dccc14 rename interpolation context from ctx to ictx and contexts to ctx to avoid conflicts
7 years ago
Adrien Delorme a4bf94dd3c change Builder to be passed a context for cancellation
7 years ago
Adrien Delorme ac92916b01 StepConfigureVNC: close listener only once
7 years ago
Adrien Delorme a3838ecfad error on negative ports
7 years ago
Adrien Delorme 5a6dffde9a use port as ints
7 years ago
Adrien Delorme f828b72c10 step configure vnc: allow to use ESX5Driver again
7 years ago
Adrien Delorme c214f6735b make everything a uint
7 years ago
Adrien Delorme b5d78d47f5 vmware StepConfigureVNC: use common/net pkg to find open port
7 years ago
Adrien Delorme 9f82b75e57 Use the hashicorp/go-getter to download files
7 years ago
Megan Marsh eb98840f18
Merge pull request #7357 from e-mow/issue-7140
7 years ago
Eric Mowry cef3d0eb24 Ran make fmt per Megan's request.
7 years ago
Eric Mowry 109ba2c54c After testing a ISO and VMX clone along with setting the display_name option it was determined that having no name for the .vmxf file did not work either. Updating to check if displayName is not empty before using and falling back to VMName if displayName is empty.
7 years ago
Megan Marsh 0371e2a1b4
Merge pull request #7074 from hashicorp/fix_3329
7 years ago
Eric Mowry e74a81e27b Deny the copying of .vmxf from the source VM to the target VM. If this file gets copied over to the new VM once the VM gets deleted the .vmxf and the folder for the VM stay on the datastore. This causes Packer to hang because the folder on the datastore does not go away during the cleanup process.
7 years ago
Eric Mowry 1127096beb Setting extendedconfigfile to the name of the VM so that when ESXi makes the vmxf it is named after the VM and ESXi will properly delete the file when the VM gets deleted.
7 years ago
Megan Marsh 5cc442872e
Merge pull request #7314 from hashicorp/fix_7234
7 years ago
Megan Marsh bbc52f9a7d add noSSLVerify to ovftool args
7 years ago
Megan Marsh bd3339f1f9 also strip \r to work around windows file ending strangeness
7 years ago
Megan Marsh 6ea64bc378
Merge pull request #7191 from arizvisa/GH-7190
7 years ago
Megan Marsh ce8f5c31df escape query as suggested in issue #7200
7 years ago
Ali Rizvi-Santiago 9d2f98394e Revert "Renamed the terse option, `cores`, to to the less-terse version `cores_per_socket`."
7 years ago
Ali Rizvi-Santiago 0c37a3c68f Renamed the terse option, `cores`, to to the less-terse version `cores_per_socket`.
7 years ago
Ali Rizvi-Santiago 4894873971 Added logic to the vmware-iso builder that appends the number of cores per socket to the vmx in `stepCreateVmx`.
7 years ago
Ali Rizvi-Santiago 062c62eed8 Added support for specifying the number of cores as `cores` to vmware-common.
7 years ago
Adrien Delorme 9f7b4ffc17
Merge branch 'master' into pr/6950
7 years ago
DanHam 0821653256
Fix 'nil' dir in VMware artifact when building locally
7 years ago
Megan Marsh 7d5ea43f41 revert the hddorder being added to the vmx template, since it's breaking things for some of our users.
7 years ago
Adrien Delorme b7222d1f56 Add tmp package that offers Dir & File funcs
7 years ago
Ali Rizvi-Santiago 1a36458e9e Tiny fix to replace some duplicate code with usage of the `halt` closure in the StepCloneVMX step for the vmware-vmx builder.
7 years ago
Megan Marsh dbfc1b5aff fix tests
7 years ago
Megan Marsh 0058422a5c also for vmx
7 years ago
Megan Marsh 0fe4d79bbf add validation to prevent users from being confused about format functionality
7 years ago
Ali Rizvi-Santiago 96bdf17d2e Added knowledge of the "temporaryDevices" statebag to the StepCleanVMX tests for the VMware builders.
7 years ago
Ali Rizvi-Santiago fa4998e1ec Modified StepCleanVMX to walk through the "temporaryDevices" statebag so that we can disable or remove its devices cleanly. This gets rid of the regex hack that was previously used to identify a cdrom-image.
7 years ago
Ali Rizvi-Santiago e0d3861e81 Updated StepCreateVMX to add the CDROM device that packer uses to the "temporaryDevices" statebag so that StepCleanVMX can unmount its ISO later.
7 years ago
Ali Rizvi-Santiago 3512c3c5ea Updated StepConfigureVMX to add the floppy disk device to the "temporaryDevices" statebag so that StepCleanVMX can remove it later.
7 years ago
Ali Rizvi-Santiago 27b16cee0a Added a new "temporaryDevices" key to the VMware builders' statebag in order to keep track of devices that were temporarily added during build and need to be removed later by StepCleanVMX.
7 years ago
Megan Marsh 11ef407b4d
Merge pull request #7016 from rickard-von-essen/vmware-tech-prev
8 years ago
Megan Marsh ec75913412 fix crash that occurs when dir is nil
8 years ago
Megan Marsh 89fb8f0d3e fix defaulting/lack thereof for cpu count and memory in vmware template
8 years ago
Ali Rizvi-Santiago f8c23c1808 Updated things related to the vmware-iso builder to include @azr's suggestions.
8 years ago
Ali Rizvi-Santiago 61ee3a44f5 Modified the cpus and memory options for the vmware builders to only apply them if they were specified.
8 years ago
Ali Rizvi-Santiago fb7ce9f2b5 Renamed both `cpu_count` and `memory_size` to `cpus` and `memory` (respective).
8 years ago
Ali Rizvi-Santiago cd45248eaa Moved common hardware config options used by the vmware-iso builder into common/hw_config and added options for the CpuCount and MemorySize.
8 years ago
Rickard von Essen 4ea3d1567a
vmware: Correctly parse version for VMware Fusion Tech Preview
8 years ago
Ali Rizvi-Santiago 4e73c85e22 Re-sorted, grouped, and commented the options in the template VMX for the VMWare builder to keep things organized.
8 years ago
Megan Marsh dca02c7b07
Merge pull request #6962 from hashicorp/fix_6940
8 years ago
Megan Marsh 3b413d2e5e fix rebase conflicts
8 years ago
Megan Marsh 89184ae384 rework if/else to simplify main code body.
8 years ago
Megan Marsh 536e0501ac Validate username/password for ovftool during prepare.
8 years ago
Megan Marsh 49b40e0789
Merge pull request #6984 from hashicorp/add_display_name_vmware
8 years ago
Adrien Delorme f1fa28847f
remove debug line.
8 years ago
Adrien Delorme 78ac943679
Merge pull request #6987 from hashicorp/6624
8 years ago
Megan Marsh 2e2b2cea82 add a warning that checks for collisions between packer-generated values in the default vmx file and the vmx_data
8 years ago
Megan Marsh 3cf4c63a87 Change antiquated Master/Slave terminology for disk drives to more appropriate Primary/Secondary.
8 years ago
Megan Marsh e5c4a4a6fb create export directories for vmx and ovf file types, too.
8 years ago
Megan Marsh 68c9e34bfe add new display_name template option
8 years ago
Megan Marsh 790d5661c5 escape username
8 years ago
Megan Marsh 96d628eef1 fix silliness with pointers
8 years ago
Megan Marsh 5c2ca450bd fix tests
8 years ago
Megan Marsh 5815b376b4 remove unnecessary checks; we always default format to ovf if it is unset.
8 years ago
Megan Marsh c3144c2d0a add some missing template validation (copied from iso builder) and revert to current use of displayName for parsing vm ssh IP; using VMName was breaking chained builds that hadn't updated the display name from the previous build.
8 years ago
Megan Marsh c3d6d45696 modify test so that it accesses CommConfig the same way we really do within the driver
8 years ago
Megan Marsh f18bb19f96 remove redundant config; CommConfig was already a part of the SSSHConfig struct
8 years ago
Megan Marsh fa12113eaf remove unused NewLocalArtifact
8 years ago
Megan Marsh 2ae235a28a fix tests
8 years ago
Megan Marsh 290f4a7c4c cleanup to make it actually build after that monstrous rebase
8 years ago
Alexander Laamanen 3193f50f17 Support export with the vmx builder.
8 years ago
Alexander Laamanen a68a639a1a Move step_export to common.
8 years ago
Alexander Laamanen 63054fb808 Fix the test.
8 years ago
Stuart Miller da5f322484 Add quotes around all filenames to prevent issues with spaces
8 years ago
Alexander Laamanen f42f5a8ad3 Remove some extra logging.
8 years ago
Alexander Laamanen e7e6a80587 No need to make upload public.
8 years ago
Alexander Laamanen c294e65c36 A separate driver file is not really needed anymore
8 years ago
Alexander Laamanen 2ed6c3ef5e Set output dir always according to the config.
8 years ago
Alexander Laamanen c940f7e754 Conditional reload.
8 years ago
Alexander Laamanen 17845beadc Fix the CommHost tests
8 years ago
Alexander Laamanen 5e74bcfb88 Fix tests, move remote_ default values to driver_config.
8 years ago
Alexander Laamanen 4d9cb19012 Refactor artifacts and output_dir implementations.
8 years ago
Alexander Laamanen 2d00dc6756 Add VMName to the vmx mods.
8 years ago
Alexander Laamanen 7b5943160b Re-enable the CommHost() call. Use common's driver factory.
8 years ago
Alexander Laamanen ba22090bc9 Move step_register and step_uload_vmx from iso to common.
8 years ago
Alexander Laamanen b5298464c5 Move the remote_driver from iso to common.
8 years ago
Alexander Laamanen 91c7089455 Implement the first version of the remote Clone().
8 years ago
Alexander Laamanen 46cfb5a30c Move driver_esx5 to commons and allow it to be instantiated wtih NewDriver()
8 years ago
Megan Marsh fd8a85042d use strconv.Quote instead of fmt.Sprint
8 years ago
Megan Marsh 18c5e8deb8 fix
8 years ago
Megan Marsh 1e4133cbf9 quote upload path
8 years ago
Megan Marsh 3f591d78f3 quote vmx path in register function
8 years ago
Megan Marsh 8cba32d526 escape all the d.sh calls that contain paths
8 years ago
Megan Marsh 5b9adc0c48 single quotes
8 years ago
Megan Marsh e5e75df033 fix datastore path that contains spaces
8 years ago
Megan Marsh 38cc525ec7 new option allowing user to clean up the ephemeral ssh key from the authorized_keys file
8 years ago
Jeffrey Martin 1833b4edaf
validate compaction is skipped when not 'thin'
8 years ago
Jeffrey Martin b51cd22b21
document ESXi disk compaction & use verbose option
8 years ago
Jeffrey Martin 09c71f3810
add support for disk compaction to esx5 builder
8 years ago
Adrien Delorme 25de7ad1f2 PrivateKey => PrivateKeyFile
8 years ago
Adrien Delorme 5369c15459 helper: communicator.SSHFileSigner => ssh.FileSigner
8 years ago
Adrien Delorme 51d2aac9f6 SSHPrivateKey => SSHPrivateKeyFile
8 years ago
Megan Marsh bf191d1ef6
Merge pull request #6204 from arizvisa/GH-6197
8 years ago
Megan Marsh 340363a649
Merge pull request #6613 from hashicorp/merge_ssh_config_funcs
8 years ago
Megan Marsh 31d4f8af45 use a time.Duration instead of a hardcoded ms
8 years ago
Megan Marsh 918db58604 added new template variables to replace PACKER_KEY_INTERVAL with tunable key and keygroup intervals depending on driver used
8 years ago
Adrien Delorme fa44a4546f use ssh.ParsePrivateKey where we can
8 years ago
Adrien Delorme 41f6e0334d refactor all copy pasted sshConfig with into communicator.Config.SSHConfigFunc
8 years ago
Adrien Delorme 6b3844a64f
Revert "allow to use ISO images in-place v.s. copying them"
8 years ago
Adrien Delorme 17f2949e36 remove stuttering; ISOConfig.InplaceISO -> Inplace
8 years ago
Adrien Delorme 82e480a285 allow to use ISO images inplace v.s. copying them
8 years ago
bugbuilder 2c4f703ff8 Merge
8 years ago
Megan Marsh 1d15f09e36
Merge pull request #6440 from DanHam/simplify-vmx-find-disks
8 years ago
DanHam a39c5887fb
Test we halt if a bad path is set in vmx_path
8 years ago
DanHam 21117e5d38
Test we fail if displayName is not stored in the statebag as 'display_name'
8 years ago
DanHam 88c43ec98d
Test we fail if the displayName key is not found in the VMX
8 years ago
DanHam d68d26a6e5
Fix tests: We now need to set `displayName` key/val pair in the test VMX
8 years ago
DanHam 902cea0f30
ESXi: Fix failure to export VM when `displayName` differs from `vm_name`
8 years ago
DanHam cd7d3812ea
ESXi: Fix failure to get VM IP when `displayName` differs from `vm_name`
8 years ago
DanHam 3eab3cc99b
ESXi builds require we store the value of displayName in the statebag
8 years ago
M. Marsh 8658eaf1ac
Merge pull request #6424 from DanHam/fix-esxi-export-hang
8 years ago
DanHam 939aa7e289
Add test: We shouldn't error when main remote options are unset
8 years ago
DanHam efcdf60d96
Add tests to ensure remote_password is set when exporting with ovftool
8 years ago
DanHam 0d9134bdbc
Fix existing tests as they were not doing what they should have been
8 years ago
DanHam eee16262b6
Remove duplicate/redundant test
8 years ago
DanHam c8199458a7
Prevent hang on export for remote ESXi build due to empty remote_password
8 years ago
M. Marsh 406f4eeb93
Merge pull request #6394 from conradjones/master
8 years ago
DanHam fff72780e1
Further simplify enumeration of attached disks for VMware VMX builder
8 years ago
Conrad Jones d9b6924986 Add cloneType to fusion driver
8 years ago
Bob Brumfield 04ff0761e6 Notify that we are skipping file, but retain error message
8 years ago
Bob Brumfield 591bfe3dfa Continue searching for leases even if one of the files cannot be read.
8 years ago
Conrad Jones d05a601d00 Add support to vmware-vmx builder for linked clones.
8 years ago
M. Marsh c586312bf7
Merge pull request #4538 from hashicorp/defaultovf
8 years ago
DanHam 73eb9a629e
Revert "Fix test - reporting compaction results requires a tmp file"
8 years ago
DanHam 2939cd75ae
Revert "Report the result of the disk compaction step"
8 years ago
DanHam a866232ac9
Use regex based approach to detect attached disks
8 years ago
DanHam 25dd27a164
Remove tmp directories created by builder/vmware/common tests
8 years ago
DanHam c828015bc3
Follow variable varName <-> statebag var_name convention
8 years ago
DanHam f342975ff3
Fix test - reporting compaction results requires a tmp file
8 years ago
DanHam 08f9d619a9
Report the result of the disk compaction step
8 years ago
DanHam 10d93dffa4
Fix tests for vmware/common
8 years ago
DanHam a729ecda87
Fix tests for vmware/vmx builder
8 years ago
DanHam c48a7889f9
Simplify handling of disks by collating requirements and unifying ops
8 years ago
Matthew Hooker 67a9c7fb92
we never expect remote cache to be a directory.
8 years ago
Matthew Hooker de1dac1bdf
don't delete the cache directory.
8 years ago
Matthew Hooker 97cfd60b82
Remove remote cache correctly.
8 years ago
Ali Rizvi-Santiago 673d4579e4 Ack! Forgot to include the template variable in the definition for vmxTemplateData for commit 0e519d79e0. Now it's added..
8 years ago
Ali Rizvi-Santiago 0e519d79e0 Modified iso/step_create_vmx.go in the vmware-iso builder to also specify the "bios.hddOrder" field depending on the hdd device that was specified. This might close issue #6197
8 years ago
Ali Rizvi-Santiago 5d8b476a7f Fixed the regex in common/step_clean_vmx.go for the VMware builder to also support removal of sata-based cdrom devices. Also added a comment in iso/step_create_vmx.go that links both pieces of related code.
8 years ago
Matthew Hooker 451e3d0554
builder/vmware-esxi: remove floppy files when done
8 years ago
Matthew Hooker 6bbfe7e0bd
remove useless check against format
8 years ago
Matthew Hooker fdeadfe3f6
builder/vmware: correctly default export format to ovf
8 years ago
DanHam bd9e585cb9
Add test for enumeration of vmx network type
8 years ago
DanHam 94d5a7f2e2
Fix copy/paste error referencing Virtualbox
8 years ago
DanHam 1aee759f06
Fix tests and reconfigure for support of multi-disk vm
8 years ago
DanHam 6c9d4efd9f
Fix error on compaction step of vmx build. Support compacting multi-disk vm
8 years ago
Matthew Hooker c6299972b9
s/boot_command/bootcommand/
8 years ago
Matthew Hooker 408eba88ad
flatten boot command config and implement for vmware
8 years ago
Matthew Hooker cba4d3235f
cleanup
8 years ago
Matthew Hooker bf0a320125
Implement new parser for qemu boot command
8 years ago
Matthew Hooker 1c0af28662
Some cleanup and comments.
8 years ago
Matthew Hooker 4e2f14196a
Rely on context to cancel typing boot command.
8 years ago
Matthew Hooker 673245afcf
Replace boot command parser with PEG parser.
8 years ago
M. Marsh 83162717ed
Merge pull request #4563 from marema31/vmware-iso-warn-esx
8 years ago
Ali Rizvi-Santiago 2c2904c095 Modified the path finders for the Player driver in the vmware-builders to search through all the possible variations for dhcp configuration and leases..
8 years ago
Ali Rizvi-Santiago 7e9699675f Modified device matching logs to look more consistent.
8 years ago
Ali Rizvi-Santiago 6e176f97a0 Added logs to all of the VMware drivers that emits each detected network device that gets enumerated for a network.
8 years ago
Ali Rizvi-Santiago 646523c5f4 Replaced the call to os.Open and ReadNetworkMap to just a single call to ReadNetmapConfig in both the Workstation9 and Player5 VMware drivers.
8 years ago
Ali Rizvi-Santiago 55702a697a Ack, forgot to :w in vim. Changed ui.Say in step_clone_vmx.go to use fmt.Sprintf as it originally was a call to log.Printf.
8 years ago
Ali Rizvi-Santiago 72da7cbfbb Fixed a case-sensitivity issue when determing the network type during cloning in the vmware-vmx builder and added also some logs that output the different options that were determined from the .vmx. This outputs more accurate debug information and helps out with issue #5925
8 years ago
Megan Marsh ef4f3f143b
Merge pull request #5985 from AndiDog/f-5979-vmware-fusion-guestip-lookup-multiple-devices
8 years ago
Josh Soref fa36e1d961 spelling: processing
8 years ago
Josh Soref 61030c0d85 spelling: output
8 years ago
Josh Soref d987fcefc3 spelling: multiples
8 years ago
Andreas Sommer ff92fb883d Handle multiple devices per VMware network type
8 years ago
Megan Marsh ac2e02b938 remove loglines that should not have made it onto master
8 years ago
Ali Rizvi-Santiago df6cdcc7f7 Disable the usage of the XHCI bus for USB on the vmware-iso builder.
8 years ago
SwampDragons 9e8e376d6c
Merge pull request #5932 from hashicorp/add_configurable_snapshot_timeout
8 years ago
Megan Marsh 597ddc2192 add configurable snapshot timeout to oracle-classic builder
8 years ago
Megan Marsh 33acdbf3bf move comments so indentation is more logical
8 years ago
Ali Rizvi-Santiago ac2ddbcbf5 Fixes the assumption that all the VMware builder's drivers will implement a network mapper for mapping a network name to it's corresponding device.
8 years ago
Ali Rizvi-Santiago 27ed479b0a Reinforced the VMWare Workstation builder methodology for locating the dhcp.conf and dhcpd.leases files on Linux.
8 years ago
Ali Rizvi-Santiago d6e5342ece Fixed a type-o in the VMWare builder when locating the dhcp configuration file on Linux.
8 years ago
Ali Rizvi-Santiago fa2dddd26d Fixed some things mucked up during rebase.
8 years ago
Ali Rizvi-Santiago aefe41a44a Fixed an issue with the previous commit so that when the user does not specify the cdrom_adapter_type to fallback to the original decision made by the disk adapter type selection.
8 years ago
Ali Rizvi-Santiago eb0445ca96 Added support for specifying both the network adapter type and cdrom adapter type as requested by @night199uk. Also included the respective documentation for these new options.
8 years ago
Ali Rizvi-Santiago 74946071d2 Added support for specifying the disk adapter type to the vmware builders. This was squashed from the vmware-diskAdapterType branch (#2968) as submitted by Rami Abughazaleh <icnocop@users.noreply.github.com>. This closes #5671 and possibly #4885.
8 years ago
Ali Rizvi-Santiago 594ed950c7 Fixed a race condition in builder/vmware/common/driver_parser.go due to a misunderstanding how channels work when you close them.
8 years ago
Ali Rizvi-Santiago 737e951685 Added missing root path to path-finders for the VMware Fusion implementation in the vmware builder as mentioned by @SwampDragons.
8 years ago
Ali Rizvi-Santiago b2fec18b1e Added parser for VMware Fusion's networking file. Replaced VmwareDriver's NetmapConfPath with a NetworkMapperInterface in order to handle the differences between VMware Fusion and the rest of the VMware suite.
8 years ago
Ali Rizvi-Santiago 069d00f70b Added the paths suggested by @phekmat and @SwampDragons for VMware Fusion... Although parser for the new mapper format is likely to be needed still.
8 years ago
Ali Rizvi-Santiago 8cc0776f3a Fixed oversight in VMware builder's mock-driver that neglected to initialize 'HostAddressResult'.
8 years ago
Ali Rizvi-Santiago 029c357d8c Modified some tests to require the PACKER_ACC environment variable to be set before executing them. This turns them into acceptance tests as per CONTRIBUTING.md.
8 years ago
Ali Rizvi-Santiago 58ebc5c9a5 When specifying NONE for serial or parallel in the VMware builder, disable the serial and parallel port devices entirely.
8 years ago
Ali Rizvi-Santiago 258804106b Added missing GetVmwareDriver() method to VMware Builder's DriverMock.
8 years ago