Commit Graph

75 Commits

Author SHA1 Message Date
Prakash Sidaraddi 67be007f45 Support floppy_files for vmx on esxi 2019-09-20 00:23:28 +05:30
allinwait 171c2a9a07 add the floppy label option 2019-09-12 12:25:22 +00:00
Adrien Delorme a4bf94dd3c change Builder to be passed a context for cancellation
we have to to give it to our hook
2019-04-03 15:55:55 +02:00
Adrien Delorme 9f82b75e57 Use the hashicorp/go-getter to download files
* removed packer.Cache and references since packer.Cache is never used except in the download step. The download step now uses the new func packer.CachePath(targetPath) for this, the behavior is the same.
* removed download code from packer that was reimplemented into the go-getter library: progress bar, http download restart, checksuming from file, skip already downloaded files, symlinking, make a download cancellable by context.
* on windows if packer is running without symlinking rights and we are getting a local file, the file will be copied instead to avoid errors.
* added unit tests for step_download that are now CI tested on windows, mac & linux.
* files are now downloaded under cache dir `sha1(filename + "?checksum=" + checksum) + file_extension`
* since the output dir is based on the source url and the checksum, when the checksum fails, the file is auto deleted.
* a download file is protected and locked by a file lock,
* updated docs
* updated go modules and vendors
2019-03-13 12:11:58 +01:00
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. 2018-12-03 17:47:45 -06:00
Megan Marsh 68c9e34bfe add new display_name template option 2018-11-09 10:54:31 -08:00
Megan Marsh 5815b376b4 remove unnecessary checks; we always default format to ovf if it is unset.
fix exportoutputdir
2018-11-02 14:22:01 -07:00
Megan Marsh f18bb19f96 remove redundant config; CommConfig was already a part of the SSSHConfig struct 2018-11-02 14:22:01 -07:00
Megan Marsh fa12113eaf remove unused NewLocalArtifact
consolidate artifacts
entirely remove local artifact object and get artifacts in the vmx builder the same way we do in the vmware iso builder
2018-11-02 14:22:01 -07:00
Megan Marsh 2ae235a28a fix tests 2018-10-25 14:41:01 -07:00
Megan Marsh 290f4a7c4c cleanup to make it actually build after that monstrous rebase 2018-10-25 14:17:35 -07:00
Alexander Laamanen 3193f50f17 Support export with the vmx builder. 2018-10-25 13:02:37 -07:00
Alexander Laamanen 2ed6c3ef5e Set output dir always according to the config. 2018-10-25 12:37:47 -07:00
Alexander Laamanen 5e74bcfb88 Fix tests, move remote_ default values to driver_config. 2018-10-25 12:30:57 -07:00
Alexander Laamanen 4d9cb19012 Refactor artifacts and output_dir implementations. 2018-10-25 12:21:24 -07:00
Alexander Laamanen 2d00dc6756 Add VMName to the vmx mods. 2018-10-25 11:17:09 -07:00
Alexander Laamanen 7b5943160b Re-enable the CommHost() call. Use common's driver factory. 2018-10-25 11:17:09 -07:00
Alexander Laamanen ba22090bc9 Move step_register and step_uload_vmx from iso to common. 2018-10-25 11:07:02 -07:00
Megan Marsh 38cc525ec7 new option allowing user to clean up the ephemeral ssh key from the authorized_keys file 2018-09-14 11:06:38 -07:00
Megan Marsh 340363a649
Merge pull request #6613 from hashicorp/merge_ssh_config_funcs
Merge ssh config funcs from builders
2018-08-23 16:03:36 -07:00
Megan Marsh 918db58604 added new template variables to replace PACKER_KEY_INTERVAL with tunable key and keygroup intervals depending on driver used 2018-08-22 11:37:56 -07:00
Adrien Delorme 41f6e0334d refactor all copy pasted sshConfig with into communicator.Config.SSHConfigFunc
* still need to append the auth methods into an array for gracefullness
2018-08-22 17:02:23 +02:00
Conrad Jones d05a601d00 Add support to vmware-vmx builder for linked clones. 2018-06-17 01:38:42 +01:00
DanHam 94d5a7f2e2
Fix copy/paste error referencing Virtualbox 2018-04-21 22:49:36 +01:00
Matthew Hooker 408eba88ad
flatten boot command config and implement for vmware 2018-04-19 14:26:30 -07:00
Matthew Hooker 673245afcf
Replace boot command parser with PEG parser. 2018-04-19 14:26:28 -07:00
Matthew Hooker 366dc3da0a
move multistep imports to helper.
gomvpkg -from "github.com/mitchellh/multistep" -to "github.com/hashicorp/packer/helper/multistep"
2018-01-24 17:09:15 -08:00
Matthew Hooker 07b013945f
more consistent flag name 2017-10-12 16:38:18 -07:00
Matthew Hooker 106408f6be
add new disable_vnc option 2017-10-12 16:34:40 -07:00
Michael Kuzmin 9876a28ea7 vmware: publish vm_name as artifact ID 2017-07-28 11:16:46 +03:00
James Nugent c4439aba82 builder/vmware: Add vmx_remove_ethernet_interfaces
This commit adds a new option, `vmx_remove_ethernet_interfaces`, to both
of the VMWare builders. This is useful when building Vagrant boxes,
since Vagrant now produces output such as:

