DanHam
939aa7e289
Add test: We shouldn't error when main remote options are unset
2018-07-02 18:13:19 +01:00
DanHam
efcdf60d96
Add tests to ensure remote_password is set when exporting with ovftool
2018-07-02 18:13:19 +01:00
DanHam
0d9134bdbc
Fix existing tests as they were not doing what they should have been
...
* Fix test to check for remote_host when remote_type is set
* Fix tests by including remote_password where required
2018-07-02 18:12:41 +01:00
DanHam
eee16262b6
Remove duplicate/redundant test
2018-07-02 18:10:50 +01:00
DanHam
c8199458a7
Prevent hang on export for remote ESXi build due to empty remote_password
2018-07-02 18:10:50 +01:00
Conrad Jones
d05a601d00
Add support to vmware-vmx builder for linked clones.
2018-06-17 01:38:42 +01:00
M. Marsh
c586312bf7
Merge pull request #4538 from hashicorp/defaultovf
...
builder/vmware: correctly default export format to ovf
2018-06-07 11:36:48 -07:00
DanHam
c828015bc3
Follow variable varName <-> statebag var_name convention
2018-04-27 20:09:19 +01:00
DanHam
c48a7889f9
Simplify handling of disks by collating requirements and unifying ops
2018-04-27 16:39:52 +01:00
Matthew Hooker
67a9c7fb92
we never expect remote cache to be a directory.
2018-04-26 12:40:40 -07:00
Matthew Hooker
de1dac1bdf
don't delete the cache directory.
2018-04-26 12:40:40 -07:00
Matthew Hooker
97cfd60b82
Remove remote cache correctly.
2018-04-26 12:40:35 -07:00
Ali Rizvi-Santiago
673d4579e4
Ack! Forgot to include the template variable in the definition for vmxTemplateData for commit 0e519d79e0
. Now it's added..
2018-04-26 14:22:37 -05:00
Ali Rizvi-Santiago
0e519d79e0
Modified iso/step_create_vmx.go in the vmware-iso builder to also specify the "bios.hddOrder" field depending on the hdd device that was specified. This might close issue #6197
2018-04-26 14:16:50 -05:00
Ali Rizvi-Santiago
5d8b476a7f
Fixed the regex in common/step_clean_vmx.go for the VMware builder to also support removal of sata-based cdrom devices. Also added a comment in iso/step_create_vmx.go that links both pieces of related code.
2018-04-26 14:01:58 -05:00
Matthew Hooker
451e3d0554
builder/vmware-esxi: remove floppy files when done
2018-04-26 10:47:33 -07:00
Matthew Hooker
6bbfe7e0bd
remove useless check against format
2018-04-23 10:24:49 -07:00
Matthew Hooker
fdeadfe3f6
builder/vmware: correctly default export format to ovf
2018-04-23 10:17:53 -07:00
Matthew Hooker
c6299972b9
s/boot_command/bootcommand/
2018-04-19 14:26:31 -07:00
Matthew Hooker
408eba88ad
flatten boot command config and implement for vmware
2018-04-19 14:26:30 -07:00
Matthew Hooker
673245afcf
Replace boot command parser with PEG parser.
2018-04-19 14:26:28 -07:00
M. Marsh
83162717ed
Merge pull request #4563 from marema31/vmware-iso-warn-esx
...
builder/vmware-iso: Fail on wrong remote_type value
2018-04-06 16:52:26 -07:00
Megan Marsh
ef4f3f143b
Merge pull request #5985 from AndiDog/f-5979-vmware-fusion-guestip-lookup-multiple-devices
...
Handle multiple devices per VMware network type
2018-03-21 17:12:36 -07:00
Josh Soref
fa36e1d961
spelling: processing
2018-03-14 02:17:22 +00:00
Andreas Sommer
ff92fb883d
Handle multiple devices per VMware network type
...
Fixes #5979
2018-03-07 10:59:55 +01:00
Ali Rizvi-Santiago
df6cdcc7f7
Disable the usage of the XHCI bus for USB on the vmware-iso builder.
...
Some platforms with incomplete XHCI implementations (i.e. FreeBSD)
will poll the bus despite there being no usb devices available.
This disables XHCI by default and documents how to enable it using
the vmx_data option.
This closes issue #5961 .
2018-03-05 20:58:43 -06:00
Megan Marsh
33acdbf3bf
move comments so indentation is more logical
2018-02-21 14:57:58 -08:00
Ali Rizvi-Santiago
ac2ddbcbf5
Fixes the assumption that all the VMware builder's drivers will implement a network mapper for mapping a network name to it's corresponding device.
...
The ESX5 driver doesn't have a way of mapping the network name to its device name because a .vmx template uses different field names for it and so packer let's ESX handle filling this in. This patch will check to see if the driver that packer determines is missing a NetworkMapper implementation (by checking for nil). If it is, then fall back to using "nat" despite ESX not using the network type at all. This is what packer did prior to exposing the network type to the user back in version 1.1.3.
This closes issue #5916 .
2018-02-20 19:45:55 -06:00
Ali Rizvi-Santiago
fa2dddd26d
Fixed some things mucked up during rebase.
2018-02-02 19:45:18 -06:00
Ali Rizvi-Santiago
aefe41a44a
Fixed an issue with the previous commit so that when the user does not specify the cdrom_adapter_type to fallback to the original decision made by the disk adapter type selection.
2018-02-02 19:18:50 -06:00
Ali Rizvi-Santiago
eb0445ca96
Added support for specifying both the network adapter type and cdrom adapter type as requested by @night199uk. Also included the respective documentation for these new options.
2018-02-02 19:18:50 -06:00
Ali Rizvi-Santiago
74946071d2
Added support for specifying the disk adapter type to the vmware builders. This was squashed from the vmware-diskAdapterType branch ( #2968 ) as submitted by Rami Abughazaleh <icnocop@users.noreply.github.com>. This closes #5671 and possibly #4885 .
...
arizvisa: Updated icnocop's documentation to include the possible disk adapter types that one can specify.
arizvisa: Tweaked icnocop's support for the `disk_adapter_type` option to the VMWare builder that caused conflicts due to version skew.
icnocop: Updated links to the Virtual Disk Manager User's Guide PDF to open in a new window and also added the Adobe PDF icon
icnocop: Added support for vmware to specify the disk adapter type, ide or scsi (lsilogic or buslogic)
2018-02-02 19:18:49 -06:00
Ali Rizvi-Santiago
b2fec18b1e
Added parser for VMware Fusion's networking file. Replaced VmwareDriver's NetmapConfPath with a NetworkMapperInterface in order to handle the differences between VMware Fusion and the rest of the VMware suite.
2018-02-02 19:18:49 -06:00
Ali Rizvi-Santiago
029c357d8c
Modified some tests to require the PACKER_ACC environment variable to be set before executing them. This turns them into acceptance tests as per CONTRIBUTING.md.
2018-02-02 19:18:49 -06:00
Ali Rizvi-Santiago
58ebc5c9a5
When specifying NONE for serial or parallel in the VMware builder, disable the serial and parallel port devices entirely.
2018-02-02 19:18:48 -06:00
Ali Rizvi-Santiago
6423525a33
Updated imports of github.com/mitchellh/packer to new naming scheme github.com/hashicorp/packer
2018-02-02 19:18:48 -06:00
Ali Rizvi-Santiago
75fbfa0763
Replaced a hacky type assertion in the VMware builder with a call to Driver.GetVmwareDriver() that returns the driver-specific structure for ip and addressing information. Also implemented the addressing functions for the ESXi driver interface.
...
This fixes an issue where a driver might not have defined a VmwareDriver by forcing a developer to implement it via the standard Driver interface.
2018-02-02 19:18:48 -06:00
Ali Rizvi-Santiago
898b27c16d
Added support for the NONE option to be specified for parallel and serial ports in the vmware iso builder.
2018-02-02 19:18:48 -06:00
Ali Rizvi-Santiago
884af69da1
go fmt on builder/vmware/*
2018-02-02 19:18:48 -06:00
Ali Rizvi-Santiago
0d6cf7fac4
Added support for auto-detection to the serial and parallel port types.
...
Included the yield option to all the serial port types.
Added the ability for the network type to fallback to a custom network if the
specified network name is not found in netmap.conf.
Promoted the scope for both Read{Dhcp,Netmap}Config inside vmwcommon.driver.
Updated the documentation for the VMware builder.
2018-02-02 19:14:29 -06:00
Ali Rizvi-Santiago
e389d30a1b
Implemented the unit-tests for builder/vmware/iso/step_create_vmx.go
2018-02-02 19:13:02 -06:00
Ali Rizvi-Santiago
15cb6a833a
Ugh..missing argument in VMware builder's driver_esx5 unit-test due to api change for .HostIP(). Fixed.
2018-02-02 19:11:41 -06:00
Ali Rizvi-Santiago
4225b3568e
Fixed bad ORs and a bad fmtstring.
2018-02-02 19:11:41 -06:00
Ali Rizvi-Santiago
75d3ea7cee
Added support for sound, serial ports, parallel ports, usb, and specifying a default network to the vmware builder.
...
builder/vmware/{iso,vmx}:
Added the specific configuration options that get parsed.
Normalize paths when pulling them from the json template so that they'll work on Windows too.
Added some improved error checking when parsing these options.
Stash the vm's network connection type so that other steps can figure out addressing information
Modified the esx5 driver to support the new addressing logic.
Modified the template in step_create_vmx to include the new options.
builder/vmware/common:
Implemented a parser for vmware's configuration files to the vmware builder.
Modified the driver's interface to include support for resolving both guest/host hw and ip addresses
Implemented a base structure with some methods that implement these features.
Rewrote all ip and mac address dependent code to utilize these new methods.
Removed host_ip and guest_ip due to their logic being moved directly into a
base-structure used by each driver. The code was explicitly checking runtime.GOOS
instead of portably using net.Interfaces() anyways.
Updated driver_mock to support the new addressing methods
2018-02-02 19:11:41 -06:00
Matthew Hooker
8cd403425e
test fixes WIP
2018-01-24 17:09:17 -08:00
Matthew Hooker
7a189a83a1
fix imports
...
`find . -type f -name '*.go' -not -path "./vendor/*" -exec goimports -w {} \;`
2018-01-24 17:09:17 -08:00
Matthew Hooker
a831d522be
change run signatures
...
Run now takes a context as well as a statebag. We'll assign the context
to the blank identifier to prevent namespace collisions. We'll let the
step authors opt-in to using the context.
`find . -iname "step_*.go" -exec gsed -i'' 's/func \(.*\)Run(/func \1Run(_ context.Context, /' {} \;`
2018-01-24 17:09:17 -08:00
Matthew Hooker
366dc3da0a
move multistep imports to helper.
...
gomvpkg -from "github.com/mitchellh/multistep" -to "github.com/hashicorp/packer/helper/multistep"
2018-01-24 17:09:15 -08:00
Matthew Hooker
ebe995c0ff
run goimports
2018-01-22 17:21:10 -08:00
SwampDragons
8a30b3db80
Merge pull request #5456 from GoSecure/vmware-iso-improved-network-logging
...
vmware-iso builder: Logging on network errors on connection refused
2017-11-30 16:31:30 -08:00
bugbuilder
f7b45312f1
Removing skip attribute
2017-11-10 23:58:24 -03:00
bugbuilder
be2afccb85
Revamped the process to verify remote cache.
2017-11-10 23:55:26 -03:00
bugbuilder
463d87adcd
Merge branch 'master' of https://github.com/hashicorp/packer into esxi-remote-cache
2017-11-10 23:08:09 -03:00
bugbuilder
23f4d187e2
validating keep_registered and fixing skip_export issues
2017-11-08 15:57:34 -03:00
Olivier Bilodeau
820811675d
vmware-iso builder: Logging on network errors on connection refused
2017-10-13 19:00:48 -04:00
Matthew Hooker
07b013945f
more consistent flag name
2017-10-12 16:38:18 -07:00
Matthew Hooker
106408f6be
add new disable_vnc option
2017-10-12 16:34:40 -07:00
nictrix
6a238a3ef3
add option to skip vnc phase and update docs
2017-10-12 16:28:27 -07:00
Matthew Hooker
2a326b5172
fix nil ptr exception
2017-10-05 16:34:13 -07:00
Megan Marsh
e93d64e80f
Merge pull request #4592 from jimmythedog/ovfexportpath-localoutputdir
...
Ovfexportpath localoutputdir -- Merging for release with 1.1.0
2017-08-31 09:55:58 -07:00
Matthew Hooker
cd11e4ff33
Merge pull request #5187 from mkuzmin/vmware-artifactid
...
vmware: Publish artifact ID
2017-08-30 13:56:49 -07:00
Victor Ronin
cb75796389
Show a message why VM export was skipped while building on VMWare Fusion/Workstation
2017-08-23 12:44:46 -07:00
Michael Kuzmin
9876a28ea7
vmware: publish vm_name as artifact ID
2017-07-28 11:16:46 +03:00
bugbuilder
15eb338596
Cleaning refactoring name errors x2
2017-07-24 00:30:55 -04:00
bugbuilder
f31f154237
Cleaning refactoring name errors
2017-07-24 00:17:18 -04:00
bugbuilder
b50e279d8a
Making visible verify cache step
2017-07-24 00:11:30 -04:00
bugbuilder
d4e0847a74
remove unnecessary initialization
2017-07-23 14:16:03 -04:00
bugbuilder
22aa89db27
file scheme has prioriry as remote targetPath
2017-07-23 14:11:48 -04:00
bugbuilder
84ad413e23
Set remote iso path
2017-07-23 03:20:06 -04:00
bugbuilder
4023b618b4
Verify remote cache for ESXi
2017-07-23 01:31:46 -04:00
Matthew Hooker
d35eeecf46
vnc port discovery timeout is 15 seconds
2017-06-22 17:58:18 -07:00
Megan Marsh
2a6f5f1b13
specify HostKeyCallback for vmware esx5 driver
2017-06-21 10:09:11 -07:00
Matthew Hooker
730cc0889e
Merge pull request #4919 from hashicorp/fix4798
...
builder/vmware: make vnc probe timeout configurable
2017-05-30 12:59:22 -07:00
Matthew Hooker
f801c507fc
builder/vmware: make vnc probe timeout configurable
2017-05-30 12:51:45 -07:00
James Nugent
c4439aba82
builder/vmware: Add vmx_remove_ethernet_interfaces
...
This commit adds a new option, `vmx_remove_ethernet_interfaces`, to both
of the VMWare builders. This is useful when building Vagrant boxes,
since Vagrant now produces output such as:
```
WARNING: The VMX file for this box contains a setting that is
automatically overwritten by Vagrant when started. Vagrant will stop
overwriting this setting in an upcoming release which may pre vent
proper networking setup. Below is the detected VMX setting:
ethernet0.pcislotnumber = "33"
If networking fails to properly configure, it may require this VMX
setting. It can be manually applied via the Vagrantfile:
Vagrant.configure(2) do |config|
config.vm.provider :vmware_fusion do |vmware|
vmware.vmx["ethernet0.pcislotnumber"] = "33"
end
end
```
This can be avoided entirely by removing the ethernet adapters from the
VMX file prior to packaging as a Vagrant box, in which case adapters are
created as expected according to the Vagrantfile specification.
2017-05-24 18:53:25 -05:00
Matthew Hooker
9f992b8f80
go files are 0644
2017-04-25 12:50:58 -07:00
Matthew Hooker
81522dced0
move packer to hashicorp
2017-04-04 13:39:01 -07:00
Matthew Hooker
4fcbf75da9
s/non existent/nonexistent/
2017-03-29 12:38:33 -07:00
Matthew Hooker
d1b20b3d9c
remove a bunch of dead code.
...
https://github.com/dominikh/go-tools/tree/master/cmd/unused
2017-03-28 20:36:20 -07:00
Matthew Hooker
230079f73a
spell fixes
2017-03-28 20:36:19 -07:00
Jimmy The Dog
1e9b0f7b8f
Replace export output dir in state bag with params
...
step_export now has the OutputDir as a param instead of getting it from
the state bag, on the advice of @mwhooker in PR comment
2017-03-10 10:43:45 +00:00
Jimmy The Dog
e851efb1b6
Set export_dir to the output_dir property
2017-03-10 08:20:48 +00:00
Jimmy The Dog
9eb9abdce9
Merge branch 'master' into ovfexportpath-localoutputdir
2017-03-10 08:12:26 +00:00
Matthew Hooker
8cc2ed7d6e
vmware/esx: try for longer to connect to vnc port
2017-02-28 22:21:19 -08:00
Matthew Hooker
ed92055372
Merge pull request #4532 from mitchellh/vmipgetagain
...
builder/vmware: don't cache ip address so we know if it changes
2017-02-26 18:46:46 -08:00
Jimmy The Dog
ce41055ac6
builder/vmware-iso: do not append to output dir, as ovftool does that
2017-02-24 14:49:40 +00:00
Jimmy The Dog
14810523b8
builder/vmware-iso: get artifact files from local dir
2017-02-24 14:48:38 +00:00
Jimmy The Dog
7a2b30dcc4
builder/vmware-iso: need to always set local output dir, or non-remote build exports will fail
2017-02-24 13:18:28 +00:00
Jimmy The Dog
f8df5f81db
builder/vmware-iso: set local output dir
2017-02-24 12:46:00 +00:00
Marc Carmier
5c11a2e594
Add test for empty remote_type value
2017-02-15 22:11:27 +01:00
Marc Carmier
86c0c859c5
Validate the remote_type value for builder/vmware-iso
2017-02-15 22:04:28 +01:00
Matthew Hooker
0ed84f843e
builder/vmware: allow extra options for ovftool
2017-02-10 00:22:20 -08:00
Matthew Hooker
29dd20da68
builder/vmware: don't cache ip address so we know if it changes
2017-02-09 23:16:40 -08:00
Jelle Hissink
6973e752d2
Vmware vsphere vnc port timeout increased
2017-01-29 14:41:14 +01:00
Matthew Hooker
56c5628205
builder/vmware-iso: set ovftool output path
2017-01-23 17:47:35 -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
Matthew Hooker
d920b3fbf4
run gofmt
2016-11-01 14:08:04 -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