Commit Graph

10215 Commits

Author SHA1 Message Date
DanHam c6b9d9ce90
Add checks/error reporting to compaction process
* Report compaction results
* Failure to find any disks under the supplied path is treated as a
  'soft' error and a warning message will be printed in place of the
  compaction result. Any other failure will cause the build to fail.
2018-07-20 02:12:42 +01:00
DanHam 534fc4a473
Ensure the export directory structure matches that of previous versions
Commit 3fc2defb6 altered the directory structure associated with an
exported VM. The changes mean that the export process now stores the
exported machine files and folders under a folder with name 'vm_name' in
the output directory.
This commit restores the previous behaviour whereby the exported machine
files and folders were stored directly in the output directory. This
allows us to keep the efficiency improvements introduced with 3fc2defb6
while maintaining backward compatibility.

By default the Export-VM command creates three folders in the specified
export directory - 'Virtual Hard Disks', 'Virtual Machines' and
'Snapshots'. When a machine with no associated snapshots is exported the
'Snapshots' directory is empty.
Prior to 3fc2defb6 the Snapshots folder was not copied/incorporated into
the output directory at all. This was a bug.
This commit preserves the legacy behaviour by not including an empty
Snapshots directory in the export. However, if there *are* Snapshots
associated with the VM, they are now moved into the output directory
along with the usual directories containing disks and VM metadata. This
prevents warnings/errors on import due to missing snapshots.
2018-07-20 02:09:57 +01:00
DanHam dc46848f89
Remove now redundant function to copy exported VM files 2018-07-20 02:09:57 +01:00
DanHam 3fc2defb6d
Refactor the export step for Hyper-V ISO and VMCX builders
* Fixes a bug that caused the build to error if users did not
  explicitly set `skip_compaction:true` when setting `skip_export:
  true`. See #6392.
* Improves the efficiency of the compaction and export process by
  reordering the compaction and export steps.
* Further improves the efficiency of the compacting step through
  compacting the vmd* file directly rather than creating and then
  operating on a copy.
* The changes mean the export process now stores the exported machine
  files and folders under a folder with name 'vm_name' in the output
  directory. Previously the exported machine files and folders were
  stored directly in the output directory.