```
WARNING: The VMX file for this box contains a setting that is
automatically overwritten by Vagrant when started. Vagrant will stop
overwriting this setting in an upcoming release which may pre vent
proper networking setup. Below is the detected VMX setting:

   ethernet0.pcislotnumber = "33"

If networking fails to properly configure, it may require this VMX
setting. It can be manually applied via the Vagrantfile:

   Vagrant.configure(2) do |config|
     config.vm.provider :vmware_fusion do |vmware|
       vmware.vmx["ethernet0.pcislotnumber"] = "33"
     end
   end
```

This can be avoided entirely by removing the ethernet adapters from the
VMX file prior to packaging as a Vagrant box, in which case adapters are
created as expected according to the Vagrantfile specification.
2017-05-24 18:53:25 -05:00
Matthew Hooker 81522dced0
move packer to hashicorp 2017-04-04 13:39:01 -07:00
Rickard von Essen 3c8dabba9e Fixed formatting 2016-10-11 23:43:50 +02:00
Rickard von Essen 5e96709ee9 Merge pull request #2919 from arizvisa/floppy-recurse
Added an option for copying entire subdirectories via floppy_dirs (supplants floppy_files)
2016-10-08 16:51:16 +02:00
Ali Rizvi-Santiago 86c00490e9 Renamed any and all instances of the word "FloppyContents" to "FloppyDirectories".
Ensure that all builders include FloppyDirectories in the StepCreateFloppy options.
Changed the way the unit-tests in common/step_create_floppy_test work to use the static test-fixtures directory instead of creating the paths dynamically.
Removed a duplicate line of documentation from parallels-pvm.html.md that occurred during rebasing.
2016-09-27 23:31:42 -05:00
Orivej Desh 6762965696 Add -on-error command line argument to allow preserving artifacts on builder errors
Resolves #409
2016-09-16 12:15:00 +00:00
Ali Rizvi-Santiago a3f0308e92 Re-implemented the support for the floppy_files keyword in order to remain backwards-compatible with templates using the old syntax.
Moved the support for recursive paths from the floppy_files keyword to the new floppy_contents keyword.
Shifted some of the code around to add better logging of what's actually being copied.
Added a couple of unit-tests for the new floppy_contents implementation.
Ensured that all files that were being added were also being included in state.FilesAdded so that the older unit-tests will work.
2016-09-12 11:56:25 -05:00
Rickard von Essen 3e1aed9a6f Enable to disable vnc password for VMware builder 2016-08-19 13:26:23 +02:00
Ian Duffy 0327f6c935 Allow configurable VNC bind IP for VMware builders
Signed-off-by: Ian Duffy <ian@ianduffy.ie>
2016-05-23 14:07:03 +01:00
Sean Chittenden 9b3f8a4be9
Pause between boot_commands when debugging a VMware build
When debugging a build (or maintaining an existing packer file), teach `packer build -debug` how to step through individual `boot_command`s in order to triage the packer file.

```
==> vmware-iso: Typing the boot command over VNC...
==> vmware-iso: Pausing after run of step 'boot_command[0]: <enter><wait>'. Press enter to continue.
==> vmware-iso: Pausing after run of step 'boot_command[1]: <enter><wait>'. Press enter to continue.
==> vmware-iso: Pausing after run of step 'boot_command[2]: freebsd-vagrant<enter><wait>'. Press enter to continue.
==> vmware-iso: Pausing after run of step 'boot_command[3]: <down><spacebar>'. Press enter to continue. ^C
```
2016-05-17 03:50:00 -04:00
Chris Bednarski 9358e8c355 Merge branch 'hotfix/rearrange_vmx_cleanup' of https://github.com/israelshirk/packer into b-2709 2016-01-21 13:36:02 -08:00
Mark Peek 7f149e595d Refactor http server config into common 2015-11-01 14:45:47 -08:00
Israel Shirk c81a486f34 Rearranges vmware builders to put compaction before VMX finalization to avoid stomping VMX changes 2015-09-18 07:51:46 -06:00
Mitchell Hashimoto 115d583cff helper/communicator: make host more generic 2015-06-13 19:23:33 -04:00
Mitchell Hashimoto b61ed3adfc builder/vmware: convert to helper/comm 2015-06-13 18:52:44 -04:00
Mitchell Hashimoto 71d8c6610a Merge pull request #1968 from bhcleek/master
do not request a pty
2015-06-13 16:23:31 -04:00
Mitchell Hashimoto c3b75f4b86 vmware/vmx: interpolation 2015-05-27 14:21:15 -07:00
Billie H. Cleek 2184892f8a do not request a pty
Change the default behavior from requesting a PTY when executing a
command with the ssh communicator to requesting a PTY only when
configured to do so.

Update the vmware builders to be fully backward compatible with the new
behavior.
2015-02-12 20:18:54 -08:00
Sebastian Röder 555b89567f s/VirtualBox/VMware in comment 2015-01-13 22:43:24 +01:00
John Deatherage e571a133b0 fixed vmware-vmx step order 2014-09-14 04:28:55 -07:00