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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bc8adc83fec3612c07e420580b9d9dadd136453f
4
- data.tar.gz: ff2c67cd195c9e65790709aedeb7bd689f7c6ff7
3
+ metadata.gz: 66db6b7489526053c42f0b42123f05467e993b36
4
+ data.tar.gz: 794652f5107e3b9c975e7251d1149d9a28aaa017
5
5
  SHA512:
6
- metadata.gz: e6115d39b205d23a10a48af908b4c2e6d4f09e8869cc3c93d1811a3c9d9a56771b33ecf6505c67c7141fb93fa87dfbef4e07ca5652dfff7529b5ccf97661e52a
7
- data.tar.gz: 69c108c4a4bb8415ed18c2d1c046c32b43fc1de3e887bb5234b67e260a0bfcb18392389b0d7fa941cc5a83d6ba1f1abadcaab0ab1eade5ad504461fe02ebc7b5
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, 'diff.vhd')
92
+ @differencing_disk_path ||= File.join(kitchen_vm_path, "diff" + "#{config[:disk_type]}")
87
93
  end
88
94
 
89
95
  def parent_vhd_path
@@ -17,6 +17,6 @@
17
17
 
18
18
  module Kitchen
19
19
  module Driver
20
- HYPERV_VERSION = '0.1.4'
20
+ HYPERV_VERSION = '0.1.5'
21
21
  end
22
22
  end
@@ -83,7 +83,7 @@ module Kitchen
83
83
  <<-NEWVM
84
84
 
85
85
  $NewVMParams = @{
86
- Generation = 1
86
+ Generation = #{config[:vm_generation]}
87
87
  MemoryStartupBytes = #{config[:memory_startup_bytes]}
88
88
  Name = "#{instance.name}"
89
89
  Path = "#{kitchen_vm_path}"
@@ -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
- Start-Vm -passthru |
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
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-16 00:00:00.000000000 Z
11
+ date: 2015-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler