vagrant/plugins/providers/hyperv/scripts/clone_vhd.ps1

19 lines
338 B
PowerShell
Raw Normal View History

2018-05-24 16:57:55 +00:00
#Requires -Modules VagrantMessages
param(
2016-03-01 15:23:38 +00:00
[Parameter(Mandatory=$true)]
[string]$Source,
[Parameter(Mandatory=$true)]
[string]$Destination
)
2018-05-24 16:57:55 +00:00
$ErrorActionPreference = "Stop"
try {
Hyper-V\New-VHD -Path $Destination -ParentPath $Source
} catch {
Write-ErrorMessage "Failed to clone drive: ${PSItem}"
2018-05-24 16:57:55 +00:00
exit 1
}