Commit Graph

16093 Commits

Author SHA1 Message Date
Wilken Rivera 062b9a0d23 update changelog 2020-09-19 07:08:51 -04:00
Wilken Rivera 7e8cd052eb update changelog 2020-09-18 15:43:28 -04:00
Marco Molteni 4d7e42220b
scaleway: add pre validate step (check image and snapshot names) (#9840)
* Implement Stringer inteface for multistep.StepAction

* scaleway: add pre validate step (check image and snapshot names)

Before, it was possible to create multiple images with the same name,
leading to a confusing and wasteful situation (same for snapshots).

Now, we perform the same kind of checks done by the AWS EC2 builder,
and refuse to proceed if there is an existing image with the same name
(same for snapshots).

As usual, invoking `packer build -force` will bypass the checks.

Closes #9839.
2020-09-18 15:37:48 -04:00
Megan Marsh 77817f80a2
Merge pull request #9956 from hashicorp/do_6734
builder/qemu: Add qemu_img_args option to set special cli flags for our calls to qemu-img
2020-09-18 11:24:34 -07:00
Megan Marsh b7b43a41f3 review cleanup 2020-09-18 10:56:28 -07:00
Megan Marsh 7eb5c3ecf9
Merge pull request #9962 from hashicorp/azr-test-hcl2-json
[HCL2] add an hcl2-json test
2020-09-18 10:42:42 -07:00
Sylvia Moss d347bbec4c
Retry fleet creating only on invalid IAM instance profile (#9946) 2020-09-18 17:05:36 +02:00
Adrien Delorme 3d7ab9ea43 add an hcl2-json test 2020-09-18 16:38:04 +02:00
Anthony Dong eca9b2f30d
aws ebs_surrogate: fix unhonored kms_key_id (#9959) 2020-09-18 12:39:07 +02:00
Sylvia Moss ce2047f30b
vSphere StepAddCDRom tests (#9955) 2020-09-18 09:57:01 +02:00
Megan Marsh 1d218d9e65 add QemuImgArgs option to set specialized flags in qemu-img
convert, resize, and create commands. Add tests. Refactor steps to
not require config pulled from statebag.
2020-09-17 15:15:04 -07:00
Megan Marsh 57413132b0
Merge pull request #9949 from hashicorp/do_6963
Skip qemu-img convert on OSX
2020-09-17 11:31:12 -07:00
Megan Marsh 1052733fca Skip qemu-img convert if format of output file matches format of input file.
This works around an osx bug in qemu-img convert in osx.
2020-09-17 11:21:04 -07:00
Megan Marsh 32b22ab5d7
Merge pull request #9944 from hashicorp/qemu_cleanup_and_tests
Qemu cleanup and tests
2020-09-17 11:19:00 -07:00
Megan Marsh 83ee4e7d13 miscellaneous qemu cleanup. Fix generator strings; generate code
fix diskimage logic
linting
fix tests
2020-09-17 09:57:45 -07:00
Megan Marsh 3577c4a283 refactor multistep array construction in qemu builder to push majority of conditionals into their steps rather than the multistep constructor code. 2020-09-17 09:57:45 -07:00
Megan Marsh 9ac76be190 clean up step_run 2020-09-17 09:57:45 -07:00
Megan Marsh 5b714497e6 qemu: split config and config tests into their own files to match best practices from other builders 2020-09-17 09:57:45 -07:00
Megan Marsh 6c0c603fbf stub out test 2020-09-17 09:57:45 -07:00
Sylvia Moss 9737b85bbc
Remove usb_keyboard option (#9945) 2020-09-17 10:38:33 +02:00
Wilken Rivera b4be598148
Fix static check issues SA1019 for googlecompute plugins (#9950)
This change replaces the deprecated constructors `New` with
`NewService`.

Static check before the change
```
⇶  golangci-lint run --disable-all --no-config --enable=staticcheck | grep SA1019 | grep google
- post-processor/googlecompute-import/post-processor.go:183:18: SA1019:
storage.New is deprecated: please use NewService instead. To provide a
custom HTTP client, use option.WithHTTPClient. If you are using
google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey
with NewService instead.  (staticcheck)
- post-processor/googlecompute-import/post-processor.go:219:18: SA1019:
compute.New is deprecated: please use NewService instead. To provide a
custom HTTP client, use option.WithHTTPClient. If you are using
google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey
with NewService instead.  (staticcheck)
- post-processor/googlecompute-import/post-processor.go:273:18: SA1019:
storage.New is deprecated: please use NewService instead. To provide a
custom HTTP client, use option.WithHTTPClient. If you are using
google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey
with NewService instead.  (staticcheck)
- builder/googlecompute/driver_gce.go:127:18: SA1019: compute.New is
deprecated: please use NewService instead. To provide a custom HTTP
client, use option.WithHTTPClient. If you are using
google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey
with NewService instead.  (staticcheck)
- builder/googlecompute/driver_gce.go:132:25: SA1019: oslogin.New is
deprecated: please use NewService instead. To provide a custom HTTP
client, use option.WithHTTPClient. If you are using
google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey
with NewService instead.  (staticcheck)
```

Static check after change
```
[go-1.15.2] [1] wilken@automaton in ~/Development/packer/
⇶  golangci-lint run --disable-all --no-config --enable=staticcheck | grep SA1019 | grep google

```
2020-09-17 10:14:41 +02:00
Sylvia Moss 7736ae6c67
Add VMware vnc_over_websocket option (#9938) 2020-09-16 11:02:46 +02:00
Sylvia Moss bdd736b800
Interpolate vagrantfile_template on Vagrant post-processor (#9923) 2020-09-16 10:08:44 +02:00
Megan Marsh aeb70e6726
add http_directory docs to builders where it wasnt documented (#9943)
* add http_directory docs to builders where it wasnt documented

* Fix front matter for Proxmox builder

Co-authored-by: Wilken Rivera <dev@wilkenrivera.com>
2020-09-15 15:50:33 -04:00
Megan Marsh c8d99dbb68 update changelog 2020-09-15 12:00:04 -07:00
Megan Marsh bc69db2433
Merge pull request #9941 from hashicorp/cd_files_vsphere
add cd_files to vsphere builder
2020-09-15 11:25:01 -07:00
Megan Marsh ef01bb5ba6 generated code 2020-09-14 15:35:38 -07:00
Megan Marsh e70e8c8651 add cd_files 2020-09-14 14:59:51 -07: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 e00f6afff8
Merge pull request #9918 from hashicorp/fix_7408
skip compaction when backing file is used, to prevent conversion that…
2020-09-14 13:09:13 -07:00
Megan Marsh 6d2df7fb55
Merge pull request #9932 from hashicorp/cd_files_on_virtualbox
Implement cd_files for virtualbox builders.
2020-09-14 13:08:23 -07:00
Megan Marsh 4f1892f6b9
Merge pull request #9928 from hashicorp/cd_files_impl_remaining_builders
implement cd_files option for qemu, hyperv-vmcx, and vmware-vmx builders
2020-09-14 13:07:53 -07:00
Megan Marsh 70e4cbd366 vmw docs 2020-09-14 12:43:57 -07:00
Megan Marsh 96e17b84bf fix lost command part 2020-09-14 12:42:11 -07:00
Megan Marsh f5ba9c7b2f docs 2020-09-14 12:19:19 -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
Megan Marsh 9140985ab0 implement cd_files for qemu builder 2020-09-14 12:16:56 -07:00
Megan Marsh f774983d36 implement on hyperv 2020-09-14 12:16:56 -07:00
Megan Marsh cb019e39cd docs 2020-09-14 11:03:07 -07:00
Megan Marsh 698bef434f track whether we've detached disks so we don't duplicate work 2020-09-14 11:00:35 -07:00
Megan Marsh a92491d17b capitalization 2020-09-14 10:40:07 -07:00
Andreas Botzner c032d463d3
Bootcommand Fix For Proxmox Builder (#9885) 2020-09-14 17:17:38 +02:00
Sylvia Moss caf65781d7
Add vsphere-clone mac_address option (#9930)
* add vsphere-clone mac_address option

* check on prepare if network is set together with mac_address
2020-09-14 13:18:39 +02: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
GennadySpb ad4ed3c986
Update CHANGELOG.md (#9935) 2020-09-14 12:14:19 +02:00
Megan Marsh b73825bb72 Implement cd_files for virtualbox builders.
Since the work to mount isos was duplicated already across the
step_mount_iso and step_mount_guest_additions, this required a
refactor to prevent further code duplication and make the
ports and devices easier to follow
2020-09-11 16:23:29 -07:00