81 Commits

Author SHA1 Message Date
Megan Marsh
fd8a85042d use strconv.Quote instead of fmt.Sprint 2018-10-22 10:59:47 -07:00
Megan Marsh
18c5e8deb8 fix 2018-10-19 13:46:55 -07:00
Megan Marsh
1e4133cbf9 quote upload path 2018-10-19 13:43:13 -07:00
Megan Marsh
3f591d78f3 quote vmx path in register function 2018-10-19 13:42:40 -07:00
Megan Marsh
8cba32d526 escape all the d.sh calls that contain paths 2018-10-19 13:42:40 -07:00
Megan Marsh
5b9adc0c48 single quotes 2018-10-19 13:42:40 -07:00
Megan Marsh
e5e75df033 fix datastore path that contains spaces 2018-10-09 16:36:55 -07:00
Jeffrey Martin
b51cd22b21
document ESXi disk compaction & use verbose option 2018-08-30 16:44:00 -05:00
Jeffrey Martin
09c71f3810
add support for disk compaction to esx5 builder 2018-08-30 16:43:53 -05:00
Adrien Delorme
25de7ad1f2 PrivateKey => PrivateKeyFile 2018-08-29 14:40:33 +02:00
Adrien Delorme
5369c15459 helper: communicator.SSHFileSigner => ssh.FileSigner
* had to to avoid circular dependency
* this commit fixes #6631 ( esxi cannot be reached by ssh )
2018-08-29 14:40:33 +02:00
Adrien Delorme
fa44a4546f use ssh.ParsePrivateKey where we can 2018-08-22 18:23:09 +02:00
DanHam
cd7d3812ea
ESXi: Fix failure to get VM IP when displayName differs from vm_name
The value in the Name field returned by 'esxcli network vm list'
actually returns the VMs `displayName`. As such, we need to match
against `displayName` to discover the VMs 'WorldID'.
'WorldId' is ultimately used/needed as an argument in the command that
returns the VMs IP.
2018-07-06 10:58:09 +01:00
Conrad Jones
d05a601d00 Add support to vmware-vmx builder for linked clones. 2018-06-17 01:38:42 +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
Matthew Hooker
451e3d0554
builder/vmware-esxi: remove floppy files when done 2018-04-26 10:47:33 -07: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
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
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
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
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
Olivier Bilodeau
820811675d vmware-iso builder: Logging on network errors on connection refused 2017-10-13 19:00:48 -04:00
Matthew Hooker
2a326b5172
fix nil ptr exception 2017-10-05 16:34:13 -07: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
f801c507fc
builder/vmware: make vnc probe timeout configurable 2017-05-30 12:51:45 -07:00
Matthew Hooker
81522dced0
move packer to hashicorp 2017-04-04 13:39:01 -07:00
Matthew Hooker
8cc2ed7d6e
vmware/esx: try for longer to connect to vnc port 2017-02-28 22:21:19 -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
Marc Siegfriedt
c1e129848c 3833 - fix for port in MR3347 2016-08-26 20:58:04 +00:00
Rickard von Essen
3e1aed9a6f Enable to disable vnc password for VMware builder 2016-08-19 13:26:23 +02:00
Israel Shirk
f961ce701b Adds password protection for VNC on VMWare 2016-08-19 13:26:16 +02:00
Jeremiah Roth
9489c83f0f If the VM has more than one NIC, loop through until we find one that works (#3347) 2016-08-19 13:23:43 +02:00
Dan Tran
4ac6e2a08c Dont check for poweron command error to force retry at state check (#3195) 2016-08-19 13:21:50 +02:00
Charlie Vieth
6ce847e720 Do not add remotedisplay.vnc.ip to vmx data on ESXi
* The remotedisplay.vnc.ip vmx data key breaks ESXi, this commit prevents it
  from being automatically added during VNC configuration when using the ESX5
  driver.

* It can still be configured via the vmx_data section of the builder
  template

Signed-off-by: Sunjay Bhatia <sbhatia@pivotal.io>
2016-08-19 13:19:04 +02:00
Charlie Vieth
d14d62074e Add winrm functionality to vmware-iso builder (#3738)
* Use winrm_host, if provided, this allows packer to work in ESXi
environments without DHCP.

Signed-off-by: Charlie Vieth <cviethjr@pivotal.io>
2016-08-19 13:02:55 +02:00
Ian Duffy
0327f6c935 Allow configurable VNC bind IP for VMware builders
Signed-off-by: Ian Duffy <ian@ianduffy.ie>
2016-05-23 14:07:03 +01:00
michael
499bd5a362 Add support for SSH Key Authentication with ESX builder 2015-11-03 19:08:35 -08:00
Yuya Kusakabe
699c673536 builder/vmware-esxi: Add step_export
If `format` option is configured, packer exports the VM with ovftool.

website: Document about OVF Tool and `format` option.

post-processor/vsphere: Enable to use `mitchellh.vmware-esx` artifact type and OVF and OVA formats, fixes #1457.
2015-10-23 09:00:53 +09:00
Mitchell Hashimoto
4a60e469e9 update CHANGELOG 2015-06-29 09:33:20 -07:00
Israel Shirk
88fac0b49c Have nonesum run stat rather than nonesum because nonesum sums none. k. 2015-06-25 19:03:00 -06:00
Mitchell Hashimoto
115d583cff helper/communicator: make host more generic 2015-06-13 19:23:33 -04:00
Mitchell Hashimoto
b61ed3adfc builder/vmware: convert to helper/comm 2015-06-13 18:52:44 -04:00
Mitchell Hashimoto
71d8c6610a Merge pull request #1968 from bhcleek/master
do not request a pty
2015-06-13 16:23:31 -04:00
Brandon Heller
a7eeb6a6a7 vmware/iso: support hierarchical output directories
When providing a hierarchical output_directory value like
'transient/jenkins-slave', the VM would fail to build in the CreateDisk
step.  The properly created output directory would not match the location
provided to CreateDisk, since datastorePath() did not properly split such
paths.  Now this case works; tested hierarchical and singular
output_directory values.
2015-06-04 02:49:58 -07:00