kitchen-hyperv 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/kitchen/driver/hyperv.rb +7 -1
- data/lib/kitchen/driver/hyperv_version.rb +1 -1
- data/lib/kitchen/driver/powershell.rb +1 -1
- data/support/hyperv.ps1 +5 -4
- 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: 66db6b7489526053c42f0b42123f05467e993b36
|
4
|
+
data.tar.gz: 794652f5107e3b9c975e7251d1149d9a28aaa017
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ccac90519a3aea0a2045400b369da8b0e299c486b184635bc1ee6ab5d4d226bc9e00adcfd8bcb3f4acc696c0722c9f8f85a3ba888d6cedc3369502e9531fb6d4
|
7
|
+
data.tar.gz: 499c2f993f5a5d595ed3844b502b09f401ac7b0de16802c1ff28c2f25afcaa881b0b6c8a419b67230bf5f1124d44488dfb7d003837e486e9440b04e88ef54740
|
data/README.md
CHANGED
@@ -26,8 +26,6 @@ driver:
|
|
26
26
|
* Location of the base vhd files
|
27
27
|
* parent_vhd_name
|
28
28
|
* Vhd file name for the base vhd file
|
29
|
-
* password
|
30
|
-
* password to use to log into the specified user account. Default user account is Administrator
|
31
29
|
|
32
30
|
### Optional parameters:
|
33
31
|
|
@@ -39,6 +37,8 @@ driver:
|
|
39
37
|
* IP address for the virtual machine. If the VM is not on a network with DHCP, this can be used to assign an IP that can be reached from the host machine.
|
40
38
|
* vm_switch
|
41
39
|
* The virtual switch to attach the guest VMs. Defaults to the first switch returned from Get-VMSwitch.
|
40
|
+
* iso_path
|
41
|
+
* Path on the host to the ISO to mount on the VMs.
|
42
42
|
|
43
43
|
## Contributing
|
44
44
|
|
@@ -41,6 +41,10 @@ module Kitchen
|
|
41
41
|
default_config :ip_address
|
42
42
|
default_config :vm_switch
|
43
43
|
default_config :iso_path
|
44
|
+
default_config :vm_generation, 1
|
45
|
+
default_config :disk_type do |driver|
|
46
|
+
File.extname(driver[:parent_vhd_name])
|
47
|
+
end
|
44
48
|
|
45
49
|
include Kitchen::Driver::PowerShellScripts
|
46
50
|
|
@@ -74,6 +78,8 @@ module Kitchen
|
|
74
78
|
end
|
75
79
|
|
76
80
|
def validate_vm_settings
|
81
|
+
raise "Missing parent_vhd_folder" unless config[:parent_vhd_folder]
|
82
|
+
raise "Missing parent_vhd_name" unless config[:parent_vhd_name]
|
77
83
|
return if config[:vm_switch]
|
78
84
|
config[:vm_switch] = (run_ps vm_default_switch_ps)['Name']
|
79
85
|
end
|
@@ -83,7 +89,7 @@ module Kitchen
|
|
83
89
|
end
|
84
90
|
|
85
91
|
def differencing_disk_path
|
86
|
-
@differencing_disk_path ||= File.join(kitchen_vm_path,
|
92
|
+
@differencing_disk_path ||= File.join(kitchen_vm_path, "diff" + "#{config[:disk_type]}")
|
87
93
|
end
|
88
94
|
|
89
95
|
def parent_vhd_path
|
data/support/hyperv.ps1
CHANGED
@@ -52,9 +52,10 @@ function New-KitchenVM
|
|
52
52
|
$ProcessorCount
|
53
53
|
)
|
54
54
|
$null = $psboundparameters.remove('ProcessorCount')
|
55
|
-
new-vm @psboundparameters |
|
56
|
-
Set-Vm -ProcessorCount $ProcessorCount -passthru
|
57
|
-
|
55
|
+
$vm = new-vm @psboundparameters |
|
56
|
+
Set-Vm -ProcessorCount $ProcessorCount -passthru
|
57
|
+
$vm | Set-VMMemory -DynamicMemoryEnabled $false
|
58
|
+
$vm | Start-Vm -passthru |
|
58
59
|
foreach {
|
59
60
|
$vm = $_
|
60
61
|
do {
|
@@ -139,7 +140,7 @@ function Get-VmDetail
|
|
139
140
|
|
140
141
|
function Get-DefaultVMSwitch
|
141
142
|
{
|
142
|
-
Get-VMSwitch | Select -First 1
|
143
|
+
Get-VMSwitch | Select -First 1 | Select Name, Id
|
143
144
|
}
|
144
145
|
|
145
146
|
function Mount-VMISO {
|
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.5
|
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-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|