M. Marsh
a012f70e71
Merge pull request #6251 from hashicorp/do_winrm_shell_local
...
access automatically generated winrm password from shell-local
2018-05-29 12:09:40 -07:00
Megan Marsh
3afca6905b
remove duplicate assignmnet
2018-05-29 11:47:27 -07:00
Matthew Hooker
6a769f08d8
regenerate boot command code
2018-05-29 11:17:51 -07:00
Matthew Hooker
788418cff2
Add unit test to show that we handle tars safely
2018-05-25 12:13:59 -07:00
Megan Marsh
846f94c964
implement template variable for accessing WinRM password in either environemnt variables or directly in execute_command or inline commands.
2018-05-23 16:00:43 -07:00
M. Marsh
62e1323577
Merge pull request #5956 from hashicorp/dedupe_shell_local
...
Deduplicate the code for the shell-local post-processor and shell-local provisioner
2018-05-23 15:54:27 -07:00
Megan Marsh
d1e31c0f23
use if/else to clarify code
2018-05-21 15:19:27 -07:00
Megan Marsh
969201a2d4
handle minor shell-local PR suggestions and corrections
2018-05-21 14:56:44 -07:00
Megan Marsh
1fdf763d0f
fancier logging
2018-05-21 11:25:51 -07:00
M. Marsh
edb5c1f50d
Merge pull request #6243 from camjjack/hyper-v-gui
...
Using vmconnect to display gui for hyper-v
2018-05-18 11:24:24 -07:00
WaaZaa666
b747877222
Fixing #6267 , multiple hyper-v disks
2018-05-17 14:50:18 +02:00
Unknown
29c4b4436d
Changes requested in PR #6243
...
- Logging error if vmconnect.exe fails.
- Using StepRun struct rather than StateBag for command Cancel function
- Better handling in Disconnect when headless is true or vmconnect failed in Start
2018-05-14 20:52:10 +10:00
Unknown
fc734b6bd9
Using vmconnect to display gui for hyper-v
...
vmconnect.exe comes as part of Hyper-V and is the tool used by Hyper-V Manager to connect with a virtual machine. This commits sets behaviour the same as virtualbox and vmware to display the virtual machine connection unless headless is set in the template.
2018-05-14 20:52:10 +10:00
M. Marsh
5871b8242b
Merge pull request #6101 from adarobin/azurecompatible
...
Add use_fixed_vhd_format Hyper-V ISO option
2018-05-10 17:02:44 -07:00
Stefan Henseler
6f00596053
Adds config option to specify hyper-v secure boot template
2018-05-10 19:00:35 +02:00
DanHam
d9d8b93c14
Remove tmp file created by common/ test. Avoid possible race condition.
2018-05-09 22:09:05 +01:00
M. Marsh
7c46e3d89c
Merge pull request #6207 from gtirloni/issue-6203
...
[WIP] Handle HTTP download errors
2018-05-08 15:56:06 -07:00
Matthew Hooker
5e6e12cacd
Use fmt to convert whatever's in error to a string.
...
This way we don't crash if someone sticks something else in the error
key in the state bag (which a quick glance at the code tells me we're
already doing.
Perhaps in the future we can add an error attribute to the state bag
but for now this will have to suffice.
2018-05-08 15:22:02 -07:00
Matthew Hooker
0a1842140b
Display build error when on-error=ask|abort
2018-05-08 04:06:03 -07:00
Megan Marsh
1bea658e16
fix command and inline calls on windows
2018-05-07 15:10:10 -07:00
Megan Marsh
fabd1a6517
windows cmd env vars
2018-05-07 15:10:10 -07:00
Megan Marsh
9651432378
preserver BC for people using 'command' option
2018-05-07 15:10:10 -07:00
Megan Marsh
dd183f22d9
update docs and add warnings around WSL limitations
2018-05-07 15:10:10 -07:00
Megan Marsh
51bcc7aa13
add new feature for telling shell-local whether to use linux pathing on windows; update docs with some examples.
2018-05-07 15:10:10 -07:00
Megan Marsh
e983a94a88
fix default windows bash call for shell-local provisioner and move chmod command from the execute_command array into the portion of code where we actually generate inline scripts, sparing users the need to think about this modification which Packer should really handle on its own
...
make bash call work on windows
2018-05-07 15:10:10 -07:00
Megan Marsh
5da4377f21
first pass at docs update
2018-05-07 15:10:10 -07:00
Megan Marsh
854d6fb141
add tests making sure post-processor has backwards compatability
2018-05-07 15:10:10 -07:00
Megan Marsh
f799003b66
tighten up shell-local config validation
2018-05-07 15:10:10 -07:00
Megan Marsh
479d36734d
consolidate shell-local defaulting of InlineShebang and ExecuteCommand to the config validation
2018-05-07 15:10:10 -07:00
Megan Marsh
d304234725
fix tests
2018-05-07 15:10:10 -07:00
Megan Marsh
67739270bb
pull temp file writing into its own function for easier testing
2018-05-07 15:10:10 -07:00
Megan Marsh
6dc4b1cbdc
move all of the run commands for shell-local provisioner and postprocessor into common library too
2018-05-07 15:10:09 -07:00
Megan Marsh
c7c66bedcb
set inline to an empty array, rather than nil
2018-05-07 15:10:09 -07:00
Megan Marsh
926327beba
deduplicate all validation and interpolation of the shell-local config, sharing options between shell-local provisioner and post-processor. Maintain backwards compatibility with shell-local provisioner.
2018-05-07 15:10:09 -07:00
Megan Marsh
616b41e58f
deduplicate the nearly identical communicators for the shell-local provisioner and post-processor, moving single communicator into a new common/shell-local module
2018-05-07 15:10:09 -07:00
M. Marsh
bf6dc932d5
Merge pull request #6219 from jborean93/hyper-v-ip
...
Hyper-V: Add support retrieving IP for Server 2008 R2
2018-05-04 12:56:17 -07:00
DanHam
7e478f650e
Remove tmp files created by common/ tests
2018-04-30 18:16:46 +01:00
Jordan Borean
14e41fad7e
Hyper-V: Add support retrieving IP for Server 2008
2018-04-30 15:18:28 +10:00
Giovanni Tirloni
413d13c411
Handle HTTP download errors
2018-04-26 18:59:30 -03:00
Adam Robinson
3aebd5f462
Add use_fixed_vhd_format Hyper-V ISO option
2018-04-26 13:35:19 -04:00
Matthew Hooker
a3bf2c786a
Use expression sequence generator in tests.
2018-04-23 16:32:18 -07:00
M. Marsh
69c7e2d51d
Merge pull request #6144 from hashicorp/winrm_password_fix
...
use build name to ensure that winrm password and other shared state i…
2018-04-23 09:12:52 -07:00
Matthew Hooker
e4bd30e53d
fix bug with empty boot command.
2018-04-21 11:40:47 -07:00
Matthew Hooker
b5a97e468f
fix test
2018-04-19 17:07:58 -07:00
Matthew Hooker
7e9af8247a
fix 2 byte scancodes for pc-xt VMs.
2018-04-19 17:02:39 -07:00
Matthew Hooker
675eae1e92
flush scancodes when we wait
2018-04-19 16:44:50 -07:00
Matthew Hooker
374d8f089f
better log message
2018-04-19 16:09:38 -07:00
Matthew Hooker
31d04f1945
remove outdated comment
2018-04-19 14:26:31 -07:00
Matthew Hooker
df6224d04e
fix vnc config
2018-04-19 14:26:31 -07:00
Matthew Hooker
aa69bdf74e
Perform validation of boot command.
2018-04-19 14:26:31 -07:00
Matthew Hooker
7d43324359
add menu key.
...
Replaces #5989
2018-04-19 14:26:31 -07:00
Matthew Hooker
e9e27941cc
sort keycode lists
2018-04-19 14:26:31 -07:00
Matthew Hooker
c6299972b9
s/boot_command/bootcommand/
2018-04-19 14:26:31 -07:00
Matthew Hooker
7990966a09
fix boot command config struct name
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
9a8acbbcab
negative wait WIP
2018-04-19 14:26:30 -07:00
Matthew Hooker
add7e8acb9
Stop sending boot commands when context canceled.
2018-04-19 14:26:30 -07:00
Matthew Hooker
94129b7fe3
we're using PC-XT (set1) not PC-AT
2018-04-19 14:26:30 -07:00
Matthew Hooker
a46a7afa20
Remove old tests.
2018-04-19 14:26:29 -07:00
Matthew Hooker
e2e7bc65fd
Make special keys case insensitive.
...
add tests
2018-04-19 14:26:29 -07:00
Matthew Hooker
cba4d3235f
cleanup
2018-04-19 14:26:29 -07:00
Matthew Hooker
bdb1eee7d8
Implement new parser for HyperV boot command
2018-04-19 14:26:29 -07:00
Matthew Hooker
f9ad264f4d
Comments
2018-04-19 14:26:29 -07:00
Matthew Hooker
81d127768c
Add key press interval to virtualbox.
2018-04-19 14:26:29 -07:00
Matthew Hooker
59376294ef
Maximize scancode throughput.
...
Let's cache the scancodes and flush them at the end. Also make sure to
send only as many as the driver can send correctly. It's important here
to chunk the scancodes correctly, so that we don't accidentally split them
over successive calls to the driver
2018-04-19 14:26:29 -07:00
Matthew Hooker
9b7704c714
Implement new parser for Parallels boot command
2018-04-19 14:26:29 -07:00
Matthew Hooker
99d61920d0
Abstract vbox driver into PC-AT driver.
2018-04-19 14:26:29 -07:00
Matthew Hooker
e4af71858f
Implement new parser for Virtualbox boot command
...
Remove boot wait for virtualbox run step
2018-04-19 14:26:29 -07:00
Matthew Hooker
1c0af28662
Some cleanup and comments.
2018-04-19 14:26:29 -07:00
Matthew Hooker
673245afcf
Replace boot command parser with PEG parser.
2018-04-19 14:26:28 -07:00
M. Marsh
f5c031baf9
Merge pull request #5941 from synax/hyper-v-disk-block-size
...
Adds Support to configure hyper-v disk block size
2018-04-19 11:27:52 -07:00
Stefan Henseler
b8bf421dc2
Fixes missing diskblocksize parameter for gen1 vms
2018-04-18 22:14:44 +02:00
Megan Marsh
3afb243f11
use build name to ensure that winrm password and other shared state is not overwritten if two builders need the password in the same packer run.
2018-04-16 13:41:17 -07:00
Seth Vargo
b17b333e29
Add a common package for specifying useragent and adopt that everywhere
...
There were 5 different formats for the Packer useragent string. This
fixes that and unifies it into a helper package.
I did not touch oracle's user-agent, because it looked kinda special.
2018-04-05 14:28:50 -04:00
Hannu Piki
3ffaf551c0
Fixing Hyper-V ISO builder CopyExportedVirtualMachine PowerShell
...
Script wasn't able to handle path that Packer used to create VM in the first place:
"==> hyperv-iso: Copying to output dir...
==> hyperv-iso: Error exporting vm: PowerShell error: Move-Item : An object at the specified path C:\Users\HANNU~1.PIK does not exist.
==> hyperv-iso: At C:\Users\hannu.piki\AppData\Local\Temp\ps520830935.ps1:13 char:1
==> hyperv-iso: + Move-Item -Path "$srcPath/$vhdDirName" -Destination $dstPath -Verbose
==> hyperv-iso: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
==> hyperv-iso: + CategoryInfo : InvalidArgument: (:) [Move-Item], PSArgumentException
==> hyperv-iso: + FullyQualifiedErrorId : Argument,Microsoft.PowerShell.Commands.MoveItemCommand"
Used path was: C:\Users\HANNU~1.PIK\AppData\Local\Temp\packerhv616791918\export253729206\2016min
Real path was: C:\Users\hannu.piki\AppData\Local\Temp\packerhv616791918\export253729206\2016min
2018-03-29 18:34:14 +03:00
Stefan Henseler
03f0b4aa11
Fixes minor typo
2018-03-25 16:30:03 +02:00
Stefan Henseler
d31e35075e
Removes obsolete code
2018-03-25 16:27:57 +02:00
Megan Marsh
d689e6b4d3
allow users of AWS to use the dynamically-generated admin password which we use as the winRM password as an elevated password in the Powershell provisioner, as well as an environment variable in same provisoner.
2018-03-14 15:58:12 -07:00
Josh Soref
5178dd36e8
spelling: regular
2018-03-14 02:19:10 +00:00
Stefan Henseler
a6b0bd2927
Merge branch 'master' into hyper-v-disk-block-size
2018-02-23 20:21:22 +01:00
Stefan Henseler
103186af86
Adds Support to configure hyper-v disk block size
2018-02-23 20:19:26 +01:00
Anthony Allen
f3c361de6b
Fully qualify hyper-v powershell commands
2018-02-07 08:01:05 +01:00
SwampDragons
7d5d62d748
Merge pull request #2906 from arizvisa/GH-2377
...
Improved support for downloading and validating a uri containing a Windows UNC path or a relative file:// scheme
2018-02-05 09:53:47 -08:00
Ali Rizvi-Santiago
9eb2f37429
Ack! Forgot to include the test-fixtures/SomeDir/myfile.txt file...
2018-02-02 20:44:22 -06:00
Ali Rizvi-Santiago
d4b00b722a
Removed an extra '/' from the TestFileExistsLocally test in common/config_test.go
2018-02-02 20:36:08 -06:00
Ali Rizvi-Santiago
efc97dbda2
Fixed TestFileExistsLocally tests in common/config_test.go so that they're actually being run. Added a non-existent-protocol:// test.
2018-02-02 20:29:10 -06:00
Ali Rizvi-Santiago
c366a1e160
Inverted the logic of FileExistsLocally as suggested by @SwampDragons as remote URLs are assumed to exist locally.
2018-02-02 20:17:24 -06:00
Ali Rizvi-Santiago
c98a074f0d
Renamed common/config.go's SupportedURL to SupportedProtocol as suggested by @SwampDragons.
2018-02-02 18:58:42 -06:00
Ben Phegan
3c88e787df
Merge branch 'master' into hyperv_mac_address
2018-02-02 09:26:52 +11:00
Matthew Hooker
8cd403425e
test fixes WIP
2018-01-24 17:09:17 -08:00
Matthew Hooker
5d48d658b4
Wire context through misc steps
...
Some steps actually need to pass the context around, so let's create
a ctx variable and pass it.
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
Ali Rizvi-Santiago
0e0b467da7
Forgot to check some errors during the adding of files to the floppy disk. This gives users some better information in case packer is unable to add a file...like if there's not enough disk space available.
2018-01-19 13:34:01 -06:00
Ali Rizvi-Santiago
97fc9c02a5
Grr...missed the case that actually mattered on linux.
2018-01-18 23:58:24 -06:00
Ali Rizvi-Santiago
f9572cb244
Fixed a bug on linux related to forgetting to check the platform for the forward-slash prefix.
2018-01-18 23:48:20 -06:00
Ali Rizvi-Santiago
41f4dc3f3d
umm...gofmt -w on common/config{,_test}.go from linux instead of windows(?)
2018-01-18 23:33:44 -06:00
Ali Rizvi-Santiago
7cd5d576d9
Updated common/config.go's FileExistsLocally implementation to use the LocalDownloader interface for determining the real file path.
2018-01-18 23:18:55 -06:00