Commit Graph

859 Commits

Author SHA1 Message Date
Megan Marsh 8d0058dad6 allow user to set tools source path 2020-09-24 09:51:01 -07:00
Sylvia Moss 9737b85bbc
Remove usb_keyboard option (#9945) 2020-09-17 10:38:33 +02:00
Sylvia Moss 7736ae6c67
Add VMware vnc_over_websocket option (#9938) 2020-09-16 11:02:46 +02:00
Megan Marsh f28cabb162
Merge pull request #9940 from hashicorp/fix_9936
skip slot 7 in disk creation so we don't use reserved slot
2020-09-14 13:36:16 -07:00
Megan Marsh b08dd28b85 skip slot 7 in disk creation so we don't use reserved slot 2020-09-14 13:13:59 -07:00
Megan Marsh eab7672519 regenerate code 2020-09-14 12:16:56 -07:00
Megan Marsh e723609ef1 regenerate hcl config 2020-09-14 12:16:56 -07:00
Megan Marsh 6935f47809 add tests for disk defaulting 2020-09-14 12:16:56 -07:00
Megan Marsh eae3fda901 refactor out disk defaulting so it can be used to default the vmx cdrom too 2020-09-14 12:16:56 -07:00
Andreas Botzner 3739970b84
Adds ability to specify interfaces for http_directroy and VM for the Proxmox builder (#9874)
Adds two config options to the Proxmox builder:
```
http_interface
vm_interface
```
Both give the user the ability to specify an interface whos IP will be set as the `.HTTPIP` and VMIP respectively.

This is useful when the VM and or the machine executing Packer has multiple interfaces.
Until now Packer would accept the first non-loopback IP as the `.HTTPIP` and VMIP.

I'm open to suggestions and any kind of feedback. 


* Added ability to define the NIC where the HTTPIP is taken from.
* Added VM interface config option
* fmt and documentation
* Moved HTTPInterface into HTTPCommon
* Build Fix
* Documentation Fix
2020-09-14 12:24:01 +02:00
Sylvia Moss 31f08909b4
Add usb_scan_codes option to use USB scancodes instead of VNC for remote builds (#9895) 2020-09-11 16:46:33 +02:00
Megan Marsh d2dd158fe2 Implement cd_files option. The Addfile code is modified from the floppy_files
tooling. Tested on OSX, `Windows, and Linux. Documented command line dependencies.
Added acceptance tests (behind testacc flag, since there are dependencies).
This option is only implemented for the vmware and hyperv iso builders. It will be
implemented for others in later PRs in order to make review easier.
2020-09-04 12:20:19 -07:00
Lars Lehtonen 03a0beb683
builder/vmware/common: simplify type assertion switch (#9893) 2020-09-04 16:25:19 +02:00
Wilken Rivera f4556fd3f1
Merge pull request #9831 from hashicorp/remedial_remote_export_config_tests
add tests to make sure prepare for export defaults properly
2020-08-31 15:47:05 -04:00
Wilken Rivera 03a374f4b6
Fix linting issues for SA6005 check (#9854)
Before change
```
⇶  golangci-lint run --disable-all --no-config --enable=staticcheck | ack SA6005
builder/profitbricks/step_create_server.go:254:22: SA6005: should use strings.EqualFold(a, b) instead of strings.ToLower(a) == strings.ToLower(b) (staticcheck)
builder/oneandone/config.go:97:7: SA6005: should use strings.EqualFold(a, b) instead of strings.ToLower(a) == strings.ToLower(b) (staticcheck)
builder/vmware/common/driver_parser.go:1199:7: SA6005: should use strings.EqualFold(a, b) instead of strings.ToLower(a) == strings.ToLower(b) (staticcheck)
```

After change
```
⇶  golangci-lint run --disable-all --no-config --enable=staticcheck | ack SA6005

```
2020-08-31 15:44:42 +02:00
Megan Marsh 1c5bc41beb refactor ovftool validation into vmware driver 2020-08-27 10:55:57 -07:00
Megan Marsh bbc3a5b0d1 add tests to make sure prepare for export defaults properly 2020-08-27 10:55:57 -07:00
Megan Marsh a6d5106cd7 Allow "export" to ovf/ova for local vmware builds in addition to esx ones.
Refactor step_export and the driver interface to move the ovftool call
into the vmware driver. This refactor allows us to add meaningful tests
to step_export, which I have also added here.
2020-08-26 09:45:12 -07:00
Megan Marsh e9b526ee2d
Move step_create_disk into common folder, and add to vmx builder (#9815)
Pull additional disk related config options into their own file.
2020-08-26 10:13:11 +02:00
Megan Marsh a2cfaace59 extract output dir configuration and defaulting into the step_output_dir, using pointers to make sure they get set properly back on the main config 2020-08-18 12:50:06 -07:00
Megan Marsh 3b2bedf794 implement a remote_output_directory option, and heavily comment output code 2020-08-18 12:50:00 -07:00
Megan Marsh b0d2201d55
Merge pull request #9782 from hashicorp/fix_9151
fully destroy vm if it was cancelled or errored
2020-08-18 07:22:18 -07:00
Megan Marsh 0a5cd953fc fully destroy vm if it was cancelled or errored 2020-08-17 14:07:58 -07:00
Megan Marsh aa2418cf01
add progress tracker to vmware-esx iso upload. Add colored prefix to … (#9779)
* add progress tracker to vmware-esx iso upload. Add colored prefix to tracker to make it clear which build a tracker belongs to.

* fix mock; fix tests
2020-08-17 14:35:42 -04:00
Megan Marsh 25f2ec48d3
add network_name option to vmware builder to make it match the network option on the vsphere builder, so vmware users needn't update vmx data just for the network name (#9718) 2020-08-06 13:19:55 +02:00
Megan Marsh 395a0c472e improve postprocessor stdout 2020-07-25 08:24:21 -07:00
Megan Marsh b3c3e3ed63
Merge pull request #9589 from hashicorp/fix_9184
post-processor/vsphere: Fix password encoding in vsphere post-processor ovftool call
2020-07-25 08:23:54 -07:00
Adrien Delorme 44616d3bff
refactor initialization out from packer configs + tests (#9627)
The initialization of packer core in JSON also validates that `null` variables were set, except in the case of `packer validate --syntax-only` , but after the refactor to allow to have all commands work with HCL2 and JSON this subtlety was lost.

This refactors the initialisation of the core in order to allow to have `packer validate --syntax-only` not error in case a variable is not set. Since these calls are refactored this works for HCL2 too.

fix #9478
2020-07-24 10:58:03 +02:00
Megan Marsh 74aef3c819 apply same url encoding to other places we call ovftool 2020-07-23 17:03:42 -07:00
Megan Marsh a687d6fe12
ci/tech-debt: Fix vmware acceptance tests (#9636)
* add kex algorithm option to ssh config

* regenerate code

* This commit fixes old vmware acceptance tests that have not been run in some time. It does this in two parts:
1) It modifies the minimal vmware build configuration to use a custom kex algorithm, which enables the ssh connection to succeed.
2) It modifies logic in reading and defaulting hardware config values, which was crashing.
3) It adds a new acceptance test with a preseed file to test loading from an http directory.
2020-07-23 09:40:57 +02:00
Adrien Delorme 1edd848877 esx5driver.VerifyChecksum: try checksum remote file instead of local file
fix #9456
2020-07-15 18:21:08 +02:00
Roger Hu 28f8241a05 update generated files 2020-07-10 16:58:06 -07:00
Moss 8ea64c5b35 undocument ssh_keypair_name and ssh_agent_auth 2020-07-02 14:55:58 +02:00
Moss 41edd09d3c undocument temporary_key_pair_name and ssh_private_key_file 2020-07-01 16:33:18 +02:00
Megan Marsh 4f77bb0c4a add new ssh_ciphers option 2020-06-17 16:48:23 -07:00
Megan Marsh 4178625afb re-add winrm_no_proxy option. Winrm code needs to be modified in order to read no_proxy env var when client is created rather than when net/http library is instantiated. 2020-06-16 10:27:30 -07:00
Ali Rizvi-Santiago 3da5a64a8d Fixed a race in the ReadNetworkingConfig implementation from the parsers belonging to the vmware builders that existed between reading the version and consuming tokens from the rest of the file. 2020-06-09 19:37:38 -05:00
Megan Marsh 5d67183c4c fix test 2020-06-05 14:05:59 -07:00
Megan Marsh 093cfcfd9f
Merge pull request #9322 from arizvisa/GH-8528
Fix the VMware builders when the guest platform's dhcpcd switches the ip address in-between a build
2020-06-05 10:58:00 -07:00
Ali Rizvi-Santiago 8985ba077c Re-added the (mistakenly removed) host override to the CommHost for the vmware builders. 2020-06-05 12:39:20 -05:00
Megan Marsh 4cd3429914 add ssh override test 2020-06-05 10:15:11 -07:00
Ali Rizvi-Santiago 9c5a65263f Added @SwampDragons' suggestion to the `CommHost()` implementation for the vmware builders which uses the communicator config's `Config.Port()` function to determine the communication port-number independent of the configured protocol. 2020-06-04 19:04:12 -05:00
Megan Marsh baed65156c
Merge pull request #9319 from arizvisa/GH-8528.refactor
This refactors the dhcpd lease parser in the vmware builders and adds unit tests for everything.
2020-06-04 12:18:49 -07:00
Ali Rizvi-Santiago 898321bcfe Added suggestions from @SwampDragons to the parsers from the vmware builders, included unit-tests and sample file for fusion's networking file, and fixed a few situations where the channel wasn't being closed. 2020-06-04 05:07:18 -05:00
Joshua Foster d35f342319 add the ability to configure the http bind address. defaults to 0.0.0.0. 2020-06-03 16:40:18 -07:00
Megan Marsh df37918467
Merge pull request #9303 from arizvisa/GH-8528.unit-tests
Unit tests for the driver_parser.go functionality of the vmware builder
2020-06-02 15:28:13 -07:00
Ali Rizvi-Santiago e5b6d8c37c Didn't know that WinRM uses a different variable for the port number when trying to determine the communication host in `CommHost`...now it's fixed. 2020-05-30 02:17:21 -05:00
Ali Rizvi-Santiago 229b5d17ff Re-worked the vmware builder drivers so that they're able to check multiple ip addresses when trying to connect via the CommHost. 2020-05-28 15:36:45 -05:00
Ali Rizvi-Santiago 0609909f1a Fixed some lint issues. 2020-05-28 13:53:49 -05:00
Ali Rizvi-Santiago ad7194c920 Rewrote the GuestIP implementation in the vmware builder to use the new dhcpd lease parsers instead of the old regexp-based logic. 2020-05-28 13:22:58 -05:00