Commit Graph

507 Commits

Author SHA1 Message Date
Chris Bednarski da083506f1 Reduce key delay to 10ms to boot times are a lot faster 2017-01-14 16:52:24 -08:00
DanHam c7e8d671a9
Add option to skip export of installed VM for VMware iso builder 2017-01-10 11:44:11 +00:00
Mikhail Zholobov 57d07f227a
Add "iso_target_extension" option for all local *-iso builders
This option allows to set the extension of the ISO file after download.
Defaults to "iso". It makes sense for building Mac OS X guests, where the
bootable image is actually a DMG, not an ISO.
In particular, it is important for "parallels-iso" builder to set the right extension.
2016-12-17 12:50:30 +02:00
febc.yamamoto 6088c1887c Fix keycodes for ctrl,shift and alt key when sending over VNC 2016-11-04 19:26:14 +09:00
Matthew Hooker d920b3fbf4 run gofmt 2016-11-01 14:08:04 -07:00
Matthew Hooker d6bed79429 wait for shutdown command to end so we get stderr/out 2016-10-22 10:33:27 -07:00
Matthew Hooker e9a5d05a2f builder/vmware: Ignore shutdown errors
Resolves issue where `shutdown_command` would error because the remote
side disconnected, which we should have expected and ignored.
2016-10-21 22:41:45 -07:00
Matthew Hooker f9f47c5bbb fix shell disconnect error when shutting down vmware 2016-10-21 22:26:34 -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
Matthew Hooker badadec140 Merge pull request #3758 from elconas/fix_vmware_builder
Fix License check to work with licensed VMware Workstation
2016-10-07 17:51:32 -07:00
Matthew Hooker a8e57d83d2 gofmt project.
noticed many unrelated changes being added to patches because of gofmt.

