diff --git a/plugins/providers/hyperv/cap/configure_disks.rb b/plugins/providers/hyperv/cap/configure_disks.rb index 12680d5fb..566c2c6be 100644 --- a/plugins/providers/hyperv/cap/configure_disks.rb +++ b/plugins/providers/hyperv/cap/configure_disks.rb @@ -60,7 +60,7 @@ module VagrantPlugins else # might have to look at the path of the disk, as the disk name doesn't # make any sense - current_disk = all_disks.select { |d| d["Disk Name"] == disk.name}.first + current_disk = all_disks.select { |d| File.basename(d["Path"], '.*') == disk.name}.first end current_disk diff --git a/plugins/providers/hyperv/scripts/resize_disk_drive.ps1 b/plugins/providers/hyperv/scripts/resize_disk_drive.ps1 index b0907bde6..c890ecd4a 100644 --- a/plugins/providers/hyperv/scripts/resize_disk_drive.ps1 +++ b/plugins/providers/hyperv/scripts/resize_disk_drive.ps1 @@ -4,7 +4,7 @@ param( [Parameter(Mandatory=$true)] [string]$VmId, [Parameter(Mandatory=$true)] - [string]$DiskFilePath + [string]$DiskFilePath, [Parameter(Mandatory=$true)] [UInt64]$DiskSize )