Taliesin Sisson
181132f32b
Forget to pass in the dvd drive to eject the iso from
2016-12-12 22:44:45 +00:00
Gildas Cherruel
872fc559f5
Export of Hyper-V/VMCX machines
2016-12-12 22:44:45 +00:00
Taliesin Sisson
d878f4dd8e
A workaround for bug in Windows 10 and Windows 2016 where you have to specify a path when creating a dvd drive
2016-12-12 22:44:44 +00:00
Taliesin Sisson
4ab2e8b252
try to get the virtual keyboard a number of different ways. This should hopefully work for Windows 7, Window 10 and Windows Server 2016
2016-12-12 22:44:43 +00:00
Taliesin Sisson
056fc59166
Do not try to type scancodes if there are none. We haven't figured out how to do this on Windows 10 or Windows 7 and below. This will at least allow other types of VMs to be built.
2016-12-12 22:44:42 +00:00
Gildas Cherruel
8734c5b25f
Remove all Dvd Drives on Generation 1
2016-12-12 22:44:42 +00:00
Taliesin Sisson
199bee6885
Need to sleep after sending previous characters, not before
2016-12-12 22:44:41 +00:00
Taliesin Sisson
bda2468404
removed unused reference
2016-12-12 22:44:40 +00:00
Taliesin Sisson
d1961b7c8e
Echo output when its used
2016-12-12 22:44:40 +00:00
Taliesin Sisson
f8e3970d87
By default a gen 1 vm get a dvd drive. Remove it on creation so that it behaves the same as gen 2.
2016-12-12 22:44:38 +00:00
Taliesin Sisson
18241e5215
Setting boot drive is generation specific
2016-12-12 22:44:37 +00:00
Taliesin Sisson
93a2615f7a
Fix gen 1 creation of dvd
2016-12-12 22:44:37 +00:00
Taliesin Sisson
07764c631e
The default for wait is 1 second
2016-12-12 22:44:36 +00:00
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
e8c2b49be8
Use correct quotation of variables
2016-12-12 22:44:34 +00:00
Taliesin Sisson
4b394c8563
Write output will put ouput from function, so we don't want to be getting line from output of function
...
Fix unit tests for not showing progress stream when using powershell
Ensure that progress stream does not get leaked into stdout
Using Write-Output instead of Write-Host since PS v5 now leaks the host stream to stderr
2016-12-12 22:44:33 +00:00
Taliesin Sisson
c42cb88ddd
Using Write-Output instead of Write-Host since PS v5 now leaks the host stream to stderr
2016-12-12 22:44:32 +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
4b6ce3da60
Build agents might not have guest additions
2016-12-12 22:44:29 +00:00
Taliesin Sisson
aaf9007249
Include cache in the state bag.
2016-12-12 22:44:28 +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
cd6213eb55
Seems like we do need to escape the double quote
2016-12-12 22:44:25 +00:00
Taliesin Sisson
9fd635742c
Always force turn off vm
2016-12-12 22:44:24 +00:00
Taliesin Sisson
ccf506ee22
Must point to iso hyperv plugin
2016-12-12 22:44:23 +00:00
Taliesin Sisson
25baa26a7a
Incude hyperv as part of the plugins
2016-12-12 22:44:23 +00:00
Taliesin Sisson
9cf8b18e09
If there is only one ip address on a card we need to force it to be an array. Otherwise powershell may treat it as a property.
...
Stop-Vm with force parameter to ensure that powershell prompts will not appear
2016-12-12 22:44:22 +00:00
Taliesin Sisson
730c6217ad
Fix disk size test
...
Default minimum and maximum sizes were geared towards spinning up windows server instances. Linux instances are far more efficient and make do with lower requirements. Set the minimum sizes to match this.
2016-12-12 22:44:21 +00:00
Taliesin Sisson
15137310a7
Must escape string formatting for string fmt
2016-12-12 22:44:20 +00:00
Taliesin Sisson
5285a819dd
Quoting of powershell commands and associated tests
2016-12-12 22:44:19 +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
Volodymyr Babchynskyy
d57517d4a4
fix vagrant box structure
2016-12-12 22:44:17 +00:00
Taliesin Sisson
8e18baf493
Use plain text password
2016-12-12 22:44:16 +00:00
Taliesin Sisson
c24c882b84
Use simple naming convention for now
2016-12-12 22:44:16 +00:00
Taliesin Sisson
efafed4f37
Copy the folder structure correctly
2016-12-12 22:44:15 +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
837f9addd0
Check the floppy files and not the dvd files attached
2016-12-12 22:44:13 +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
ef507c7bd7
Pass in any iso images to add as dvd drives during boot
2016-12-12 22:44:11 +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
6c3030c73a
Add a little safety around variables that are passed into provisioner.
2016-12-12 22:44:10 +00:00
Taliesin Sisson
bd0b1190f6
When redirecting local ports to hyper visor ports we need to configure WinRM ports as well as SSH ports.
2016-12-12 22:44:09 +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