2018-07-20 02:09:54 +01:00
Megan Marsh a5a6b1ab58
Merge pull request #6501 from Wenzel/expose_ansible_packer_http_addr
Expose ansible packer_http_addr extra var
2018-07-18 17:18:46 -07:00
Megan Marsh 9c2f44be83
Merge pull request #6503 from Wenzel/expose_packer_http_addr_shell_local
Expose PACKER_HTTP_ADDR environment variable for shell-local
2018-07-18 17:02:34 -07:00
Matthew Hooker 814c1cf2b2
spellfix 2018-07-18 13:00:45 -07:00
Andrew Pryde 67f039509a
Merge pull request #6498 from neumayer/ocimetadata
Allow instance metadata to be specified in config
2018-07-18 18:27:27 +01:00
Megan Marsh fe15bc53a8
Merge pull request #6450 from shadycuz/ansible_winrm
Feature: Add randomly generated win_rm password to the ansible provisioner
2018-07-18 09:49:48 -07:00
Megan Marsh e8a7d948db update docs 2018-07-18 09:42:15 -07:00
Megan Marsh e146973d08 change implementation to set winrm password in way that matches powershell and shell-local implementations; sanitize logs 2018-07-17 16:39:50 -07:00
Matthew Hooker 9384f322f6
Prevent make fmt from failing in default case
Apologies for the terrible hack. This just makes sure we always have
a default file to format, so if the unformatted list is empty
we don't error.
2018-07-17 13:30:10 -07:00
Mathieu Tarral 430d9389be website: add documentation for packer_http_addr extra variable 2018-07-17 19:58:08 +03:00
Mathieu Tarral 3450b6fd6f ansible: expose packer_http_addr extra var 2018-07-17 19:58:07 +03:00
Megan Marsh a658b4a94b
Merge pull request #6502 from neumayer/fixtypo
Fix typo in oci documentation
2018-07-17 09:37:30 -07:00
Megan Marsh 23cdaaecb4
Merge pull request #6497 from KohlsTechnology/googlecompute-import-docs-fix
Add missing link to googlecompute-import post-processor docs
2018-07-17 09:22:00 -07:00
Mathieu Tarral 221761d97a shell-local: add docs for PACKER_HTTP_ADDR env var 2018-07-17 18:50:40 +03:00
Mathieu Tarral edcc0b3853 shell-local: expose PACKER_HTTP_ADDR env var 2018-07-17 18:49:36 +03:00
Robert Neumayer 990d139d45 Fix typo in oci documentation 2018-07-17 17:46:23 +02:00
xxx 7630268e1d Incorporate review comments 2018-07-17 17:41:19 +02:00
Sean Malloy cf04fd55ea Add missing link to googlecompute-import post-processor docs 2018-07-16 20:40:19 -05:00
Levi Blaney f5e17d1cad
changed wording from builder to provisoner 2018-07-16 19:13:05 -04:00
Levi Blaney a5493e4906
added the builders that set_winrm_passwd works with 2018-07-16 17:26:38 -04:00
Megan Marsh b28098e0f7 update to version 1.2.6-dev 2018-07-16 13:25:32 -07:00
Megan Marsh d1cc5451e9
Cut version 1.2.5 2018-07-16 13:10:23 -07:00
Megan Marsh 456a42c341 cut v.1.2.5 2018-07-16 13:03:09 -07:00
Megan Marsh 8d9452a140 final changelog update for v.1.2.5 2018-07-16 13:01:42 -07:00
Megan Marsh d31e38bafa
Merge pull request #6479 from hashicorp/pr-azure-build-on-32bit
azure: Upgrade to a new SDK to fix 32-bit build breakage
2018-07-16 12:18:01 -07:00
James Nugent 618f125135 Update CHANGELOG.md 2018-07-16 13:03:55 -05:00
James Nugent 9fffe4056e
Merge pull request #5452 from smaato/tag-spot-requests
Enable tagging of spot requests
2018-07-16 13:00:07 -05:00
Sander van Harmelen 451cbd8aa9
Merge pull request #6487 from sermilrod/Honour-cloudstack-projectid
Honour cloudstack projectid
2018-07-16 13:53:06 +02:00
Sergio Millan Rodriguez 742bcf5afb added documentation for prevent_firewall_changes flag 2018-07-16 13:31:29 +02:00
Sergio Millan Rodriguez f4020835d6 flag to setup networking without firewall rules 2018-07-16 13:06:51 +02:00
Sergio Millan Rodriguez 472a7820eb Using UI keypair meaningful message 2018-07-16 11:39:15 +02:00
Sergio Millan Rodriguez e729b21212 passing projectid to getRootVolumeID rather than the whole config struct 2018-07-16 11:38:14 +02:00
Levi 17074cda2c added set_winrm_passwd usage instructions 2018-07-14 15:09:48 -04:00
Levi 6646d42490 updated function calls to include buildname and changed variable names 2018-07-14 14:39:38 -04:00
Levi 68ec630fde added function to retreive winrm password from commonhelper 2018-07-14 11:25:04 -04:00
Levi 636cec8f2b added commonhelper import 2018-07-14 11:25:01 -04:00
Levi 37fd50995f added parameter for setting packer password as env variable 2018-07-14 11:25:00 -04:00
Megan Marsh 1b967e60f9 update changelog for v. 1.2.5 2018-07-13 16:48:21 -07:00
Mark Meyer 2fec76ea87 Check if spot price is empty, when spot_tags is set 2018-07-13 22:42:42 +02:00
Megan Marsh a149dcb029
Merge pull request #6486 from adarobin/esxi_6.5+_documentation
Update documentation for building on ESXi 6.5 and 6.7
2018-07-13 09:51:12 -07:00
Megan Marsh b6b907f523 read in the environment variables that government wait time and polling time for the AWS wait in step_stop_ebs_volume 2018-07-13 09:43:28 -07:00
Megan Marsh 460e39d05d
Merge pull request #6488 from hashicorp/fix_6028
allow absolute paths to isos in checksum files
2018-07-13 09:40:14 -07:00
Megan Marsh 9432067449
Merge pull request #6481 from hashicorp/fix_6476
don't try to determine file or folder with winrm communicator; not al…
2018-07-13 09:25:47 -07:00
Megan Marsh 0df33cd032 fix relative pathing versus iso checksum dir to work even if user has provided a relative path for the iso_url which is relative to the directory where Packer is run. 2018-07-13 09:21:04 -07:00
Megan Marsh d0f0da6626 allow absolute paths to isos in checksum files 2018-07-13 09:14:59 -07:00
Sergio Millan Rodriguez a41a4658ee make packer builder honour projectid setting if provided 2018-07-13 17:58:46 +02:00
Sergio Millan Rodriguez eae0556dc5 Add option to enable/disable create firewall/acl rules 2018-07-13 17:58:39 +02:00