kitchen-hyperv 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kitchen/driver/hyperv.rb +8 -0
- data/lib/kitchen/driver/hyperv_version.rb +1 -1
- data/lib/kitchen/driver/powershell.rb +6 -0
- data/support/hyperv.ps1 +8 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc8adc83fec3612c07e420580b9d9dadd136453f
|
4
|
+
data.tar.gz: ff2c67cd195c9e65790709aedeb7bd689f7c6ff7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6115d39b205d23a10a48af908b4c2e6d4f09e8869cc3c93d1811a3c9d9a56771b33ecf6505c67c7141fb93fa87dfbef4e07ca5652dfff7529b5ccf97661e52a
|
7
|
+
data.tar.gz: 69c108c4a4bb8415ed18c2d1c046c32b43fc1de3e887bb5234b67e260a0bfcb18392389b0d7fa941cc5a83d6ba1f1abadcaab0ab1eade5ad504461fe02ebc7b5
|
@@ -40,6 +40,7 @@ module Kitchen
|
|
40
40
|
default_config :processor_count, 2
|
41
41
|
default_config :ip_address
|
42
42
|
default_config :vm_switch
|
43
|
+
default_config :iso_path
|
43
44
|
|
44
45
|
include Kitchen::Driver::PowerShellScripts
|
45
46
|
|
@@ -49,6 +50,7 @@ module Kitchen
|
|
49
50
|
create_new_differencing_disk
|
50
51
|
create_virtual_machine
|
51
52
|
update_state
|
53
|
+
mount_virtual_machine_iso
|
52
54
|
instance.transport.connection(@state).wait_until_ready
|
53
55
|
info("Hyper-V instance #{instance.to_str} created.")
|
54
56
|
end
|
@@ -65,6 +67,12 @@ module Kitchen
|
|
65
67
|
|
66
68
|
private
|
67
69
|
|
70
|
+
def mount_virtual_machine_iso
|
71
|
+
return unless config[:iso_path]
|
72
|
+
info("Mounting #{config[:iso_path]}")
|
73
|
+
run_ps mount_vm_iso
|
74
|
+
end
|
75
|
+
|
68
76
|
def validate_vm_settings
|
69
77
|
return if config[:vm_switch]
|
70
78
|
config[:vm_switch] = (run_ps vm_default_switch_ps)['Name']
|
data/support/hyperv.ps1
CHANGED
@@ -140,4 +140,12 @@ function Get-VmDetail
|
|
140
140
|
function Get-DefaultVMSwitch
|
141
141
|
{
|
142
142
|
Get-VMSwitch | Select -First 1
|
143
|
+
}
|
144
|
+
|
145
|
+
function Mount-VMISO {
|
146
|
+
[cmdletbinding()]
|
147
|
+
param($Id, $Path)
|
148
|
+
|
149
|
+
set-VMDvdDrive -VMName (get-vm -id $Id).Name -Path $Path
|
150
|
+
|
143
151
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitchen-hyperv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Murawski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|