From 954c6d2bdf4a8aaf062c797451a6b5d86ca4eae0 Mon Sep 17 00:00:00 2001 From: pgrmega Date: Thu, 13 Dec 2018 18:45:14 +0100 Subject: [PATCH] Fix previous change in patch #7030 The fix is to use -Copy option, not to delete this option which is equivalent to the original -Copy:$false --- common/powershell/hyperv/hyperv.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/powershell/hyperv/hyperv.go b/common/powershell/hyperv/hyperv.go index 816dad9ca..b6522813f 100644 --- a/common/powershell/hyperv/hyperv.go +++ b/common/powershell/hyperv/hyperv.go @@ -395,7 +395,7 @@ if (!$VirtualMachinePath){ $VirtualMachinePath = Get-ChildItem -Path $importPath -Filter *.xml -Recurse -ErrorAction SilentlyContinue | select -First 1 | %{$_.FullName} } -$compatibilityReport = Hyper-V\Compare-VM -Path $VirtualMachinePath -VirtualMachinePath $importPath -SmartPagingFilePath $importPath -SnapshotFilePath $importPath -VhdDestinationPath $VirtualHarddisksPath -GenerateNewId +$compatibilityReport = Hyper-V\Compare-VM -Path $VirtualMachinePath -VirtualMachinePath $importPath -SmartPagingFilePath $importPath -SnapshotFilePath $importPath -VhdDestinationPath $VirtualHarddisksPath -GenerateNewId -Copy if ($vhdPath){ Copy-Item -Path $harddrivePath -Destination $vhdPath $existingFirstHarddrive = $compatibilityReport.VM.HardDrives | Select -First 1