Taliesin Sisson
8477a0b748
Accidentally included bracket
2016-12-12 22:44:35 +00:00
Taliesin Sisson
e0c10dec12
If exit code = 1 and the length of the stderr is 0, then we can assume that the exit code was not set, so assume success
2016-12-12 22:44:34 +00:00
Taliesin Sisson
fe8d99fd8a
If we are not getting the exit code assigned then default to it being successful
...
Useful to know what the exit code is if there is an error
2016-12-12 22:44:31 +00:00
Taliesin Sisson
3cb621f890
Get rid of mount and unmount that does not specify controller location exactly
...
Handle cleanup if unmount step has not already done so
2016-12-12 22:44:30 +00:00
Taliesin Sisson
31ac1da28d
Setting boot drive message
2016-12-12 22:44:30 +00:00
Taliesin Sisson
50a8d1b6b4
Forgot to check in these files.
2016-12-12 22:44:27 +00:00
Taliesin Sisson
010d171bec
GuestAdditionsMode and GuestAdditionsPath can be set in config. If GuestAdditionsMode == "attach" it will mount the HyperV Integration Services ISO. If GuestAdditionsPath is set, then it will be used as an alternative to where the HyperV Integration Service ISO is.
...
Included the build step to download ISO, so iso_urls works properly now.
Online activation should be done via provisioner
Installation of integration services should be done via provisioner
Cleaned up the way dvd drives are mounted and unmounted (still need to implement feature to find unused drives before adding a new one)
Cleaned up the way floppies are mounted and unmounted
2016-12-12 22:44:27 +00:00
Taliesin Sisson
422efeeaf6
Make use of driver instead of directly referencing hyper
...
Move inline powershell to hyperv
2016-12-12 22:44:26 +00:00
Taliesin Sisson
9f94834826
Use correct formatting for printf
2016-12-12 22:44:19 +00:00
Taliesin Sisson
54733323a8
Should only default to first controller if its not 1 of the 2 controllers available
2016-12-12 22:44:18 +00:00
Taliesin Sisson
5f2c12324c
No need to remove floppy controller for 2nd generation vms
...
Don't want to be prompted for confirmation from powershell commandlets
2016-12-12 22:44:14 +00:00
Taliesin Sisson
4e8074d7e5
Need to expose generation as a public property
2016-12-12 22:44:13 +00:00
Taliesin Sisson
e18594f404
Hyperv generation 2 machines use scsi for dvd drives. Allow gen 1 machines to have at least 1 iso image attached
2016-12-12 22:44:12 +00:00
Taliesin Sisson
3051ea6633
Quote powershell so that it does not try to interpret command to be run
...
Get VName out of state. This allows template replacement to be run on vmname
2016-12-12 22:44:10 +00:00
Taliesin Sisson
f3cc413bbb
Set the dvd to the first boot device
2016-12-12 22:44:08 +00:00
Taliesin Sisson
02db768018
With generation 2 machine by default a dvd drive is not created. So create a dvd drive for os if it does not exist.
...
Allow secure boot mode to be configured from config.
2016-12-12 22:44:07 +00:00
Taliesin Sisson
aa1f1da1ff
Support for boot_command
...
Setup local http server
Add compaction of hard drive
GetHostAdapterIpAddress function added for hyperv
renamed step step_start_vm to step_run to fall in ine with naming conventions of other builders
2016-12-12 22:44:07 +00:00
Taliesin Sisson
03b0698edd
Remove devices after it has been shut down
...
Attempt to stop vm, before deleting it
2016-12-12 22:44:06 +00:00
Taliesin Sisson
2d7cfcd65d
Throw error if we can't get mac or ip address during steps
2016-12-12 22:44:05 +00:00
Taliesin Sisson
87b3dec3d2
Wait until WinRM is available, before continuing with install. This is how other system like VeeWee do it.
...
Add support for number of cpus to use for vm
Add support for vm generation
2016-12-12 22:44:04 +00:00
Taliesin Sisson
a42215981e
The test is meant to fail if the folder already exists
2016-12-12 22:44:02 +00:00
Taliesin Sisson
ca16f33fa3
Use the same configuration style as existing builders
...
Move builder into correctly named folder
2016-12-12 22:44:02 +00:00
Taliesin Sisson
1fe4c501e4
Port of https://github.com/pbolduc/packer-hyperv/
...
Remove steps that are windows specific
2016-12-12 22:44:01 +00:00