support/hyperv.ps1 in kitchen-hyperv-0.6.0 vs support/hyperv.ps1 in kitchen-hyperv-0.7.0
- old
+ new
@@ -16,12 +16,12 @@
[cmdletbinding()]
param (
[parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[string[]]$Path,
- [parameter(Mandatory)]
- [ValidateNotNullOrEmpty()]
+ [parameter(Mandatory)]
+ [ValidateNotNullOrEmpty()]
[string]$ParentPath
)
if (-not (Test-Path $Path)) {
$null = new-vhd @psboundparameters -Differencing
}
@@ -71,13 +71,13 @@
$DynamicMemoryMaxBytes,
$boot_iso_path,
$EnableGuestServices,
$AdditionalDisks
)
- $null = $psboundparameters.remove('DisableSecureBoot')
+ $null = $psboundparameters.remove('DisableSecureBoot')
$null = $psboundparameters.remove('ProcessorCount')
- $null = $psboundparameters.remove('StaticMacAddress')
+ $null = $psboundparameters.remove('StaticMacAddress')
$null = $psboundparameters.remove('UseDynamicMemory')
$null = $psboundparameters.remove('DynamicMemoryMinBytes')
$null = $psboundparameters.remove('DynamicMemoryMaxBytes')
$null = $psboundparameters.remove('boot_iso_path')
$null = $psboundparameters.remove('EnableGuestServices')
@@ -97,10 +97,10 @@
$vm | Set-VMMemory -DynamicMemoryEnabled $false
}
if (-not [string]::IsNullOrEmpty($boot_iso_path)) {
Mount-VMISO -Id $vm.Id -Path $boot_iso_path
}
- if ($StaticMacAddress -ne $null) {
+ if (-not [string]::IsNullOrEmpty($StaticMacAddress)) {
Set-VMNetworkAdapter -VMName $vm.VMName -StaticMacAddress $StaticMacAddress
}
if ($EnableGuestServices -and (Get-command Enable-VMIntegrationService -ErrorAction SilentlyContinue)) {
Enable-VMIntegrationService -VM $vm -Name 'Guest Service Interface'
}