Wilken Rivera
d82b9d2072
builder/qemu: Add ok check for state values ( #10249 )
...
This changes fixes two crashes in `step_run` that expects certain
information to be in state from prior steps. This change requires
testing to ensure the bugs have been fixed.
I believe there may be more state values that need to be checked as they
may not be put into state if a build configuration has attributes that
would skip or otherwise not put data into the statebag.
2020-11-30 10:40:03 -05:00
Megan Marsh
f8f1ebf0c7
move version and useragent definitions into sdk
2020-11-18 11:42:02 -08:00
Megan Marsh
9e47696dff
move helper/config to bundle with the other template definitions
2020-11-18 10:34:59 -08:00
Megan Marsh
3f6deb8828
move multistep into the plugin sdk
2020-11-17 16:31:03 -08:00
Megan Marsh
7d658149ea
update tests and website and generated partials to reflect new package format
2020-11-17 10:36:01 -08:00
Megan Marsh
f52a2ad0fa
move retry function that is only used by osc builder into that builder's common dir instead of the global common dir. Fix bug in quemu where the wrong retry value is checked against.
2020-11-13 15:24:58 -08:00
Megan Marsh
c4d0c5505a
fix tests
...
regenerate code
regenerate code, revendor
fix website
2020-11-13 15:00:12 -08:00
Megan Marsh
e04eaa89e6
move steps and step configs from packer/common to packer/common/commonsteps
2020-11-13 11:15:04 -08:00
Megan Marsh
6402362018
create packer-plugin-sdk directory and begin moving the relevant folders into it.
2020-11-13 10:47:36 -08:00
Megan Marsh
3db40194af
version files
2020-11-10 14:48:06 -08:00
Megan Marsh
8ecd16db81
regenerate code
2020-11-10 08:16:59 -08:00
Megan Marsh
45b5f0c2ee
move custom http client creation with env proxy args into same package as other network related helpers
2020-11-04 14:51:14 -08:00
Megan Marsh
69312458c4
Merge pull request #10111 from hashicorp/azr_selectable_temp_keygen_type_gcp
...
GCP: Allow to select algo when generating temporary SSH keypair
2020-10-28 11:25:50 -07:00
Megan Marsh
fb3d357e84
fix step_shutdown when a null communicator is used ( #10178 )
2020-10-28 11:14:03 +01:00
Adrien Delorme
f5e037e8b4
Merge remote-tracking branch 'origin/master' into azr_selectable_temp_keygen_type_gcp
2020-10-26 15:47:29 +01:00
Megan Marsh
00037d8e69
Merge pull request #10145 from hashicorp/fix_10135
...
commhostport isn't present if communicator is null; protect casting i…
2020-10-22 14:24:23 -07:00
Megan Marsh
70cb4097e1
review comments, add plugin type for a few missing builders
2020-10-21 16:17:32 -07:00
Megan Marsh
f1f834b8fe
commhostport isn't present if communicator is null; protect casting in a check
2020-10-21 14:30:23 -07:00
Adrien Delorme
522d122858
regen all code
2020-10-21 12:04:10 +02:00
Adrien Delorme
54032d6c11
gen code and docs
2020-10-15 16:51:23 +02:00
Megan Marsh
b05fd9303e
document that users must re-apply packer defualts for drive and device arguments
2020-10-09 10:39:27 -07:00
Megan Marsh
3e35630d8d
remove slashes to prevent windows test fails
2020-10-08 11:36:36 -07:00
Megan Marsh
8e632866b1
typo
2020-10-07 15:22:08 -07:00
Megan Marsh
b54b778572
major refactor of the step_run. Splits step into two major parts:
...
- generating defaults
- overriding defaults with user args
The default generation has been shuffled around some, in order to
make sure that any changes to a specific arg happen in one place
to make it easier to reason about those args. Related args have
been moved close to one another.
The deviceArgs and driveArgs were overly complex after several
layers of copy/paste modifications. Careful pruning reduced the
layers of logic and repeated code, to help make it easier to reason
about.
2020-10-07 15:09:45 -07:00
Lik
bdb1c47532
Pass QemuImgArgs to stepConvertDisk ( #10001 )
2020-09-28 11:43:20 +02:00
Megan Marsh
b7b43a41f3
review cleanup
2020-09-18 10:56:28 -07: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
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
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
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
e723609ef1
regenerate hcl config
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
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
Megan Marsh
0a02bd5b2a
skip compaction when backing file is used, to prevent conversion that would make backing file pointless
2020-09-09 15:26:10 -07:00
Wilken Rivera
0719f906d4
Replace if/else with simple if ( #9913 )
2020-09-09 10:24:17 +02:00
Richard Turc
b4ff0ea4bc
[builder/qemu] Skip resize step when skip_resize_disk is enable #9860 ( #9896 )
...
* [builder/qemu] Skip resize step when skip_resize_disk is enable #9860
* Update builder/qemu/builder_test.go
Improve the code quality
Co-authored-by: Wilken Rivera <dev@wilkenrivera.com>
* Update files for unit tests
Co-authored-by: Wilken Rivera <dev@wilkenrivera.com>
2020-09-08 14:32:08 -04:00
Ronald van Zantvoort
7335695c84
qemu vnc: hardcoded lowerbound leaves negative ports
...
```hcl2
vnc_port_min = 5000
vnc_port_max = 5500
```
Build returns faulty:
```
qemu.one: view the screen of the VM, connect via VNC to vnc://127.0.0.1:5138
(...)
2020/09/06 19:09:52 packer-builder-qemu plugin: Qemu stderr: qemu-system-x86_64: -vnc 127.0.0.1:-762,password: can't convert to a number: -762
```
2020-09-06 21:18:12 +02:00
sylviamoss
fc2e94554a
add qemu hcl examples
2020-07-31 17:32:08 +02: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
Roger Hu
28f8241a05
update generated files
2020-07-10 16:58:06 -07:00
Megan Marsh
673858a63c
Merge pull request #9513 from hashicorp/undocument_ssh_temp_key
...
Undocument ssh options not used by all builders
2020-07-07 14:26:21 -07:00
Lyle Franklin
a4d1afb83a
Add 'cdrom_interface' option to QEMU builder ( #9483 )
...
- This option allows the user to select the interface type for the CDROM
drive, e.g. `virtio-scsi`, rather than the default `virtio`
- Background: Installation of Ubuntu 20.04 on ARM64 fails as it can't mount the
installation CDROM. While the default `virtio` CDROM fails, setting
`cdrom_interface: virtio-scsi` with this PR succeeds. Some links:
- ISO link: http://cdimage.ubuntu.com/ubuntu-legacy-server/releases/20.04/release/ubuntu-20.04-legacy-server-arm64.iso
- https://bugs.launchpad.net/ubuntu/+source/debian-installer/+bug/1605407
- https://superuser.com/a/1376628/230508
2020-07-07 16:22:30 +02: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
cd5cf77998
only set up localhost port forwarding if skipnatmapping is false.
2020-06-24 10:40:42 -07:00
Megan Marsh
4f77bb0c4a
add new ssh_ciphers option
2020-06-17 16:48:23 -07:00