ran `find . -not -path "./vendor/*" -name "*.go" -exec gofmt -w {} \;`
2016-09-29 14:13:06 -07: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
Rickard von Essen 06e3539ffa Merge pull request #3767 from taliesins/ExtendScanCodes
Add support for ctrl, shift and alt keys and using them as key modifier.
2016-09-20 21:36:46 +02: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 5cbc36103e Merge pull request #3756 from ricardclau/floppy_check
Test floppy disks actually exist
2016-09-12 08:05:16 +02:00
Marc Siegfriedt c1e129848c 3833 - fix for port in MR3347 2016-08-26 20:58:04 +00:00
Rickard von Essen 6cd7ad82bb Fixed dupliceted test 2016-08-19 14:34:24 +02:00
Rickard von Essen 3e1aed9a6f Enable to disable vnc password for VMware builder 2016-08-19 13:26:23 +02:00
Israel Shirk f961ce701b Adds password protection for VNC on VMWare 2016-08-19 13:26:16 +02:00
Jeremiah Roth 9489c83f0f If the VM has more than one NIC, loop through until we find one that works (#3347) 2016-08-19 13:23:43 +02:00
mahcsig 832d45023b Re-introduce case sensitive vmx key functionality (#2707)
Add case sensitive vmx key functionality
2016-08-19 13:23:07 +02:00
Dan Tran 4ac6e2a08c Dont check for poweron command error to force retry at state check (#3195) 2016-08-19 13:21:50 +02:00
Charlie Vieth 6ce847e720 Do not add remotedisplay.vnc.ip to vmx data on ESXi
* The remotedisplay.vnc.ip vmx data key breaks ESXi, this commit prevents it
  from being automatically added during VNC configuration when using the ESX5
  driver.

* It can still be configured via the vmx_data section of the builder
  template

Signed-off-by: Sunjay Bhatia <sbhatia@pivotal.io>
2016-08-19 13:19:04 +02:00
Charlie Vieth d14d62074e Add winrm functionality to vmware-iso builder (#3738)
* Use winrm_host, if provided, this allows packer to work in ESXi
environments without DHCP.

Signed-off-by: Charlie Vieth <cviethjr@pivotal.io>
2016-08-19 13:02:55 +02:00
Taliesin Sisson 1155c6d4d6 Use the correct fmt verb for log output 2016-07-31 19:46:38 +01:00
Taliesin Sisson a87ad05866 Add support for ctrl, shift and alt keys.
Add support for using ctrl, shift and alt as key modifiers. So you can now achieve ctrl+c by using "<leftCtrlOn>c<leftCtrlOff>".

Updated documentation for new key stroke tokens.
2016-07-31 19:05:10 +01:00
Robert Heinzmann 3a700414ca Fix License check to work with licensed vmware player 2016-07-28 10:42:58 +02:00
Ricard Clau acededfc6e tests actually test the floppies 2016-07-27 21:59:21 +01: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
Chris Bednarski 45e6a238ff Merge pull request #3050 from andqui/master
vmware-iso-builder: Fix for non consequential if statement (failing ESXi iso builds).
2016-05-19 17:43:49 -07: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
Christopher Boumenot bbf286dcbe Fix go fmt issues. (#3463) 2016-04-22 10:44:54 -07:00
Chris Bednarski d7cfd5d01c Remove explicit boolean comparison 2016-03-17 14:14:03 -07:00
kopernikus 84bd2ff754 option to keep the VM registered with esxi 2016-03-16 23:17:35 +01:00
James Bishopp bd8fb014c4 Removed ssh_key_path
- removed backwards compatibility code
- ensured key usage came from SSHPrivateKey configuration
- changed tests to use private_key
2016-02-12 17:24:42 -08:00
Chris Bednarski 24dc798cfb Revert "Prevalidate Hardware Specs on Linux"
This reverts commit eda84cb2d3.
2016-02-02 12:41:43 -08:00
Chris Bednarski 6504f4f777 Revert "Only validate vmware resources on local hosts"
This reverts commit f01578c91e.
2016-02-02 12:41:42 -08:00
Chris Bednarski 7ad2104c7f Revert "Correctly call prepare function in test"
This reverts commit 6e8bfd3ce9.
2016-02-02 12:41:37 -08:00
Chris Bednarski ffb85f6ea5 Merge pull request #3096 from grubernaut/f-resource-limits
Prevalidate Hardware Specs on Linux
2016-01-25 21:06:14 -08:00
Jake Champlin 6e8bfd3ce9 Correctly call prepare function in test 2016-01-25 12:54:15 -05:00
Jake Champlin f01578c91e Only validate vmware resources on local hosts
Disable resource validation when `remote_type` is specified
2016-01-25 12:01:56 -05:00
Jake Champlin eda84cb2d3 Prevalidate Hardware Specs on Linux
Prevalidates hardware resources on Linux platforms for Virtualbox and
VMware builders. This is currently only available on Linux, as enabling
for both Darwin and Windows platforms, relies on cgo bindings that would
prevent effective cross-compilation.

Packer will now fail to build and validate templates if the template is
requesting that the VM to be created would allocate more system
resources than the host system has available.

This _however_ doesn't catch parallel builds that overflow the hosts
resources, will probably still need a better error message for VM's
failing to boot in that case.

Example Outputs:

```
$ $GOPATH/bin/packer build -debug ./vmware-iso.json
Debug mode enabled. Builds will not be parallelized.
vmware-iso output will be in this color.

2 error(s) occurred:

* Unavailable Resources: RAM - Requested - 204800000MB - Available 21721MB
* Unavailable Resources: Disk - Requested - 4000000000MB - Available 76701MB
```

```
$ $GOPATH/bin/packer build -debug ./vbox-iso.json
Debug mode enabled. Builds will not be parallelized.
virtualbox-iso output will be in this color.

2 error(s) occurred:

* Unavailable Resources: RAM - Requested - 10240000MB - Available 21721MB
* Unavailable Resources: Disk - Requested - 1000000000MB - Available 76701MB
```
2016-01-21 18:19:11 -05: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
Anders Quist 077f9621f2 Merge branch 'master' of https://github.com/mitchellh/packer 2016-01-15 08:11:35 +01:00
Chris Bednarski ab721b7cb1 Merge pull request #2898 from markpeek/http-refactor
Refactor http server config into common
2016-01-14 17:10:17 -08:00
Chris Bednarski e6f1ea9ab2 Merge pull request #2911 from jtslear/endless-loop
vmware-iso-builder: Corrects logic checking destroy
2016-01-14 15:00:34 -08:00
Anders Quist 23246c01cf Fix for non consequent if statement (failing ESXi iso builds). 2016-01-10 18:34:21 +01:00
michael 499bd5a362 Add support for SSH Key Authentication with ESX builder 2015-11-03 19:08:35 -08:00
John T Skarbek cf4a19a304 vmware-iso-builder: Corrects logic checking destroy
* I suspect the logic written for checking if the vm has been destroyed is incorrect.  The test will come back from the esx server indicating that the vm is gone as it should, but the logic I believe is reversed so we never hit the break in the if statement
* Feedback is MORE than welcome
2015-11-03 14:49:53 -05:00
Mark Peek 7f149e595d Refactor http server config into common 2015-11-01 14:45:47 -08:00
Yuya Kusakabe 07079a5905 Fix #2892 2015-10-31 19:32:40 +09:00
Mark Peek 581ab9f4f5 Merge pull request #2849 from markpeek/iso-cleanup
Refactor builder ISO options
2015-10-26 21:43:59 -07:00
Mark Peek 0d2fa223f2 builder/vmware-esxi: hide password in ovftool command 2015-10-23 16:51:03 -07:00
Mark Peek 9d0c443ca2 builder/vmware-esxi: Add format validation and step_export tests 2015-10-23 16:50:14 -07:00
Yuya Kusakabe 699c673536 builder/vmware-esxi: Add step_export
If `format` option is configured, packer exports the VM with ovftool.

website: Document about OVF Tool and `format` option.

post-processor/vsphere: Enable to use `mitchellh.vmware-esx` artifact type and OVF and OVA formats, fixes #1457.
2015-10-23 09:00:53 +09:00
Mark Peek cdcffecc2d Refactor builder ISO options
The ISO builders (parallels, qemu, virtualbox, and vmware) had too
much common code which needed to be maintained separately. This change
moves that code to a common ISO configuration.
2015-10-20 16:27:47 -07:00
Brian Dwyer a563944b58 Fix #2695: Prevent duplicate ISO download for multi-builder builds
Add extension to VMware ISO builder to bring in sync with
Virtualbox ISO builder
2015-10-20 12:54:04 -07:00
Mark Peek e9657e6a9f Merge pull request #2642 from oliviertremblay/master
Make TargetPath customizable
2015-10-20 12:11:13 -07:00
Mark Peek e5a713ff01 Alternative fix for #2641: make random script name actually random 2015-10-11 13:31:09 -07: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
Olivier Tremblay f301a6454d Added documentation, renamed config param to iso_target_path 2015-08-20 07:37:24 -04:00
Olivier Tremblay 661552dfd5 Merge branch 'master' into custom-targetpath 2015-08-20 07:26:22 -04:00
Chris Bednarski 313fcaf0ff Revert backwards-compatibility break in VMX option casing
PR #2309 introduced case-sensitive options in VMX files. This is to support a case-sensitive option called `virtualSSD`. The change made all options case-sensitive, which causes problems with external VMX options provided in user templates. To prevent breakage, this change is being reverted.

- Fixes #2574
- Reverts #2542
- Reverts #2309
2015-08-10 14:52:34 -07:00
Chris Bednarski 263641c537 Fix case for ethernet.generatedAddress property lookup in VMX 2015-08-01 15:09:59 -07:00
Chris Bednarski f8cfd0a1cb Merge pull request #2309 from marc-ta/casesensitivevmxkeys
Updated how vmx entries are handled
2015-07-30 14:31:54 -07:00
Bob Kuo 585638d063 Do not require exclusive VNC access while buildling
An additional client can be connected during build time for inspection.
We can manually connect and set our VNC clients to ignore all input or
we can connect with vnc2flv to record the build session for later
verification.
2015-07-29 10:00:09 -05:00
Olivier Tremblay 223e35fc65 Makes StepDownload's TargetPath customizable.
I exposed TargetPath as a config file option "target_path". I don't like
the name, but it follows the naming convention. The purpose of TargetPath
stands unmodified, and it enables a fair amount of customization.
2015-07-28 07:45:02 -04:00
Marc Siegfriedt e9ef2b987e fixed the test as well 2015-07-01 15:11:40 -07:00
Marc Siegfriedt df1be999dc Fixed case sensitive issue with VMX entries not being overwritten 2015-07-01 15:11:40 -07:00
Marc Siegfriedt 1d7d490c01 updated how vmx entries are handled 2015-07-01 15:11:40 -07:00
Mitchell Hashimoto 4a60e469e9 update CHANGELOG 2015-06-29 09:33:20 -07:00
Israel Shirk 88fac0b49c Have nonesum run stat rather than nonesum because nonesum sums none. k. 2015-06-25 19:03:00 -06:00
Mitchell Hashimoto 9bc0dfa389 builder/vmware: disable VNC before packaging 2015-06-22 14:50:25 -07:00
Mitchell Hashimoto 84189f7a28 builder/*: properly save interpolation context 2015-06-22 09:22:42 -07:00
Mitchell Hashimoto b7dab2689a fmt 2015-06-18 05:23:04 +02:00
Alexander Golovko 15f40a3d00 fix disabling vmware tools for ESX 2015-06-15 15:08:56 -07:00
Marc Siegfriedt 667c53942b use template for additional disks 2015-06-15 12:40:34 -07:00
Mitchell Hashimoto 70af21615e Merge pull request #2233 from mitchellh/b-output-dir
builder/virtualbox,vmware: validate output dir in step
2015-06-15 09:40:36 -07: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 d851898131 builder/vmware: mirror virtualbox output dir changes 2015-06-13 17:00:14 -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 9da9ce6046 vmware/iso: disk_additional_size 2015-06-10 12:41:17 -07:00
Mitchell Hashimoto 3ba9d70b22 Merge pull request #1382 from sneal/AdditionalDisksForVMwareISO
Additional disks for vmware iso
2015-06-10 12:39:50 -07:00
Mitchell Hashimoto 1d653efe90 Merge pull request #2174 from brandonheller/master
vmware/iso: support hierarchical output directories
2015-06-10 11:33:59 -07:00
Mitchell Hashimoto fafdfc962f vmware/common: detect Vmware 'unknown error' and show better message 2015-06-10 11:31:36 -07:00
Mitchell Hashimoto 23a48d6619 go fmt 2015-06-08 21:34:20 -07:00
Mitchell Hashimoto fa2bcb8bc5 update CHANGELOG 2015-06-08 21:33:53 -07:00
Mitchell Hashimoto 2373640881 Merge pull request #1663 from beezly/fix-vnc-missed-keys
Add 1/10th second delay between key events to VNC
2015-06-08 21:31:55 -07:00
Mitchell Hashimoto 9f0b8b71db virtualbox,vmware: http server should listen on IPv4 2015-06-08 20:47:47 -07:00
Shawn Neal e9a491ae45 New interpolation for additional vmware disks 2015-06-04 11:44:07 -07:00
Eric Richardson 5f183026b3 Fix vmware compact_disk step when there are no additional disks 2015-06-04 08:22:50 -07:00
Eric Richardson 7dfb837ddb Formatting cleanups from `go fmt` 2015-06-04 08:22:50 -07:00
Eric Richardson fab9ca9cdb Initial work to implement additional disk support in the vmware-iso builder
* Matches the syntax from mitchellh/packer#703
* Creates disk(s), adds them to the vmx template, and runs compact at the end
2015-06-04 08:22:50 -07:00
Brandon Heller a7eeb6a6a7 vmware/iso: support hierarchical output directories
When providing a hierarchical output_directory value like
'transient/jenkins-slave', the VM would fail to build in the CreateDisk
step.  The properly created output directory would not match the location
provided to CreateDisk, since datastorePath() did not properly split such
paths.  Now this case works; tested hierarchical and singular
output_directory values.
2015-06-04 02:49:58 -07:00
Mitchell Hashimoto 3f636ef7f3 vmware/vmx: clarify messaging for source path required error 2015-05-29 17:04:11 -07:00
Mitchell Hashimoto 7e74a38ff8 Merge pull request #2000 from cyberhouse/ifconfig-regex
Make the Vmware build extract the host IP properly from ifconfig stdout
2015-05-28 09:39:32 -07:00
Mitchell Hashimoto 7bd618b56b Merge pull request #1989 from marcomorain/upper-case-mac-address
Fix for VMWare on OSX – MAC address can be upper or lower case
2015-05-28 09:38:23 -07:00